Skip to content

Commit 9683053

Browse files
author
SDKAuto
committed
CodeGen from PR 33973 in Azure/azure-rest-api-specs
Merge 0041ea8bf96af81deb65e36c52c25443c131ee1f into 786ec5473b990d57382061c9c47c9886cc320ca1
1 parent 26aedf7 commit 9683053

File tree

13 files changed

+122
-80
lines changed

13 files changed

+122
-80
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "525c8c6cebc5837606cb14cfcb0afdb4f2f17fa9",
2+
"commit": "615552d7d6fb1c212bfbf461f1029628ea83f43a",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/standbypool/StandbyPool.Management",
5-
"@azure-tools/typespec-python": "0.42.3"
5+
"@azure-tools/typespec-python": "0.44.1"
66
}

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

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,24 +47,43 @@
4747
"azure.mgmt.standbypool.models.HealthStateCode": "Microsoft.StandbyPool.HealthStateCode",
4848
"azure.mgmt.standbypool.models.RefillPolicy": "Microsoft.StandbyPool.RefillPolicy",
4949
"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"
50+
"azure.mgmt.standbypool.operations.Operations.list": "Azure.ResourceManager.Operations.list",
51+
"azure.mgmt.standbypool.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list",
52+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get",
53+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get",
54+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.begin_create_or_update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate",
55+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.begin_create_or_update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate",
56+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.begin_delete": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete",
57+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.begin_delete": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete",
58+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update",
59+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update",
60+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.list_by_resource_group": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup",
61+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.list_by_resource_group": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup",
62+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolsOperations.list_by_subscription": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription",
63+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolsOperations.list_by_subscription": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription",
64+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinesOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachines.get",
65+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinesOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachines.get",
66+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinesOperations.list_by_standby_virtual_machine_pool_resource": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource",
67+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinesOperations.list_by_standby_virtual_machine_pool_resource": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource",
68+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolRuntimeViewsOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get",
69+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolRuntimeViewsOperations.get": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get",
70+
"azure.mgmt.standbypool.operations.StandbyVirtualMachinePoolRuntimeViewsOperations.list_by_standby_pool": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool",
71+
"azure.mgmt.standbypool.aio.operations.StandbyVirtualMachinePoolRuntimeViewsOperations.list_by_standby_pool": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool",
72+
"azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.get": "Microsoft.StandbyPool.StandbyContainerGroupPools.get",
73+
"azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.get": "Microsoft.StandbyPool.StandbyContainerGroupPools.get",
74+
"azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.begin_create_or_update": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate",
75+
"azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.begin_create_or_update": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate",
76+
"azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.begin_delete": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete",
77+
"azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.begin_delete": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete",
78+
"azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.update": "Microsoft.StandbyPool.StandbyContainerGroupPools.update",
79+
"azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.update": "Microsoft.StandbyPool.StandbyContainerGroupPools.update",
80+
"azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.list_by_resource_group": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup",
81+
"azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.list_by_resource_group": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup",
82+
"azure.mgmt.standbypool.operations.StandbyContainerGroupPoolsOperations.list_by_subscription": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription",
83+
"azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolsOperations.list_by_subscription": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription",
84+
"azure.mgmt.standbypool.operations.StandbyContainerGroupPoolRuntimeViewsOperations.get": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get",
85+
"azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolRuntimeViewsOperations.get": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get",
86+
"azure.mgmt.standbypool.operations.StandbyContainerGroupPoolRuntimeViewsOperations.list_by_standby_pool": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool",
87+
"azure.mgmt.standbypool.aio.operations.StandbyContainerGroupPoolRuntimeViewsOperations.list_by_standby_pool": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool"
6988
}
7089
}

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

Lines changed: 18 additions & 10 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 StandbyPoolMgmtClientConfiguration
19-
from ._serialization import Deserializer, Serializer
21+
from ._utils.serialization import Deserializer, Serializer
2022
from .operations import (
2123
Operations,
2224
StandbyContainerGroupPoolRuntimeViewsOperations,
@@ -56,7 +58,7 @@ class StandbyPoolMgmtClient:
5658
:type credential: ~azure.core.credentials.TokenCredential
5759
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
5860
:type subscription_id: str
59-
:param base_url: Service host. Default value is "https://management.azure.com".
61+
:param base_url: Service host. Default value is None.
6062
:type base_url: str
6163
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
6264
Note that overriding this default value may result in unsupported behavior.
@@ -66,16 +68,22 @@ class StandbyPoolMgmtClient:
6668
"""
6769

6870
def __init__(
69-
self,
70-
credential: "TokenCredential",
71-
subscription_id: str,
72-
base_url: str = "https://management.azure.com",
73-
**kwargs: Any
71+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
7472
) -> None:
7573
_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"])
7679
self._config = StandbyPoolMgmtClientConfiguration(
77-
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
7885
)
86+
7987
_policies = kwargs.pop("policies", None)
8088
if _policies is None:
8189
_policies = [
@@ -94,7 +102,7 @@ def __init__(
94102
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
95103
self._config.http_logging_policy,
96104
]
97-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
105+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
98106

99107
self._serialize = Serializer()
100108
self._deserialize = Deserializer()
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+
# --------------------------------------------------------------------------

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "2.0.0"
9+
VERSION = "1.0.0b1"

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@
77
# --------------------------------------------------------------------------
88

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

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import AsyncHttpResponse, HttpRequest
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import AsyncARMPipelineClient
1617
from azure.mgmt.core.policies import AsyncARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

18-
from .._serialization import Deserializer, Serializer
20+
from .._utils.serialization import Deserializer, Serializer
1921
from ._configuration import StandbyPoolMgmtClientConfiguration
2022
from .operations import (
2123
Operations,
@@ -56,7 +58,7 @@ class StandbyPoolMgmtClient:
5658
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
5759
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
5860
:type subscription_id: str
59-
:param base_url: Service host. Default value is "https://management.azure.com".
61+
:param base_url: Service host. Default value is None.
6062
:type base_url: str
6163
:keyword api_version: The API version to use for this operation. Default value is "2025-03-01".
6264
Note that overriding this default value may result in unsupported behavior.
@@ -66,16 +68,22 @@ class StandbyPoolMgmtClient:
6668
"""
6769

6870
def __init__(
69-
self,
70-
credential: "AsyncTokenCredential",
71-
subscription_id: str,
72-
base_url: str = "https://management.azure.com",
73-
**kwargs: Any
71+
self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
7472
) -> None:
7573
_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"])
7679
self._config = StandbyPoolMgmtClientConfiguration(
77-
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
7885
)
86+
7987
_policies = kwargs.pop("policies", None)
8088
if _policies is None:
8189
_policies = [
@@ -94,7 +102,9 @@ def __init__(
94102
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
95103
self._config.http_logging_policy,
96104
]
97-
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
105+
self._client: AsyncARMPipelineClient = AsyncARMPipelineClient(
106+
base_url=cast(str, _endpoint), policies=_policies, **kwargs
107+
)
98108

99109
self._serialize = Serializer()
100110
self._deserialize = Deserializer()

sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
3535

3636
from ... import models as _models
37-
from ..._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize
38-
from ..._serialization import Deserializer, Serializer
37+
from ..._utils.model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize
38+
from ..._utils.serialization import Deserializer, Serializer
3939
from ..._validation import api_version_validation
4040
from ...operations._operations import (
4141
build_operations_list_request,

0 commit comments

Comments
 (0)