Skip to content

Commit 4aa5461

Browse files
azure-sdkChenxiJiang333Copilotmsyyc
authored
[AutoPR azure-mgmt-resourcegraph]-generated-from-SDK Generation - Python-6362430 (#47188)
* Configurations: 'specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/ResourceGraph/tspconfig.yaml', API Version: 2024-04-01, SDK Release Type: beta, and CommitSHA: 'cb62053a18882dd258d9922be9770702b7ef6ac9' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6362430 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Update CHANGELOG.md * Rename test_mgmt_resourcegraph.py to disable_test_mgmt_resourcegraph.py * Add live tests and optimize CHANGELOG for azure-mgmt-resourcegraph Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add async live tests for azure-mgmt-resourcegraph Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Update pyproject.toml * Configurations: 'specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/ResourceGraph/tspconfig.yaml', and CommitSHA: '16e90365f2fcc4efaa3e67e39c15f75c3712ad3d' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6381385 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Update CHANGELOG.md * Update CHANGELOG.md --------- Co-authored-by: ChenxiJiang333 <119990644+ChenxiJiang333@users.noreply.github.com> Co-authored-by: Chenxi Jiang (WICRESOFT NORTH AMERICA LTD) <v-chenjiang@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
1 parent 934c18e commit 4aa5461

75 files changed

Lines changed: 7403 additions & 3299 deletions

File tree

Some content is hidden

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

sdk/resources/azure-mgmt-resourcegraph/CHANGELOG.md

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

3+
## 8.1.0b4 (2026-06-02)
4+
5+
### Features Added
6+
7+
- Client `ResourceGraphClient` added parameter `cloud_setting` in method `__init__`
8+
- Client `ResourceGraphClient` added method `send_request`
9+
- Client `ResourceGraphClient` added operation group `graph_query`
10+
- Added enum `CreatedByType`
11+
- Added model `ErrorFieldContract`
12+
- Added model `GraphQueryError`
13+
- Added model `GraphQueryErrorError`
14+
- Added model `GraphQueryProperties`
15+
- Added model `GraphQueryPropertiesUpdateParameters`
16+
- Added model `GraphQueryResource`
17+
- Added model `GraphQueryUpdateParameters`
18+
- Added model `ProxyResource`
19+
- Added model `Resource`
20+
- Added enum `ResultKind`
21+
- Added model `SystemData`
22+
- Added model `GraphQueryOperations`
23+
24+
### Breaking Changes
25+
26+
- Method `ResourceGraphClient.__init__` inserted a `positional_or_keyword` parameter `subscription_id`
27+
28+
### Other Changes
29+
30+
- Deleted model `Column`/`ColumnDataType`/`Table` which actually was not used by SDK users
31+
- Method `ResourceGraphClient.resources_history` changed return type from `JSON` to `Any`
32+
- Renamed operation group `ResourceGraphClientOperationsMixin` to `_ResourceGraphClientOperationsMixin`
33+
334
## 8.0.1 (2025-11-24)
435

536
### Other Changes
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 Resource Graph Client Library.
4-
This package has been tested with Python 3.7+.
4+
This package has been tested with Python 3.10+.
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/resource-graph)
17-
Code samples for this package can be found at [Resource Graph](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/resourcegraph)
15+
- Python 3.10+ 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-resourcegraph
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, [Microsoft Entra](https://learn.microsoft.com/entra/fundamentals/what-is-entra) 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.resourcegraph import ResourceGraphClient
40+
import os
2641

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

46+
## Examples
2847

48+
Code samples for this package can be found at:
49+
- [Search Resource Graph](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: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2-
"commit": "e96c24570a484cff13d153fb472f812878866a39",
2+
"apiVersions": {
3+
"GraphQueryApi": "2024-04-01",
4+
"ResourceChanges": "2020-09-01-preview",
5+
"ResourceGraphApi": "2024-04-01",
6+
"ResourceHistory": "2021-06-01-preview"
7+
},
8+
"commit": "16e90365f2fcc4efaa3e67e39c15f75c3712ad3d",
39
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.10.2",
5-
"use": [
6-
"@autorest/python@6.42.0",
7-
"@autorest/modelerfour@4.27.0"
8-
],
9-
"autorest_command": "autorest specification/resourcegraph/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-2021-03 --use=@autorest/python@6.42.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
10-
"readme": "specification/resourcegraph/resource-manager/readme.md"
10+
"typespec_src": "specification/resourcegraph/resource-manager/Microsoft.ResourceGraph/ResourceGraph",
11+
"emitterVersion": "0.62.1"
1112
}
Lines changed: 69 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,72 @@
11
{
2-
"CrossLanguagePackageId": null,
2+
"CrossLanguagePackageId": "ResourceChanges",
33
"CrossLanguageDefinitionId": {
4-
"azure.mgmt.resourcegraph.models.Column": null,
5-
"azure.mgmt.resourcegraph.models.Error": null,
6-
"azure.mgmt.resourcegraph.models.ErrorDetails": null,
7-
"azure.mgmt.resourcegraph.models.ErrorFieldContract": null,
8-
"azure.mgmt.resourcegraph.models.ErrorResponse": null,
9-
"azure.mgmt.resourcegraph.models.Facet": null,
10-
"azure.mgmt.resourcegraph.models.FacetError": null,
11-
"azure.mgmt.resourcegraph.models.FacetRequest": null,
12-
"azure.mgmt.resourcegraph.models.FacetRequestOptions": null,
13-
"azure.mgmt.resourcegraph.models.FacetResult": null,
14-
"azure.mgmt.resourcegraph.models.GraphQueryError": null,
15-
"azure.mgmt.resourcegraph.models.GraphQueryErrorError": null,
16-
"azure.mgmt.resourcegraph.models.GraphQueryListResult": null,
17-
"azure.mgmt.resourcegraph.models.Resource": null,
18-
"azure.mgmt.resourcegraph.models.GraphQueryResource": null,
19-
"azure.mgmt.resourcegraph.models.GraphQueryUpdateParameters": null,
20-
"azure.mgmt.resourcegraph.models.Operation": null,
21-
"azure.mgmt.resourcegraph.models.OperationDisplay": null,
22-
"azure.mgmt.resourcegraph.models.OperationListResult": null,
23-
"azure.mgmt.resourcegraph.models.QueryRequest": null,
24-
"azure.mgmt.resourcegraph.models.QueryRequestOptions": null,
25-
"azure.mgmt.resourcegraph.models.QueryResponse": null,
26-
"azure.mgmt.resourcegraph.models.Table": null,
27-
"azure.mgmt.resourcegraph.models.FacetSortOrder": null,
28-
"azure.mgmt.resourcegraph.models.ResultKind": null,
29-
"azure.mgmt.resourcegraph.models.ColumnDataType": null,
30-
"azure.mgmt.resourcegraph.models.ResultFormat": null,
31-
"azure.mgmt.resourcegraph.models.ResultTruncated": null,
32-
"azure.mgmt.resourcegraph.ResourceGraphClient.resources": null,
33-
"azure.mgmt.resourcegraph.aio.ResourceGraphClient.resources": null,
34-
"azure.mgmt.resourcegraph.operations.Operations.list": null,
35-
"azure.mgmt.resourcegraph.aio.operations.Operations.list": null,
36-
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.list_by_subscription": null,
37-
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.list_by_subscription": null,
38-
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.list": null,
39-
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.list": null,
40-
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.get": null,
41-
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.get": null,
42-
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.delete": null,
43-
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.delete": null,
44-
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.create_or_update": null,
45-
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.create_or_update": null,
46-
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.update": null,
47-
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.update": null
48-
}
4+
"azure.mgmt.resourcegraph.models.DateTimeInterval": "ResourceGraphCommon.DateTimeInterval",
5+
"azure.mgmt.resourcegraph.models.Error": "ResourceGraphCommon.Error",
6+
"azure.mgmt.resourcegraph.models.ErrorDetails": "ResourceGraphCommon.ErrorDetails",
7+
"azure.mgmt.resourcegraph.models.ErrorFieldContract": "GraphQueryApi.ErrorFieldContract",
8+
"azure.mgmt.resourcegraph.models.ErrorResponse": "ResourceGraphCommon.ErrorResponse",
9+
"azure.mgmt.resourcegraph.models.Facet": "ResourceGraphApi.Facet",
10+
"azure.mgmt.resourcegraph.models.FacetError": "ResourceGraphApi.FacetError",
11+
"azure.mgmt.resourcegraph.models.FacetRequest": "ResourceGraphApi.FacetRequest",
12+
"azure.mgmt.resourcegraph.models.FacetRequestOptions": "ResourceGraphApi.FacetRequestOptions",
13+
"azure.mgmt.resourcegraph.models.FacetResult": "ResourceGraphApi.FacetResult",
14+
"azure.mgmt.resourcegraph.models.GraphQueryError": "GraphQueryApi.GraphQueryError",
15+
"azure.mgmt.resourcegraph.models.GraphQueryErrorError": "GraphQueryApi.GraphQueryErrorError",
16+
"azure.mgmt.resourcegraph.models.GraphQueryProperties": "GraphQueryApi.GraphQueryProperties",
17+
"azure.mgmt.resourcegraph.models.GraphQueryPropertiesUpdateParameters": "GraphQueryApi.GraphQueryPropertiesUpdateParameters",
18+
"azure.mgmt.resourcegraph.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
19+
"azure.mgmt.resourcegraph.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
20+
"azure.mgmt.resourcegraph.models.GraphQueryResource": "GraphQueryApi.GraphQueryResource",
21+
"azure.mgmt.resourcegraph.models.GraphQueryUpdateParameters": "GraphQueryApi.GraphQueryUpdateParameters",
22+
"azure.mgmt.resourcegraph.models.Operation": "ResourceGraphApi.Operation",
23+
"azure.mgmt.resourcegraph.models.OperationDisplay": "ResourceGraphApi.OperationDisplay",
24+
"azure.mgmt.resourcegraph.models.QueryRequest": "ResourceGraphApi.QueryRequest",
25+
"azure.mgmt.resourcegraph.models.QueryRequestOptions": "ResourceGraphApi.QueryRequestOptions",
26+
"azure.mgmt.resourcegraph.models.QueryResponse": "ResourceGraphApi.QueryResponse",
27+
"azure.mgmt.resourcegraph.models.ResourceChangeData": "ResourceChanges.ResourceChangeData",
28+
"azure.mgmt.resourcegraph.models.ResourceSnapshotData": "ResourceChanges.ResourceSnapshotData",
29+
"azure.mgmt.resourcegraph.models.ResourceChangeDataAfterSnapshot": "ResourceChanges.ResourceChangeDataAfterSnapshot",
30+
"azure.mgmt.resourcegraph.models.ResourceChangeDataBeforeSnapshot": "ResourceChanges.ResourceChangeDataBeforeSnapshot",
31+
"azure.mgmt.resourcegraph.models.ResourceChangeDetailsRequestParameters": "ResourceChanges.ResourceChangeDetailsRequestParameters",
32+
"azure.mgmt.resourcegraph.models.ResourceChangeList": "ResourceChanges.ResourceChangeList",
33+
"azure.mgmt.resourcegraph.models.ResourceChangesRequestParameters": "ResourceChanges.ResourceChangesRequestParameters",
34+
"azure.mgmt.resourcegraph.models.ResourceChangesRequestParametersInterval": "ResourceChanges.ResourceChangesRequestParametersInterval",
35+
"azure.mgmt.resourcegraph.models.ResourcePropertyChange": "ResourceChanges.ResourcePropertyChange",
36+
"azure.mgmt.resourcegraph.models.ResourcesHistoryRequest": "ResourceHistory.ResourcesHistoryRequest",
37+
"azure.mgmt.resourcegraph.models.ResourcesHistoryRequestOptions": "ResourceHistory.ResourcesHistoryRequestOptions",
38+
"azure.mgmt.resourcegraph.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
39+
"azure.mgmt.resourcegraph.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
40+
"azure.mgmt.resourcegraph.models.ResultKind": "GraphQueryApi.ResultKind",
41+
"azure.mgmt.resourcegraph.models.ChangeType": "ResourceChanges.ChangeType",
42+
"azure.mgmt.resourcegraph.models.ChangeCategory": "ResourceChanges.ChangeCategory",
43+
"azure.mgmt.resourcegraph.models.PropertyChangeType": "ResourceChanges.PropertyChangeType",
44+
"azure.mgmt.resourcegraph.models.ResultTruncated": "ResourceGraphApi.ResultTruncated",
45+
"azure.mgmt.resourcegraph.models.ResultFormat": "ResourceGraphCommon.ResultFormat",
46+
"azure.mgmt.resourcegraph.models.AuthorizationScopeFilter": "ResourceGraphApi.AuthorizationScopeFilter",
47+
"azure.mgmt.resourcegraph.models.FacetSortOrder": "ResourceGraphApi.FacetSortOrder",
48+
"azure.mgmt.resourcegraph.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list",
49+
"azure.mgmt.resourcegraph.aio.operations.Operations.list": "Azure.ResourceManager.Legacy.Operations.list",
50+
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.get": "GraphQueryApi.GraphQueryResources.get",
51+
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.get": "GraphQueryApi.GraphQueryResources.get",
52+
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.create_or_update": "GraphQueryApi.GraphQueryResources.createOrUpdate",
53+
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.create_or_update": "GraphQueryApi.GraphQueryResources.createOrUpdate",
54+
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.update": "GraphQueryApi.GraphQueryResources.update",
55+
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.update": "GraphQueryApi.GraphQueryResources.update",
56+
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.delete": "GraphQueryApi.GraphQueryResources.delete",
57+
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.delete": "GraphQueryApi.GraphQueryResources.delete",
58+
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.list": "GraphQueryApi.GraphQueryResources.list",
59+
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.list": "GraphQueryApi.GraphQueryResources.list",
60+
"azure.mgmt.resourcegraph.operations.GraphQueryOperations.list_by_subscription": "GraphQueryApi.GraphQueryResources.listBySubscription",
61+
"azure.mgmt.resourcegraph.aio.operations.GraphQueryOperations.list_by_subscription": "GraphQueryApi.GraphQueryResources.listBySubscription",
62+
"azure.mgmt.resourcegraph.ResourceGraphClient.resource_changes": "ResourceChanges.resourceChanges",
63+
"azure.mgmt.resourcegraph.aio.ResourceGraphClient.resource_changes": "ResourceChanges.resourceChanges",
64+
"azure.mgmt.resourcegraph.ResourceGraphClient.resource_change_details": "ResourceChanges.resourceChangeDetails",
65+
"azure.mgmt.resourcegraph.aio.ResourceGraphClient.resource_change_details": "ResourceChanges.resourceChangeDetails",
66+
"azure.mgmt.resourcegraph.ResourceGraphClient.resources": "ResourceGraphApi.resources",
67+
"azure.mgmt.resourcegraph.aio.ResourceGraphClient.resources": "ResourceGraphApi.resources",
68+
"azure.mgmt.resourcegraph.ResourceGraphClient.resources_history": "ResourceHistory.resourcesHistory",
69+
"azure.mgmt.resourcegraph.aio.ResourceGraphClient.resources_history": "ResourceHistory.resourcesHistory"
70+
},
71+
"CrossLanguageVersion": "c38463afc85a"
4972
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

sdk/resources/azure-mgmt-resourcegraph/azure/mgmt/resourcegraph/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88
# pylint: disable=wrong-import-position
@@ -12,7 +12,7 @@
1212
if TYPE_CHECKING:
1313
from ._patch import * # pylint: disable=unused-wildcard-import
1414

15-
from ._resource_graph_client import ResourceGraphClient # type: ignore
15+
from ._client import ResourceGraphClient # type: ignore
1616
from ._version import VERSION
1717

1818
__version__ = VERSION

0 commit comments

Comments
 (0)