Skip to content

Commit f45e1c3

Browse files
[AutoRelease] t2-deviceupdate-2023-11-29-52722(can only be merged by SDK owner) (#33328)
* code and test * update-testcase --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 27fe2f6 commit f45e1c3

File tree

58 files changed

+863
-675
lines changed

Some content is hidden

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

58 files changed

+863
-675
lines changed

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

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

3+
## 1.1.0 (2023-12-18)
4+
5+
### Features Added
6+
7+
- Model Account has a new parameter encryption
8+
39
## 1.1.0b1 (2022-12-26)
410

511
### Other Changes

sdk/deviceupdate/azure-mgmt-deviceupdate/README.md

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,54 @@ For a more complete view of Azure libraries, see the [azure sdk python release](
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/)
17-
Code samples for this package can be found at [Device Update 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://aka.ms/azsdk/python/mgmt/samples)
15+
- Python 3.7+ 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-deviceupdate
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.deviceupdate import DeviceUpdateMgmtClient
40+
import os
41+
42+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43+
client = DeviceUpdateMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
44+
```
45+
46+
## Examples
47+
48+
Code samples for this package can be found at:
49+
- [Search Device Update 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
2258

2359
If you encounter any bugs or have suggestions, please file an issue in the
2460
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
2561
section of the project.
26-
27-
28-
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-deviceupdate%2FREADME.png)
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "e37a57df67daaa82f9c3758fc450bc8655812a08",
2+
"commit": "9c7722c82ca6c894e3d5931f074c4f025598af08",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.2",
4+
"autorest": "3.9.7",
55
"use": [
6-
"@autorest/python@6.2.7",
7-
"@autorest/modelerfour@4.24.3"
6+
"@autorest/python@6.7.1",
7+
"@autorest/modelerfour@4.26.2"
88
],
9-
"autorest_command": "autorest specification/deviceupdate/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 --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/deviceupdate/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 --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
1010
"readme": "specification/deviceupdate/resource-manager/readme.md"
1111
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"AssetsRepo": "Azure/azure-sdk-assets",
3+
"AssetsRepoPrefixPath": "python",
4+
"TagPrefix": "python/deviceupdate/azure-mgmt-deviceupdate",
5+
"Tag": "python/deviceupdate/azure-mgmt-deviceupdate_9646424db7"
6+
}

sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_configuration.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
import sys
109
from typing import Any, TYPE_CHECKING
1110

1211
from azure.core.configuration import Configuration
@@ -15,11 +14,6 @@
1514

1615
from ._version import VERSION
1716

18-
if sys.version_info >= (3, 8):
19-
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
20-
else:
21-
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports
22-
2317
if TYPE_CHECKING:
2418
# pylint: disable=unused-import,ungrouped-imports
2519
from azure.core.credentials import TokenCredential
@@ -35,14 +29,14 @@ class DeviceUpdateMgmtClientConfiguration(Configuration): # pylint: disable=too
3529
:type credential: ~azure.core.credentials.TokenCredential
3630
:param subscription_id: The Azure subscription ID. Required.
3731
:type subscription_id: str
38-
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
32+
:keyword api_version: Api Version. Default value is "2023-07-01". Note that overriding this
3933
default value may result in unsupported behavior.
4034
:paramtype api_version: str
4135
"""
4236

4337
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
4438
super(DeviceUpdateMgmtClientConfiguration, self).__init__(**kwargs)
45-
api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01")
39+
api_version: str = kwargs.pop("api_version", "2023-07-01")
4640

4741
if credential is None:
4842
raise ValueError("Parameter 'credential' must not be None.")

sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_device_update_mgmt_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class DeviceUpdateMgmtClient(
5757
:type subscription_id: str
5858
:param base_url: Service URL. Default value is "https://management.azure.com".
5959
:type base_url: str
60-
:keyword api_version: Api Version. Default value is "2022-10-01". Note that overriding this
60+
:keyword api_version: Api Version. Default value is "2023-07-01". Note that overriding this
6161
default value may result in unsupported behavior.
6262
:paramtype api_version: str
6363
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -74,7 +74,7 @@ def __init__(
7474
self._config = DeviceUpdateMgmtClientConfiguration(
7575
credential=credential, subscription_id=subscription_id, **kwargs
7676
)
77-
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
77+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
7878

7979
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
8080
self._serialize = Serializer(client_models)
@@ -122,5 +122,5 @@ def __enter__(self) -> "DeviceUpdateMgmtClient":
122122
self._client.__enter__()
123123
return self
124124

125-
def __exit__(self, *exc_details) -> None:
125+
def __exit__(self, *exc_details: Any) -> None:
126126
self._client.__exit__(*exc_details)

0 commit comments

Comments
 (0)