Skip to content

Commit 32c1adf

Browse files
author
SDKAuto
committed
CodeGen from PR 34658 in Azure/azure-rest-api-specs
Merge 81b4da1586c23826c4c60ac46347c475314fce9b into edbd28afa64f2782a12786c7dbf4fdebe0d3cf49
1 parent 67455e4 commit 32c1adf

File tree

85 files changed

+1114
-984
lines changed

Some content is hidden

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

85 files changed

+1114
-984
lines changed

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

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

3+
## 1.0.0 (2025-05-13)
4+
5+
### Features Added
6+
7+
- Model `Event` added property `is_event_sensitive`
8+
- Model `Event` added property `event_tags`
9+
- Model `Impact` added property `impacted_service_guid`
10+
- Model `MetadataSupportedValueDetail` added property `previous_id`
11+
- Model `MetadataSupportedValueDetail` added property `service_guid`
12+
- Model `Update` added property `event_tags`
13+
14+
### Breaking Changes
15+
16+
- Model `Event` deleted or renamed its instance variable `event_sub_type`
17+
- Model `Event` deleted or renamed its instance variable `maintenance_id`
18+
- Model `Event` deleted or renamed its instance variable `maintenance_type`
19+
- Model `Event` deleted or renamed its instance variable `arg_query`
20+
- Model `EventImpactedResource` deleted or renamed its instance variable `resource_name`
21+
- Model `EventImpactedResource` deleted or renamed its instance variable `resource_group`
22+
- Model `EventImpactedResource` deleted or renamed its instance variable `status`
23+
- Model `EventImpactedResource` deleted or renamed its instance variable `maintenance_start_time`
24+
- Model `EventImpactedResource` deleted or renamed its instance variable `maintenance_end_time`
25+
- Deleted or renamed model `EventSubTypeValues`
26+
327
## 1.0.0b6 (2024-10-30)
428

529
### Breaking Changes

sdk/resourcehealth/azure-mgmt-resourcehealth/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 Resource Health 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "ff1e3a1d1aa5f6a959bf4a214e6f69c4d1057647",
2+
"commit": "37c875349517d082096817ef137ca9ef9d07f1c2",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.19.0",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/resourcehealth/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-preview-2023-10 --use=@autorest/python@6.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/resourcehealth/resource-manager/readme.md --generate-sample=True --generate-test=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.34.1 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/resourcehealth/resource-manager/readme.md"
1111
}

sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/__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) AutoRest 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 ._resource_health_mgmt_client import ResourceHealthMgmtClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._resource_health_mgmt_client import ResourceHealthMgmtClient # 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
"ResourceHealthMgmtClient",
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/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/_configuration.py

Lines changed: 4 additions & 5 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 ResourceHealthMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class ResourceHealthMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for ResourceHealthMgmtClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class ResourceHealthMgmtClientConfiguration: # pylint: disable=too-many-instanc
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2023-10-01-preview". Note that overriding
32-
this default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2025-05-01". Note that overriding this
31+
default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2023-10-01-preview")
36+
api_version: str = kwargs.pop("api_version", "2025-05-01")
3837

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

sdk/resourcehealth/azure-mgmt-resourcehealth/azure/mgmt/resourcehealth/_resource_health_mgmt_client.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
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 . import models as _models
1921
from ._configuration import ResourceHealthMgmtClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
AvailabilityStatusesOperations,
2325
ChildAvailabilityStatusesOperations,
@@ -32,11 +34,10 @@
3234
)
3335

3436
if TYPE_CHECKING:
35-
# pylint: disable=unused-import,ungrouped-imports
3637
from azure.core.credentials import TokenCredential
3738

3839

39-
class ResourceHealthMgmtClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
40+
class ResourceHealthMgmtClient: # pylint: disable=too-many-instance-attributes
4041
"""The Resource Health Client.
4142
4243
:ivar availability_statuses: AvailabilityStatusesOperations operations
@@ -67,23 +68,25 @@ class ResourceHealthMgmtClient: # pylint: disable=client-accepts-api-version-ke
6768
:type credential: ~azure.core.credentials.TokenCredential
6869
:param subscription_id: The ID of the target subscription. Required.
6970
:type subscription_id: str
70-
:param base_url: Service URL. Default value is "https://management.azure.com".
71+
:param base_url: Service URL. Default value is None.
7172
:type base_url: str
72-
:keyword api_version: Api Version. Default value is "2023-10-01-preview". Note that overriding
73-
this default value may result in unsupported behavior.
73+
:keyword api_version: Api Version. Default value is "2025-05-01". Note that overriding this
74+
default value may result in unsupported behavior.
7475
:paramtype api_version: str
7576
"""
7677

7778
def __init__(
78-
self,
79-
credential: "TokenCredential",
80-
subscription_id: str,
81-
base_url: str = "https://management.azure.com",
82-
**kwargs: Any
79+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
8380
) -> None:
81+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
82+
_endpoints = get_arm_endpoints(_cloud)
83+
if not base_url:
84+
base_url = _endpoints["resource_manager"]
85+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
8486
self._config = ResourceHealthMgmtClientConfiguration(
85-
credential=credential, subscription_id=subscription_id, **kwargs
87+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
8688
)
89+
8790
_policies = kwargs.pop("policies", None)
8891
if _policies is None:
8992
_policies = [
@@ -102,7 +105,7 @@ def __init__(
102105
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
103106
self._config.http_logging_policy,
104107
]
105-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
108+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
106109

107110
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
108111
self._serialize = Serializer(client_models)
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) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)