Skip to content

Commit 2ea6c87

Browse files
authored
Regenerate azure-mgmt-operationsmanagement with latest code generator tool (#46947)
1 parent 3d4f111 commit 2ea6c87

63 files changed

Lines changed: 2719 additions & 1726 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/operationsmanagement/azure-mgmt-operationsmanagement/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.0.1 (2026-05-18)
4+
5+
### Other Changes
6+
7+
- Regenerated with latest code generator tool
8+
39
## 2.0.0b1 (2022-10-27)
410

511
### Breaking Changes
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/operationsmanagement/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: 44 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,61 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Operationsmanagement 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_
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 [Operationsmanagement 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.10+ 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-operationsmanagement
22+
pip install azure-identity
23+
```
2224

23-
If you encounter any bugs or have suggestions, please file an issue in the
24-
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
25-
section of the project.
25+
### Authentication
26+
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the 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.operationsmanagement import OperationsManagementClient
40+
import os
2641

42+
sub_id = os.getenv("AZURE_SUBSCRIPTION_ID")
43+
client = OperationsManagementClient(credential=DefaultAzureCredential(), subscription_id=sub_id)
44+
```
2745

46+
## Examples
2847

48+
Code samples for this package can be found at:
49+
- [Search Operationsmanagement 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
58+
59+
If you encounter any bugs or have suggestions, please file an issue in the
60+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
61+
section of the project.

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

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"commit": "ed1626873c0fd0d50df9538ed2608b4d7eac04f4",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"autorest": "3.10.2",
5+
"use": [
6+
"@autorest/python@6.50.0",
7+
"@autorest/modelerfour@4.27.0"
8+
],
9+
"autorest_command": "autorest specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/OperationsManagement/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\azure-sdk-for-python\\sdk --tag=package-2015-11-preview --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
10+
"readme": "specification/operationsmanagement/resource-manager/Microsoft.OperationsManagement/OperationsManagement/readme.md"
11+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"CrossLanguagePackageId": null,
3+
"CrossLanguageDefinitionId": {
4+
"azure.mgmt.operationsmanagement.models.ArmTemplateParameter": null,
5+
"azure.mgmt.operationsmanagement.models.CodeMessageError": null,
6+
"azure.mgmt.operationsmanagement.models.CodeMessageErrorError": null,
7+
"azure.mgmt.operationsmanagement.models.ManagementAssociation": null,
8+
"azure.mgmt.operationsmanagement.models.ManagementAssociationProperties": null,
9+
"azure.mgmt.operationsmanagement.models.ManagementAssociationPropertiesList": null,
10+
"azure.mgmt.operationsmanagement.models.ManagementConfiguration": null,
11+
"azure.mgmt.operationsmanagement.models.ManagementConfigurationProperties": null,
12+
"azure.mgmt.operationsmanagement.models.ManagementConfigurationPropertiesList": null,
13+
"azure.mgmt.operationsmanagement.models.Operation": null,
14+
"azure.mgmt.operationsmanagement.models.OperationDisplay": null,
15+
"azure.mgmt.operationsmanagement.models.OperationListResult": null,
16+
"azure.mgmt.operationsmanagement.models.Solution": null,
17+
"azure.mgmt.operationsmanagement.models.SolutionPatch": null,
18+
"azure.mgmt.operationsmanagement.models.SolutionPlan": null,
19+
"azure.mgmt.operationsmanagement.models.SolutionProperties": null,
20+
"azure.mgmt.operationsmanagement.models.SolutionPropertiesList": null,
21+
"azure.mgmt.operationsmanagement.operations.SolutionsOperations.begin_create_or_update": null,
22+
"azure.mgmt.operationsmanagement.aio.operations.SolutionsOperations.begin_create_or_update": null,
23+
"azure.mgmt.operationsmanagement.operations.SolutionsOperations.begin_update": null,
24+
"azure.mgmt.operationsmanagement.aio.operations.SolutionsOperations.begin_update": null,
25+
"azure.mgmt.operationsmanagement.operations.SolutionsOperations.begin_delete": null,
26+
"azure.mgmt.operationsmanagement.aio.operations.SolutionsOperations.begin_delete": null,
27+
"azure.mgmt.operationsmanagement.operations.SolutionsOperations.get": null,
28+
"azure.mgmt.operationsmanagement.aio.operations.SolutionsOperations.get": null,
29+
"azure.mgmt.operationsmanagement.operations.SolutionsOperations.list_by_resource_group": null,
30+
"azure.mgmt.operationsmanagement.aio.operations.SolutionsOperations.list_by_resource_group": null,
31+
"azure.mgmt.operationsmanagement.operations.SolutionsOperations.list_by_subscription": null,
32+
"azure.mgmt.operationsmanagement.aio.operations.SolutionsOperations.list_by_subscription": null,
33+
"azure.mgmt.operationsmanagement.operations.ManagementAssociationsOperations.list_by_subscription": null,
34+
"azure.mgmt.operationsmanagement.aio.operations.ManagementAssociationsOperations.list_by_subscription": null,
35+
"azure.mgmt.operationsmanagement.operations.ManagementAssociationsOperations.create_or_update": null,
36+
"azure.mgmt.operationsmanagement.aio.operations.ManagementAssociationsOperations.create_or_update": null,
37+
"azure.mgmt.operationsmanagement.operations.ManagementAssociationsOperations.delete": null,
38+
"azure.mgmt.operationsmanagement.aio.operations.ManagementAssociationsOperations.delete": null,
39+
"azure.mgmt.operationsmanagement.operations.ManagementAssociationsOperations.get": null,
40+
"azure.mgmt.operationsmanagement.aio.operations.ManagementAssociationsOperations.get": null,
41+
"azure.mgmt.operationsmanagement.operations.ManagementConfigurationsOperations.list_by_subscription": null,
42+
"azure.mgmt.operationsmanagement.aio.operations.ManagementConfigurationsOperations.list_by_subscription": null,
43+
"azure.mgmt.operationsmanagement.operations.ManagementConfigurationsOperations.create_or_update": null,
44+
"azure.mgmt.operationsmanagement.aio.operations.ManagementConfigurationsOperations.create_or_update": null,
45+
"azure.mgmt.operationsmanagement.operations.ManagementConfigurationsOperations.delete": null,
46+
"azure.mgmt.operationsmanagement.aio.operations.ManagementConfigurationsOperations.delete": null,
47+
"azure.mgmt.operationsmanagement.operations.ManagementConfigurationsOperations.get": null,
48+
"azure.mgmt.operationsmanagement.aio.operations.ManagementConfigurationsOperations.get": null,
49+
"azure.mgmt.operationsmanagement.operations.Operations.list": null,
50+
"azure.mgmt.operationsmanagement.aio.operations.Operations.list": null
51+
}
52+
}
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/operationsmanagement/azure-mgmt-operationsmanagement/azure/mgmt/operationsmanagement/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest 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 ._operations_management_client import OperationsManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._operations_management_client import OperationsManagementClient # 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 * # type: ignore # 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__ = [
2228
"OperationsManagementClient",
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()

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

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

9-
import sys
10-
from typing import Any, TYPE_CHECKING
9+
from typing import Any, Optional, TYPE_CHECKING
1110

12-
from azure.core.configuration import Configuration
1311
from azure.core.pipeline import policies
1412
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1513

1614
from ._version import VERSION
1715

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-
2316
if TYPE_CHECKING:
24-
# pylint: disable=unused-import,ungrouped-imports
17+
from azure.core import AzureClouds
2518
from azure.core.credentials import TokenCredential
2619

2720

28-
class OperationsManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
21+
class OperationsManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
2922
"""Configuration for OperationsManagementClient.
3023
3124
Note that all parameters used to create this instance are saved as instance
@@ -36,14 +29,22 @@ class OperationsManagementClientConfiguration(Configuration): # pylint: disable
3629
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
3730
subscription. The subscription ID forms part of the URI for every service call. Required.
3831
:type subscription_id: str
32+
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
33+
None.
34+
:type cloud_setting: ~azure.core.AzureClouds
3935
:keyword api_version: Api Version. Default value is "2015-11-01-preview". Note that overriding
4036
this default value may result in unsupported behavior.
4137
:paramtype api_version: str
4238
"""
4339

44-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
45-
super(OperationsManagementClientConfiguration, self).__init__(**kwargs)
46-
api_version = kwargs.pop("api_version", "2015-11-01-preview") # type: Literal["2015-11-01-preview"]
40+
def __init__(
41+
self,
42+
credential: "TokenCredential",
43+
subscription_id: str,
44+
cloud_setting: Optional["AzureClouds"] = None,
45+
**kwargs: Any
46+
) -> None:
47+
api_version: str = kwargs.pop("api_version", "2015-11-01-preview")
4748

4849
if credential is None:
4950
raise ValueError("Parameter 'credential' must not be None.")
@@ -52,23 +53,22 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
5253

5354
self.credential = credential
5455
self.subscription_id = subscription_id
56+
self.cloud_setting = cloud_setting
5557
self.api_version = api_version
5658
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5759
kwargs.setdefault("sdk_moniker", "mgmt-operationsmanagement/{}".format(VERSION))
60+
self.polling_interval = kwargs.get("polling_interval", 30)
5861
self._configure(**kwargs)
5962

60-
def _configure(
61-
self, **kwargs # type: Any
62-
):
63-
# type: (...) -> None
63+
def _configure(self, **kwargs: Any) -> None:
6464
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
6565
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
6666
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
6767
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
6868
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
69-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
7069
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
7170
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
71+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
7272
self.authentication_policy = kwargs.get("authentication_policy")
7373
if self.credential and not self.authentication_policy:
7474
self.authentication_policy = ARMChallengeAuthenticationPolicy(

0 commit comments

Comments
 (0)