Skip to content

Commit 8a4e11d

Browse files
author
SDKAuto
committed
CodeGen from PR 32650 in Azure/azure-rest-api-specs
Merge 9334bed12eff404c655bb8706c23ef39ebf0ebb2 into 761d8b58e465b26eddb8ad70dda3cde7b4228bdf
1 parent d6612d0 commit 8a4e11d

File tree

100 files changed

+13133
-2377
lines changed

Some content is hidden

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

100 files changed

+13133
-2377
lines changed

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

+161
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,166 @@
11
# Release History
22

3+
## 2.0.0b3 (2025-05-09)
4+
5+
### Features Added
6+
7+
- Client `AlertsManagementClient` added method `preview_alert_rule`
8+
- Client `AlertsManagementClient` added operation group `alert_rule_recommendations`
9+
- Client `AlertsManagementClient` added operation group `issue`
10+
- Enum `AlertState` added member `FIRED`
11+
- Enum `AlertState` added member `FIRING`
12+
- Enum `AlertState` added member `NO_ALERT`
13+
- Enum `AlertState` added member `RESOLVED`
14+
- Enum `AlertState` added member `RESOLVING`
15+
- Model `Essentials` added property `has_enrichments`
16+
- Model `Essentials` added property `is_stateful_alert`
17+
- Model `Essentials` added property `correlation_details`
18+
- Enum `MonitorService` added member `RESOURCE_HEALTH`
19+
- Model `Resource` added property `system_data`
20+
- Added model `AbnormalEventAnomalyInsight`
21+
- Added model `AbnormalEventData`
22+
- Added model `AbnormalEventDetails`
23+
- Added enum `AbnormalEventType`
24+
- Added enum `AddedByType`
25+
- Added enum `AggregationType`
26+
- Added model `AlertEnrichmentItem`
27+
- Added model `AlertEnrichmentProperties`
28+
- Added model `AlertEnrichmentResponse`
29+
- Added model `AlertEnrichmentsList`
30+
- Added model `AlertRuleRecommendationResource`
31+
- Added model `AlertRuleRecommendationsListResponse`
32+
- Added enum `AlertSeverity`
33+
- Added enum `AnomalyDirection`
34+
- Added model `AnomalyRange`
35+
- Added enum `AvailabilityState`
36+
- Added model `AzureMetricAnomalyInsight`
37+
- Added model `AzureMetricData`
38+
- Added model `AzureMetricDetails`
39+
- Added model `BaselineRange`
40+
- Added enum `CategoryType`
41+
- Added enum `ConditionOperator`
42+
- Added model `CorrelationDetails`
43+
- Added enum `CriterionType`
44+
- Added model `DetailsBase`
45+
- Added enum `DetailsType`
46+
- Added model `DiagnosticsInsight`
47+
- Added model `DiagnosticsSolutionDetails`
48+
- Added model `DimensionNameAndValue`
49+
- Added enum `DimensionOperator`
50+
- Added model `ErrorDetailAutoGenerated`
51+
- Added model `ErrorDetailAutoGenerated2`
52+
- Added model `ErrorResponseAutoGenerated4`
53+
- Added model `ErrorResponseAutoGenerated5`
54+
- Added model `EvaluatedPeriod`
55+
- Added model `Evaluation`
56+
- Added model `ExceptionPatternAnomaly`
57+
- Added model `FetchInvestigationResultParameters`
58+
- Added enum `HealthState`
59+
- Added model `InvestigationDetails`
60+
- Added model `InvestigationEntity`
61+
- Added enum `InvestigationEntityType`
62+
- Added model `InvestigationExecution`
63+
- Added enum `InvestigationExecutionRunState`
64+
- Added model `InvestigationMetadata`
65+
- Added model `InvestigationResult`
66+
- Added model `InvestigationScope`
67+
- Added model `IssueProperties`
68+
- Added model `IssuePropertiesUpdate`
69+
- Added model `IssueResource`
70+
- Added model `IssueResourceListResult`
71+
- Added model `IssueResourceUpdate`
72+
- Added enum `Kind`
73+
- Added model `ListParameter`
74+
- Added model `LogAlertRuleCondition`
75+
- Added model `LogAlertRuleConditionFailingPeriods`
76+
- Added model `LogAlertRuleCriteria`
77+
- Added model `LogAlertRuleDimension`
78+
- Added model `LogAlertRuleResolveConfiguration`
79+
- Added model `LogAlertRuleResource`
80+
- Added model `LogAlertRuleUserIdentityProperties`
81+
- Added enum `MetricAlertsDisplayUnit`
82+
- Added model `Origin`
83+
- Added model `PagedRelatedAlert`
84+
- Added model `PagedRelatedResource`
85+
- Added model `PreviewAlertRuleRequest`
86+
- Added model `PreviewAlertRuleRequestProperties`
87+
- Added model `PreviewAlertRuleResponse`
88+
- Added model `PrometheusEnrichmentItem`
89+
- Added model `PrometheusInstantQuery`
90+
- Added model `PrometheusRangeQuery`
91+
- Added model `PrometheusRuleGroupResourcePatchParameters`
92+
- Added model `ProxyResource`
93+
- Added model `ProxyResourceAutoGenerated`
94+
- Added model `RelatedAlert`
95+
- Added model `RelatedAlertAnomalyInsight`
96+
- Added model `RelatedAlertData`
97+
- Added model `RelatedAlertDetails`
98+
- Added model `RelatedAlerts`
99+
- Added model `RelatedResource`
100+
- Added model `RelatedResources`
101+
- Added enum `Relevance`
102+
- Added model `ResourceAutoGenerated2`
103+
- Added model `ResourceAutoGenerated3`
104+
- Added model `ResourceHealthDetails`
105+
- Added model `ResourceHealthInsight`
106+
- Added enum `ResourceProvisioningState`
107+
- Added model `RuleArmTemplate`
108+
- Added model `RulePreviewResult`
109+
- Added model `RunParameters`
110+
- Added model `StartInvestigationParameters`
111+
- Added enum `Status`
112+
- Added model `Summary`
113+
- Added enum `TimeAggregation`
114+
- Added model `TracePatternAnomaly`
115+
- Added model `TransactionEdge`
116+
- Added model `TransactionNode`
117+
- Added model `TransactionPatternAnomaly`
118+
- Added enum `Type`
119+
- Model `AlertsOperations` added method `get_enrichments`
120+
- Model `AlertsOperations` added method `list_enrichments`
121+
- Added model `AlertRuleRecommendationsOperations`
122+
- Added model `AlertsManagementClientOperationsMixin`
123+
- Added model `IssueOperations`
124+
- Method `AlertsManagementClient.preview_alert_rule` has a new overload `def preview_alert_rule(self: None, parameters: PreviewAlertRuleRequest, content_type: str)`
125+
- Method `AlertsManagementClient.preview_alert_rule` has a new overload `def preview_alert_rule(self: None, parameters: IO[bytes], content_type: str)`
126+
- Method `AlertProcessingRulesOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, alert_processing_rule_name: str, alert_processing_rule: IO[bytes], content_type: str)`
127+
- Method `AlertProcessingRulesOperations.update` has a new overload `def update(self: None, resource_group_name: str, alert_processing_rule_name: str, alert_processing_rule_patch: IO[bytes], content_type: str)`
128+
- Method `AlertsOperations.change_state` has a new overload `def change_state(self: None, scope: str, alert_id: str, new_state: Union[str, AlertState], comment: Optional[Comments], content_type: str)`
129+
- Method `AlertsOperations.change_state` has a new overload `def change_state(self: None, scope: str, alert_id: str, new_state: Union[str, AlertState], comment: Optional[IO[bytes]], content_type: str)`
130+
- Method `PrometheusRuleGroupsOperations.create_or_update` has a new overload `def create_or_update(self: None, resource_group_name: str, rule_group_name: str, parameters: IO[bytes], content_type: str)`
131+
- Method `PrometheusRuleGroupsOperations.update` has a new overload `def update(self: None, resource_group_name: str, rule_group_name: str, parameters: PrometheusRuleGroupResourcePatchParameters, content_type: str)`
132+
- Method `PrometheusRuleGroupsOperations.update` has a new overload `def update(self: None, resource_group_name: str, rule_group_name: str, parameters: IO[bytes], content_type: str)`
133+
- Method `AlertsManagementClientOperationsMixin.preview_alert_rule` has a new overload `def preview_alert_rule(self: None, parameters: PreviewAlertRuleRequest, content_type: str)`
134+
- Method `AlertsManagementClientOperationsMixin.preview_alert_rule` has a new overload `def preview_alert_rule(self: None, parameters: IO[bytes], content_type: str)`
135+
- Method `IssueOperations.add_or_update_alerts` has a new overload `def add_or_update_alerts(self: None, resource_uri: str, body: RelatedAlerts, content_type: str)`
136+
- Method `IssueOperations.add_or_update_alerts` has a new overload `def add_or_update_alerts(self: None, resource_uri: str, body: IO[bytes], content_type: str)`
137+
- Method `IssueOperations.add_or_update_resources` has a new overload `def add_or_update_resources(self: None, resource_uri: str, body: RelatedResources, content_type: str)`
138+
- Method `IssueOperations.add_or_update_resources` has a new overload `def add_or_update_resources(self: None, resource_uri: str, body: IO[bytes], content_type: str)`
139+
- Method `IssueOperations.create` has a new overload `def create(self: None, resource_uri: str, resource: IssueResource, content_type: str)`
140+
- Method `IssueOperations.create` has a new overload `def create(self: None, resource_uri: str, resource: IO[bytes], content_type: str)`
141+
- Method `IssueOperations.fetch_investigation_result` has a new overload `def fetch_investigation_result(self: None, resource_uri: str, body: FetchInvestigationResultParameters, content_type: str)`
142+
- Method `IssueOperations.fetch_investigation_result` has a new overload `def fetch_investigation_result(self: None, resource_uri: str, body: IO[bytes], content_type: str)`
143+
- Method `IssueOperations.list_alerts` has a new overload `def list_alerts(self: None, resource_uri: str, body: ListParameter, content_type: str)`
144+
- Method `IssueOperations.list_alerts` has a new overload `def list_alerts(self: None, resource_uri: str, body: IO[bytes], content_type: str)`
145+
- Method `IssueOperations.list_resources` has a new overload `def list_resources(self: None, resource_uri: str, body: ListParameter, content_type: str)`
146+
- Method `IssueOperations.list_resources` has a new overload `def list_resources(self: None, resource_uri: str, body: IO[bytes], content_type: str)`
147+
- Method `IssueOperations.start_investigation` has a new overload `def start_investigation(self: None, resource_uri: str, body: StartInvestigationParameters, content_type: str)`
148+
- Method `IssueOperations.start_investigation` has a new overload `def start_investigation(self: None, resource_uri: str, body: IO[bytes], content_type: str)`
149+
- Method `IssueOperations.update` has a new overload `def update(self: None, resource_uri: str, properties: IssueResourceUpdate, content_type: str)`
150+
- Method `IssueOperations.update` has a new overload `def update(self: None, resource_uri: str, properties: IO[bytes], content_type: str)`
151+
152+
### Breaking Changes
153+
154+
- Method `AlertsManagementClient.__init__` inserted a `positional_or_keyword` parameter `issue_name`
155+
- Model `ResourceAutoGenerated` deleted or renamed its instance variable `system_data`
156+
- Deleted or renamed model `PrometheusRuleGroupResourcePatch`
157+
- Deleted or renamed model `PrometheusRuleGroupResourcePatchProperties`
158+
- Method `AlertsOperations.change_state` inserted a `positional_or_keyword` parameter `scope`
159+
- Method `AlertsOperations.get_all` inserted a `positional_or_keyword` parameter `scope`
160+
- Method `AlertsOperations.get_by_id` inserted a `positional_or_keyword` parameter `scope`
161+
- Method `AlertsOperations.get_history` inserted a `positional_or_keyword` parameter `scope`
162+
- Method `AlertsOperations.get_summary` inserted a `positional_or_keyword` parameter `scope`
163+
3164
## 2.0.0b2 (2022-12-26)
4165

5166
### Features Added
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,61 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Alerts Management Client Library.
4-
This package has been tested with Python 3.7+.
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_
88

99
_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
1010

11-
# Usage
11+
## Getting started
1212

13+
### Prerequisites
1314

14-
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
15-
16-
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
17-
Code samples for this package can be found at [Alerts Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
18-
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
15+
- Python 3.9+ is required to use this package.
16+
- [Azure subscription](https://azure.microsoft.com/free/)
1917

18+
### Install the package
2019

21-
# Provide Feedback
20+
```bash
21+
pip install azure-mgmt-alertsmanagement
22+
pip install azure-identity
23+
```
2224

23-
If you encounter any bugs or have suggestions, please file an issue in the
24-
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
25-
section of the project.
25+
### Authentication
26+
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
28+
29+
- `AZURE_CLIENT_ID` for Azure client ID.
30+
- `AZURE_TENANT_ID` for Azure tenant ID.
31+
- `AZURE_CLIENT_SECRET` for Azure client secret.
32+
33+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
34+
35+
With above configuration, client can be authenticated by following code:
36+
37+
```python
38+
from azure.identity import DefaultAzureCredential
39+
from azure.mgmt.alertsmanagement import AlertsManagementClient
40+
import os
2641

42+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43+
client = AlertsManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
44+
```
2745

46+
## Examples
2847

48+
Code samples for this package can be found at:
49+
- [Search Alerts Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
50+
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
51+
52+
53+
## Troubleshooting
54+
55+
## Next steps
56+
57+
## Provide Feedback
58+
59+
If you encounter any bugs or have suggestions, please file an issue in the
60+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
61+
section of the project.
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "e37a57df67daaa82f9c3758fc450bc8655812a08",
2+
"commit": "0668f193f5f8ea18c7ad6b2640a3493ac41ca333",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.2.7",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.34.1",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/alertsmanagement/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/alertsmanagement/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/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/alertsmanagement/resource-manager/readme.md"
1111
}

sdk/alertsmanagement/azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/__init__.py

+9-3
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 ._alerts_management_client import AlertsManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._alerts_management_client import AlertsManagementClient # 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
"AlertsManagementClient",
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()

0 commit comments

Comments
 (0)