Skip to content

Commit 2d3cd6a

Browse files
authored
Merge branch 'main' into metadata-fix-service-tag
2 parents 821cbb0 + b989aa8 commit 2d3cd6a

File tree

4 files changed

+96
-26
lines changed

4 files changed

+96
-26
lines changed

docs-ref-services/latest/mgmt-security-readme.md

+44-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title:
33
keywords: Azure, python, SDK, API, azure-mgmt-security, security
44
author: lmazuel
55
ms.author: lmazuel
6-
ms.date: 11/17/2022
6+
ms.date: 03/21/2023
77
ms.topic: reference
88
ms.devlang: python
99
ms.service: security
@@ -18,17 +18,53 @@ For a more complete view of Azure libraries, see the [azure sdk python release](
1818

1919
_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_
2020

21-
# Usage
21+
## Getting started
2222

23+
### Prerequisites
2324

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

28+
### Install the package
3029

31-
# Provide Feedback
30+
```bash
31+
pip install azure-mgmt-security
32+
pip install azure-identity
33+
```
34+
35+
### Authentication
36+
37+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
38+
39+
- `AZURE_CLIENT_ID` for Azure client ID.
40+
- `AZURE_TENANT_ID` for Azure tenant ID.
41+
- `AZURE_CLIENT_SECRET` for Azure client secret.
42+
43+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
44+
45+
With above configuration, client can be authenticated by following code:
46+
47+
```python
48+
from azure.identity import DefaultAzureCredential
49+
from azure.mgmt.security import SecurityCenter
50+
import os
51+
52+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
53+
client = SecurityCenter(credential=DefaultAzureCredential(), subscription_id=sub_id)
54+
```
55+
56+
## Examples
57+
58+
Code samples for this package can be found at:
59+
- [Search Security Center Management](/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
60+
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
61+
62+
63+
## Troubleshooting
64+
65+
## Next steps
66+
67+
## Provide Feedback
3268

3369
If you encounter any bugs or have suggestions, please file an issue in the
3470
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)

docs-ref-services/latest/mgmt-webpubsub-readme.md

+48-14
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,69 @@
11
---
22
title:
33
keywords: Azure, python, SDK, API, azure-mgmt-webpubsub, webpubsub
4-
author: ramya-rao-a
5-
ms.author: ramyar
6-
ms.date: 10/14/2021
4+
author: msyyc
5+
ms.author: yuchaoyan
6+
ms.date: 03/21/2023
77
ms.topic: reference
8-
ms.technology: azure
98
ms.devlang: python
109
ms.service: azure-web-pubsub
1110
---
12-
1311
# Microsoft Azure SDK for Python
1412

15-
This is the Microsoft Azure Webpubsub Management Client Library.
16-
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
13+
This is the Microsoft Azure WebPubSub Management Client Library.
14+
This package has been tested with Python 3.7+.
1715
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
1816

17+
## _Disclaimer_
18+
19+
_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_
20+
21+
## Getting started
22+
23+
### Prerequisites
24+
25+
- Python 3.7+ is required to use this package.
26+
- [Azure subscription](https://azure.microsoft.com/free/)
27+
28+
### Install the package
29+
30+
```bash
31+
pip install azure-mgmt-webpubsub
32+
pip install azure-identity
33+
```
34+
35+
### Authentication
36+
37+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
38+
39+
- `AZURE_CLIENT_ID` for Azure client ID.
40+
- `AZURE_TENANT_ID` for Azure tenant ID.
41+
- `AZURE_CLIENT_SECRET` for Azure client secret.
42+
43+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
44+
45+
With above configuration, client can be authenticated by following code:
46+
47+
```python
48+
from azure.identity import DefaultAzureCredential
49+
from azure.mgmt.webpubsub import WebPubSubManagementClient
50+
import os
51+
52+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
53+
client = WebPubSubManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
54+
```
1955

20-
# Usage
56+
## Examples
2157

2258

23-
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
59+
Code samples for this package can be found at [WebPubSub Management](/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)
2460

2561

26-
27-
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
28-
Code samples for this package can be found at [Webpubsub Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
29-
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
62+
## Troubleshooting
3063

64+
## Next steps
3165

32-
# Provide Feedback
66+
## Provide Feedback
3367

3468
If you encounter any bugs or have suggestions, please file an issue in the
3569
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "azure-mgmt-security",
3-
"Version": "3.0.0",
3+
"Version": "4.0.0",
44
"DevVersion": null,
55
"DirectoryPath": "sdk/security/azure-mgmt-security",
66
"ServiceDirectory": "security",
@@ -10,5 +10,5 @@
1010
"SdkType": "mgmt",
1111
"IsNewSdk": true,
1212
"ArtifactName": "azure-mgmt-security",
13-
"ReleaseStatus": "2022-11-17"
13+
"ReleaseStatus": "2023-03-20"
1414
}
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "azure-mgmt-webpubsub",
3-
"Version": "1.0.0",
3+
"Version": "1.1.0",
44
"DevVersion": null,
55
"DirectoryPath": "sdk/webpubsub/azure-mgmt-webpubsub",
66
"ServiceDirectory": "webpubsub",
@@ -10,5 +10,5 @@
1010
"SdkType": "mgmt",
1111
"IsNewSdk": true,
1212
"ArtifactName": "azure-mgmt-webpubsub",
13-
"ReleaseStatus": "2021-10-11"
13+
"ReleaseStatus": "2023-03-20"
1414
}

0 commit comments

Comments
 (0)