Skip to content

Commit 348685c

Browse files
author
SDKAuto
committed
CodeGen from PR 33973 in Azure/azure-rest-api-specs
Merge c5980e617228448f4c3624b42ce6dc93388995ce into abe6b63e998a3995d1c28d2a1f8c0a6950a79b72
1 parent 9712d82 commit 348685c

File tree

54 files changed

+1213
-1135
lines changed

Some content is hidden

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

54 files changed

+1213
-1135
lines changed

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

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

3+
## 2.0.0 (2025-04-19)
4+
5+
### Features Added
6+
7+
- Model `ContainerGroupInstanceCountSummary` added property `zone`
8+
- Model `StandbyContainerGroupPoolResourceProperties` added property `zones`
9+
- Model `StandbyContainerGroupPoolResourceUpdateProperties` added property `zones`
10+
- Model `StandbyContainerGroupPoolRuntimeViewResourceProperties` added property `status`
11+
- Model `StandbyContainerGroupPoolRuntimeViewResourceProperties` added property `prediction`
12+
- Model `StandbyVirtualMachinePoolRuntimeViewResourceProperties` added property `status`
13+
- Model `StandbyVirtualMachinePoolRuntimeViewResourceProperties` added property `prediction`
14+
- Enum `VirtualMachineState` added member `HIBERNATED`
15+
- Added enum `HealthStateCode`
16+
- Added enum `PoolContainerGroupState`
17+
- Added model `PoolContainerGroupStateCount`
18+
- Added model `PoolStatus`
19+
- Added enum `PoolVirtualMachineState`
20+
- Added model `PoolVirtualMachineStateCount`
21+
- Added model `StandbyContainerGroupPoolForecastValues`
22+
- Added model `StandbyContainerGroupPoolPrediction`
23+
- Added model `StandbyVirtualMachinePoolForecastValues`
24+
- Added model `StandbyVirtualMachinePoolPrediction`
25+
- Method `ContainerGroupInstanceCountSummary.__init__` has a new overload `def __init__(self: None, instance_counts_by_state: List[_models.PoolContainerGroupStateCount], zone: Optional[int])`
26+
- Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])`
27+
- Method `StandbyContainerGroupPoolResourceProperties.__init__` has a new overload `def __init__(self: None, elasticity_profile: _models.StandbyContainerGroupPoolElasticityProfile, container_group_properties: _models.ContainerGroupProperties, zones: Optional[List[str]])`
28+
- Method `StandbyContainerGroupPoolResourceUpdateProperties.__init__` has a new overload `def __init__(self: None, elasticity_profile: Optional[_models.StandbyContainerGroupPoolElasticityProfile], container_group_properties: Optional[_models.ContainerGroupProperties], zones: Optional[List[str]])`
29+
- Method `VirtualMachineInstanceCountSummary.__init__` has a new overload `def __init__(self: None, instance_counts_by_state: List[_models.PoolVirtualMachineStateCount], zone: Optional[int])`
30+
- Method `PoolContainerGroupStateCount.__init__` has a new overload `def __init__(self: None, state: Union[str, _models.PoolContainerGroupState], count: int)`
31+
- Method `PoolContainerGroupStateCount.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
32+
- Method `PoolVirtualMachineStateCount.__init__` has a new overload `def __init__(self: None, state: Union[str, _models.PoolVirtualMachineState], count: int)`
33+
- Method `PoolVirtualMachineStateCount.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])`
34+
35+
### Breaking Changes
36+
37+
- Deleted or renamed model `PoolResourceStateCount`
38+
339
## 1.0.0 (2024-09-25)
440

541
### Features Added

sdk/standbypool/azure-mgmt-standbypool/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 Standbypool 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": "e695076ad458a3eac3d6943f9e923544ff52b1e4",
2+
"commit": "1a8dcbc31c561409f253e5f7a924ff577b583da7",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/standbypool/StandbyPool.Management",
5-
"@azure-tools/typespec-python": "0.31.1"
5+
"@azure-tools/typespec-python": "0.43.0"
66
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"CrossLanguagePackageId": "Microsoft.StandbyPool",
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.standbypool.models.ContainerGroupInstanceCountSummary": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary",
5+
"azure.mgmt.standbypool.models.ContainerGroupProfile": "Microsoft.StandbyPool.ContainerGroupProfile",
6+
"azure.mgmt.standbypool.models.ContainerGroupProperties": "Microsoft.StandbyPool.ContainerGroupProperties",
7+
"azure.mgmt.standbypool.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo",
8+
"azure.mgmt.standbypool.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail",
9+
"azure.mgmt.standbypool.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse",
10+
"azure.mgmt.standbypool.models.Operation": "Azure.ResourceManager.CommonTypes.Operation",
11+
"azure.mgmt.standbypool.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay",
12+
"azure.mgmt.standbypool.models.PoolContainerGroupStateCount": "Microsoft.StandbyPool.PoolContainerGroupStateCount",
13+
"azure.mgmt.standbypool.models.PoolStatus": "Microsoft.StandbyPool.PoolStatus",
14+
"azure.mgmt.standbypool.models.PoolVirtualMachineStateCount": "Microsoft.StandbyPool.PoolVirtualMachineStateCount",
15+
"azure.mgmt.standbypool.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
16+
"azure.mgmt.standbypool.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
17+
"azure.mgmt.standbypool.models.StandbyContainerGroupPoolElasticityProfile": "Microsoft.StandbyPool.StandbyContainerGroupPoolElasticityProfile",
18+
"azure.mgmt.standbypool.models.StandbyContainerGroupPoolForecastValues": "Microsoft.StandbyPool.StandbyContainerGroupPoolForecastValues",
19+
"azure.mgmt.standbypool.models.StandbyContainerGroupPoolPrediction": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction",
20+
"azure.mgmt.standbypool.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
21+
"azure.mgmt.standbypool.models.StandbyContainerGroupPoolResource": "Microsoft.StandbyPool.StandbyContainerGroupPoolResource",
22+
"azure.mgmt.standbypool.models.StandbyContainerGroupPoolResourceProperties": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties",
23+
"azure.mgmt.standbypool.models.StandbyContainerGroupPoolResourceUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
24+
"azure.mgmt.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
25+
"azure.mgmt.standbypool.models.StandbyContainerGroupPoolRuntimeViewResource": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResource",
26+
"azure.mgmt.standbypool.models.StandbyContainerGroupPoolRuntimeViewResourceProperties": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties",
27+
"azure.mgmt.standbypool.models.StandbyVirtualMachinePoolElasticityProfile": "Microsoft.StandbyPool.StandbyVirtualMachinePoolElasticityProfile",
28+
"azure.mgmt.standbypool.models.StandbyVirtualMachinePoolForecastValues": "Microsoft.StandbyPool.StandbyVirtualMachinePoolForecastValues",
29+
"azure.mgmt.standbypool.models.StandbyVirtualMachinePoolPrediction": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction",
30+
"azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResource": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResource",
31+
"azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResourceProperties": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties",
32+
"azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResourceUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel",
33+
"azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties",
34+
"azure.mgmt.standbypool.models.StandbyVirtualMachinePoolRuntimeViewResource": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResource",
35+
"azure.mgmt.standbypool.models.StandbyVirtualMachinePoolRuntimeViewResourceProperties": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties",
36+
"azure.mgmt.standbypool.models.StandbyVirtualMachineResource": "Microsoft.StandbyPool.StandbyVirtualMachineResource",
37+
"azure.mgmt.standbypool.models.StandbyVirtualMachineResourceProperties": "Microsoft.StandbyPool.StandbyVirtualMachineResourceProperties",
38+
"azure.mgmt.standbypool.models.Subnet": "Microsoft.StandbyPool.Subnet",
39+
"azure.mgmt.standbypool.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
40+
"azure.mgmt.standbypool.models.VirtualMachineInstanceCountSummary": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary",
41+
"azure.mgmt.standbypool.models.Origin": "Azure.ResourceManager.CommonTypes.Origin",
42+
"azure.mgmt.standbypool.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType",
43+
"azure.mgmt.standbypool.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
44+
"azure.mgmt.standbypool.models.VirtualMachineState": "Microsoft.StandbyPool.VirtualMachineState",
45+
"azure.mgmt.standbypool.models.ProvisioningState": "Microsoft.StandbyPool.ProvisioningState",
46+
"azure.mgmt.standbypool.models.PoolVirtualMachineState": "Microsoft.StandbyPool.PoolVirtualMachineState",
47+
"azure.mgmt.standbypool.models.HealthStateCode": "Microsoft.StandbyPool.HealthStateCode",
48+
"azure.mgmt.standbypool.models.RefillPolicy": "Microsoft.StandbyPool.RefillPolicy",
49+
"azure.mgmt.standbypool.models.PoolContainerGroupState": "Microsoft.StandbyPool.PoolContainerGroupState",
50+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.operations.list": "Azure.ResourceManager.Operations.list",
51+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.get": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get",
52+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.begin_create_or_update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate",
53+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.begin_delete": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete",
54+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update",
55+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.list_by_resource_group": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup",
56+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.list_by_subscription": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription",
57+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machines.get": "Microsoft.StandbyPool.StandbyVirtualMachines.get",
58+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machines.list_by_standby_virtual_machine_pool_resource": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource",
59+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pool_runtime_views.get": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get",
60+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pool_runtime_views.list_by_standby_pool": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool",
61+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.get": "Microsoft.StandbyPool.StandbyContainerGroupPools.get",
62+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.begin_create_or_update": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate",
63+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.begin_delete": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete",
64+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.update": "Microsoft.StandbyPool.StandbyContainerGroupPools.update",
65+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.list_by_resource_group": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup",
66+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.list_by_subscription": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription",
67+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pool_runtime_views.get": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get",
68+
"azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pool_runtime_views.list_by_standby_pool": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool"
69+
}
70+
}

sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/__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) 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 ._client import StandbyPoolMgmtClient
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 StandbyPoolMgmtClient # 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
"StandbyPoolMgmtClient",
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()

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

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
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 StandbyPoolMgmtClientConfiguration
1921
from ._serialization import Deserializer, Serializer
@@ -27,11 +29,10 @@
2729
)
2830

2931
if TYPE_CHECKING:
30-
# pylint: disable=unused-import,ungrouped-imports
3132
from azure.core.credentials import TokenCredential
3233

3334

34-
class StandbyPoolMgmtClient: # pylint: disable=client-accepts-api-version-keyword
35+
class StandbyPoolMgmtClient:
3536
"""StandbyPoolMgmtClient.
3637
3738
:ivar operations: Operations operations
@@ -57,26 +58,32 @@ class StandbyPoolMgmtClient: # pylint: disable=client-accepts-api-version-keywo
5758
:type credential: ~azure.core.credentials.TokenCredential
5859
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
5960
:type subscription_id: str
60-
:param base_url: Service host. Default value is "https://management.azure.com".
61+
:param base_url: Service host. Default value is None.
6162
:type base_url: str
62-
:keyword api_version: The API version to use for this operation. Default value is "2024-03-01".
63+
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
6364
Note that overriding this default value may result in unsupported behavior.
6465
:paramtype api_version: str
6566
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
6667
Retry-After header is present.
6768
"""
6869

6970
def __init__(
70-
self,
71-
credential: "TokenCredential",
72-
subscription_id: str,
73-
base_url: str = "https://management.azure.com",
74-
**kwargs: Any
71+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
7572
) -> None:
7673
_endpoint = "{endpoint}"
74+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
75+
_endpoints = get_arm_endpoints(_cloud)
76+
if not base_url:
77+
base_url = _endpoints["resource_manager"]
78+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
7779
self._config = StandbyPoolMgmtClientConfiguration(
78-
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
80+
credential=credential,
81+
subscription_id=subscription_id,
82+
base_url=cast(str, base_url),
83+
credential_scopes=credential_scopes,
84+
**kwargs
7985
)
86+
8087
_policies = kwargs.pop("policies", None)
8188
if _policies is None:
8289
_policies = [
@@ -95,7 +102,7 @@ def __init__(
95102
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
96103
self._config.http_logging_policy,
97104
]
98-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
105+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
99106

100107
self._serialize = Serializer()
101108
self._deserialize = Deserializer()

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
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 StandbyPoolMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class StandbyPoolMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for StandbyPoolMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -30,7 +29,7 @@ class StandbyPoolMgmtClientConfiguration: # pylint: disable=too-many-instance-a
3029
:type subscription_id: str
3130
:param base_url: Service host. Default value is "https://management.azure.com".
3231
:type base_url: str
33-
:keyword api_version: The API version to use for this operation. Default value is "2024-03-01".
32+
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
3433
Note that overriding this default value may result in unsupported behavior.
3534
:paramtype api_version: str
3635
"""
@@ -42,7 +41,7 @@ def __init__(
4241
base_url: str = "https://management.azure.com",
4342
**kwargs: Any
4443
) -> None:
45-
api_version: str = kwargs.pop("api_version", "2024-03-01")
44+
api_version: str = kwargs.pop("api_version", "2025-03-01")
4645

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

0 commit comments

Comments
 (0)