|
1 | 1 | # Microsoft Azure SDK for Python
|
2 | 2 |
|
3 | 3 | This is the Microsoft Azure Service Linker Management Client Library.
|
4 |
| -This package has been tested with Python 3.7+. |
| 4 | +This package has been tested with Python 3.8+. |
5 | 5 | For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
|
6 | 6 |
|
7 | 7 | ## _Disclaimer_
|
8 | 8 |
|
9 | 9 | _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_
|
10 | 10 |
|
11 |
| -# Usage |
| 11 | +## Getting started |
12 | 12 |
|
| 13 | +### Prerequisites |
13 | 14 |
|
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 [Service Linker 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://github.com/Azure-Samples/azure-samples-python-management/tree/main/samples/servicelinker) |
| 15 | +- Python 3.8+ is required to use this package. |
| 16 | +- [Azure subscription](https://azure.microsoft.com/free/) |
19 | 17 |
|
| 18 | +### Install the package |
20 | 19 |
|
21 |
| -# Provide Feedback |
| 20 | +```bash |
| 21 | +pip install azure-mgmt-servicelinker |
| 22 | +pip install azure-identity |
| 23 | +``` |
| 24 | + |
| 25 | +### Authentication |
| 26 | + |
| 27 | +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of 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.servicelinker import ServiceLinkerManagementClient |
| 40 | +import os |
| 41 | + |
| 42 | +sub_id = os.getenv("AZURE_SUBSCRIPTION_ID") |
| 43 | +client = ServiceLinkerManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id) |
| 44 | +``` |
| 45 | + |
| 46 | +## Examples |
| 47 | + |
| 48 | +Code samples for this package can be found at: |
| 49 | +- [Search Service Linker 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 |
22 | 58 |
|
23 | 59 | If you encounter any bugs or have suggestions, please file an issue in the
|
24 | 60 | [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
|
25 | 61 | section of the project.
|
26 |
| - |
27 |
| - |
28 |
| - |
|
0 commit comments