Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions sdk/sovereign/azure-mgmt-sovereign/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Release History

## Unreleased

### Bugs Fixed

- Preserve sub-microsecond precision when reusing compliance evaluation timestamps in typed snapshot requests.
- Populate the awaited remediation result's `remediation_id` from terminal ARM operation-status responses in both synchronous and asynchronous clients.

## 1.0.0b1 (2026-11-03)

### Other Changes

- Initial version
21 changes: 21 additions & 0 deletions sdk/sovereign/azure-mgmt-sovereign/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Copyright (c) Microsoft Corporation.

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions sdk/sovereign/azure-mgmt-sovereign/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include *.md
include LICENSE
include azure/mgmt/sovereign/py.typed
recursive-include tests *.py
recursive-include samples *.py *.md
include azure/__init__.py
include azure/mgmt/__init__.py
90 changes: 90 additions & 0 deletions sdk/sovereign/azure-mgmt-sovereign/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure Sovereign Management Client Library.
This package has been tested with Python 3.10+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_

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

## Getting started

### Prerequisites

- Python 3.10+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package

```bash
pip install azure-mgmt-sovereign
pip install azure-identity
```

### Authentication

By default, [Microsoft Entra](https://learn.microsoft.com/entra/fundamentals/what-is-entra) token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` for Azure client secret.

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

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

```python
from azure.identity import DefaultAzureCredential
from azure.mgmt.sovereign import SovereignMgmtClient
import os

sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
client = SovereignMgmtClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
```

## Examples

Code samples for this package can be found at:
- [Search Sovereign Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
- [Azure Python Mgmt SDK Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)


## Troubleshooting

### Exact compliance snapshots

Pass the `evaluated_at` value from a compliance dimension directly to
`SovereignViewComplianceResourceDetailsContent.evaluated_at` to select that
snapshot. The SDK preserves fractional digits beyond Python's microsecond
precision during this round-trip, including timezone conversion, copying,
and pickling. The value remains a `datetime` instance.

Do not rebuild the timestamp from its `microsecond` field or perform datetime
arithmetic when using it as an exact snapshot identifier: standard Python
datetime arithmetic and comparisons have microsecond precision. Explicitly
replacing `microsecond` or formatting with an explicit `timespec` uses the
requested Python precision rather than retaining extra fractional digits.
An original RFC3339 timestamp can also be supplied in a dictionary request.

### Awaited remediation results

For synchronous clients, call `begin_remediate(...).result()`. For asynchronous
clients, await `begin_remediate(...)` and then await the returned poller's
`result()`. The returned model exposes `remediation_id` for both an immediate
response and a terminal ARM operation-status response. Pass this ID to
`remediation_result` to retrieve generated bundles. Missing or invalid IDs
raise `DeserializationError`; service polling failures remain errors.

These client fixes do not change the service's supported resource types,
API version, PATCH/DELETE behavior, or subscription-list continuation behavior.
In particular, subscription enumeration still surfaces a service-side paging
error rather than silently returning an incomplete list.

## Next steps

## Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.
11 changes: 11 additions & 0 deletions sdk/sovereign/azure-mgmt-sovereign/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"apiVersion": "2026-10-31-preview",
"apiVersions": {
"Microsoft.Sovereign": "2026-10-31-preview"
},
"commit": "1c2924e5e0c6fc45bd330d2ca9a49e35dbcb19bb",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/sovereign/resource-manager/Microsoft.Sovereign/Sovereign",
"emitterVersion": "0.63.10",
"httpClientPythonVersion": "0.39.0"
}
Loading
Loading