Skip to content

Commit f303e85

Browse files
author
SDKAuto
committed
CodeGen from PR 34319 in Azure/azure-rest-api-specs
Merge b69b6c0ac0f781ffe113c57f46186aa35273d292 into d6da37c3f230556d5edefd5cefccaeb9ecceaba3
1 parent be6af6e commit f303e85

File tree

105 files changed

+10374
-1954
lines changed

Some content is hidden

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

105 files changed

+10374
-1954
lines changed

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

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

3+
## 10.0.0b2 (2025-04-29)
4+
5+
### Features Added
6+
7+
- Client `AdvisorManagementClient` added method `predict`
8+
- Client `AdvisorManagementClient` added operation group `advisor_scores`
9+
- Client `AdvisorManagementClient` added operation group `assessment_types`
10+
- Client `AdvisorManagementClient` added operation group `assessments`
11+
- Client `AdvisorManagementClient` added operation group `resiliency_reviews`
12+
- Client `AdvisorManagementClient` added operation group `triage_recommendations`
13+
- Client `AdvisorManagementClient` added operation group `triage_resources`
14+
- Client `AdvisorManagementClient` added operation group `workloads`
15+
- Model `ConfigData` added property `duration`
16+
- Model `ConfigData` added property `system_data`
17+
- Model `MetadataEntity` added property `system_data`
18+
- Model `Resource` added property `system_data`
19+
- Model `ResourceRecommendationBase` added property `risk`
20+
- Model `ResourceRecommendationBase` added property `tracked`
21+
- Model `ResourceRecommendationBase` added property `tracked_properties`
22+
- Model `ResourceRecommendationBase` added property `review`
23+
- Model `ResourceRecommendationBase` added property `resource_workload`
24+
- Model `ResourceRecommendationBase` added property `source_system`
25+
- Model `ResourceRecommendationBase` added property `notes`
26+
- Model `ResourceRecommendationBase` added property `system_data`
27+
- Model `SuppressionContract` added property `system_data`
28+
- Added enum `ActionType`
29+
- Added model `AdvisorScoreEntity`
30+
- Added model `AdvisorScoreResponse`
31+
- Added enum `Aggregated`
32+
- Added model `AssessmentListResult`
33+
- Added model `AssessmentResult`
34+
- Added model `AssessmentTypeListResult`
35+
- Added model `AssessmentTypeResult`
36+
- Added model `ConfigDataListResult`
37+
- Added enum `CreatedByType`
38+
- Added enum `Duration`
39+
- Added model `ErrorAdditionalInfo`
40+
- Added model `ErrorDetail`
41+
- Added model `ErrorResponse`
42+
- Added model `Operation`
43+
- Added model `OperationDisplay`
44+
- Added model `OperationListResult`
45+
- Added enum `Origin`
46+
- Added model `PredictionRequest`
47+
- Added model `PredictionResponse`
48+
- Added enum `PredictionType`
49+
- Added enum `Priority`
50+
- Added enum `PriorityName`
51+
- Added model `ProxyResource`
52+
- Added enum `Reason`
53+
- Added enum `ReasonForRejectionName`
54+
- Added model `RecommendationPropertiesResourceWorkload`
55+
- Added model `RecommendationPropertiesReview`
56+
- Added model `RecommendationRejectBody`
57+
- Added enum `RecommendationStatusName`
58+
- Added model `ResiliencyReview`
59+
- Added model `ResiliencyReviewCollection`
60+
- Added enum `ReviewStatus`
61+
- Added enum `Risk`
62+
- Added model `ScoreEntity`
63+
- Added enum `State`
64+
- Added model `SystemData`
65+
- Added model `TimeSeriesEntityItem`
66+
- Added model `TrackedRecommendationProperties`
67+
- Added model `TrackedRecommendationPropertiesPayload`
68+
- Added model `TrackedRecommendationPropertiesPayloadProperties`
69+
- Added model `TriageRecommendation`
70+
- Added model `TriageRecommendationCollection`
71+
- Added model `TriageResource`
72+
- Added model `TriageResourceCollection`
73+
- Added model `WorkloadListResult`
74+
- Added model `WorkloadResult`
75+
- Model `RecommendationsOperations` added method `patch`
76+
- Added model `AdvisorManagementClientOperationsMixin`
77+
- Added model `AdvisorScoresOperations`
78+
- Added model `AssessmentTypesOperations`
79+
- Added model `AssessmentsOperations`
80+
- Added model `ResiliencyReviewsOperations`
81+
- Added model `TriageRecommendationsOperations`
82+
- Added model `TriageResourcesOperations`
83+
- Added model `WorkloadsOperations`
84+
- Method `AdvisorManagementClient.predict` has a new overload `def predict(self: None, body: PredictionRequest, content_type: str)`
85+
- Method `AdvisorManagementClient.predict` has a new overload `def predict(self: None, body: IO[bytes], content_type: str)`
86+
- Method `ConfigurationsOperations.create_in_resource_group` has a new overload `def create_in_resource_group(self: None, configuration_name: Union[str, ConfigurationName], resource_group: str, config_contract: IO[bytes], content_type: str)`
87+
- Method `ConfigurationsOperations.create_in_subscription` has a new overload `def create_in_subscription(self: None, configuration_name: Union[str, ConfigurationName], config_contract: IO[bytes], content_type: str)`
88+
- Method `RecommendationsOperations.patch` has a new overload `def patch(self: None, resource_uri: str, recommendation_id: str, tracked_properties: TrackedRecommendationPropertiesPayload, content_type: str)`
89+
- Method `RecommendationsOperations.patch` has a new overload `def patch(self: None, resource_uri: str, recommendation_id: str, tracked_properties: IO[bytes], content_type: str)`
90+
- Method `SuppressionsOperations.create` has a new overload `def create(self: None, resource_uri: str, recommendation_id: str, name: str, suppression_contract: IO[bytes], content_type: str)`
91+
- Method `AdvisorManagementClientOperationsMixin.predict` has a new overload `def predict(self: None, body: PredictionRequest, content_type: str)`
92+
- Method `AdvisorManagementClientOperationsMixin.predict` has a new overload `def predict(self: None, body: IO[bytes], content_type: str)`
93+
- Method `AssessmentsOperations.put` has a new overload `def put(self: None, assessment_name: str, assessment_contract: AssessmentResult, content_type: str)`
94+
- Method `AssessmentsOperations.put` has a new overload `def put(self: None, assessment_name: str, assessment_contract: IO[bytes], content_type: str)`
95+
- Method `TriageRecommendationsOperations.reject_triage_recommendation` has a new overload `def reject_triage_recommendation(self: None, review_id: str, recommendation_id: str, recommendation_reject_body: RecommendationRejectBody, content_type: str)`
96+
- Method `TriageRecommendationsOperations.reject_triage_recommendation` has a new overload `def reject_triage_recommendation(self: None, review_id: str, recommendation_id: str, recommendation_reject_body: IO[bytes], content_type: str)`
97+
98+
### Breaking Changes
99+
100+
- Method `ConfigurationListResult.__init__` removed default value `None` from its parameter `value`
101+
- Method `MetadataEntityListResult.__init__` removed default value `None` from its parameter `value`
102+
- Method `ResourceRecommendationBaseListResult.__init__` removed default value `None` from its parameter `value`
103+
- Method `SuppressionContractListResult.__init__` removed default value `None` from its parameter `value`
104+
- Deleted or renamed model `ARMErrorResponseBody`
105+
- Deleted or renamed model `ArmErrorResponse`
106+
- Deleted or renamed model `OperationDisplayInfo`
107+
- Deleted or renamed model `OperationEntity`
108+
3109
## 10.0.0b1 (2022-10-28)
4110

5111
### Features Added
Lines changed: 44 additions & 11 deletions
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 Advisor 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/advisor)
17-
Code samples for this package can be found at [Advisor](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://github.com/Azure-Samples/azure-samples-python-management/tree/main/samples/advisor)
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-advisor
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.advisor import AdvisorManagementClient
40+
import os
2641

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

46+
## Examples
2847

48+
Code samples for this package can be found at:
49+
- [Search Advisor](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.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "e82a24def11ffc98cc263884f9f1742c99f2df5e",
2+
"commit": "73a9faf2e5b927a86026f01a89ae029f5eefd69b",
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.1",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.34.1",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/advisor/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 --tag=package-2020-01 --use=@autorest/python@6.2.1 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/advisor/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/advisor/resource-manager/readme.md"
1111
}

sdk/advisor/azure-mgmt-advisor/azure/mgmt/advisor/__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 ._advisor_management_client import AdvisorManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._advisor_management_client import AdvisorManagementClient # 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 * # type: ignore # 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
"AdvisorManagementClient",
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)