Skip to content

Commit 802876b

Browse files
azure-sdkmsyycCopilot
authored
Refresh azure-mgmt-securityinsight after migrate to Typespec (#47162)
* Configurations: 'specification/securityinsights/resource-manager/Microsoft.SecurityInsights/SecurityInsights/tspconfig.yaml', API Version: 2025-07-01-preview, SDK Release Type: beta, and CommitSHA: 'da8db6e593df9f3ddc13139c39930fdad54d12f7' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6357203 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * Optimize changelog for azure-mgmt-securityinsight Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add live tests for azure-mgmt-securityinsight * Optimize changelog: consolidate unused models and enums (rule 11) * update title * update changelog * update changelog * update changelog * update README --------- Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 98e46a6 commit 802876b

503 files changed

Lines changed: 99755 additions & 61223 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/securityinsight/azure-mgmt-securityinsight/CHANGELOG.md

Lines changed: 376 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
include _meta.json
2-
recursive-include tests *.py *.json
3-
recursive-include samples *.py *.md
41
include *.md
5-
include azure/__init__.py
6-
include azure/mgmt/__init__.py
72
include LICENSE
83
include azure/mgmt/securityinsight/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/mgmt/__init__.py
Lines changed: 9 additions & 11 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 Security Insight Management 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_
@@ -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.7+ is required to use this package.
15+
- Python 3.10+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
@@ -24,29 +24,30 @@ 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.
31-
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
31+
- `AZURE_CLIENT_SECRET` for Azure client secret.
3232

3333
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
3434

3535
With above configuration, client can be authenticated by following code:
3636

3737
```python
3838
from azure.identity import DefaultAzureCredential
39-
from azure.mgmt.securityinsight import SecurityInsights
39+
from azure.mgmt.securityinsight import SecurityInsightsMgmtClient
4040
import os
4141

4242
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43-
client = SecurityInsights(credential=DefaultAzureCredential(), subscription_id=sub_id)
43+
client = SecurityInsightsMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
4444
```
4545

4646
## Examples
4747

48-
49-
Code samples for this package can be found at [Security Insight Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com and [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
48+
Code samples for this package can be found at:
49+
- [Search Security Insight 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)
5051

5152

5253
## Troubleshooting
@@ -58,6 +59,3 @@ Code samples for this package can be found at [Security Insight Management](http
5859
If you encounter any bugs or have suggestions, please file an issue in the
5960
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
6061
section of the project.
61-
62-
63-

sdk/securityinsight/azure-mgmt-securityinsight/_meta.json

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"apiVersion": "2025-07-01-preview",
3+
"apiVersions": {
4+
"Microsoft.SecurityInsights": "2025-07-01-preview"
5+
},
6+
"commit": "da8db6e593df9f3ddc13139c39930fdad54d12f7",
7+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
8+
"typespec_src": "specification/securityinsights/resource-manager/Microsoft.SecurityInsights/SecurityInsights",
9+
"emitterVersion": "0.62.1"
10+
}

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

Lines changed: 990 additions & 0 deletions
Large diffs are not rendered by default.
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/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/__init__.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,31 @@
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
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._security_insights import SecurityInsights
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._client import SecurityInsightsMgmtClient # 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__ = [
22-
"SecurityInsights",
28+
"SecurityInsightsMgmtClient",
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)