Skip to content

Commit f926125

Browse files
authored
code and test (Azure#26286)
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
1 parent 54dd738 commit f926125

File tree

667 files changed

+46687
-32911
lines changed

Some content is hidden

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

667 files changed

+46687
-32911
lines changed

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

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

3+
## 5.0.0 (2022-09-19)
4+
5+
### Features Added
6+
7+
- Model Resource has a new parameter system_data
8+
- Model Resource has a new parameter tags
9+
10+
### Breaking Changes
11+
12+
- Model Resource has a new required parameter location
13+
314
## 4.0.1 (2022-08-02)
415

516
**Other Change**

sdk/monitor/azure-mgmt-monitor/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
include _meta.json
22
recursive-include tests *.py *.json
3+
recursive-include samples *.py *.md
34
include *.md
45
include azure/__init__.py
56
include azure/mgmt/__init__.py
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"autorest": "3.7.2",
2+
"autorest": "3.8.4",
33
"use": [
4-
"@autorest/python@5.16.0",
5-
"@autorest/modelerfour@4.19.3"
4+
"@autorest/python@6.1.6",
5+
"@autorest/modelerfour@4.23.5"
66
],
7-
"commit": "0a4e1e98112a37f70e46a26ec1598d41d8c4b363",
7+
"commit": "e88987b8a1850d2c372bf049d50f077ed25761a8",
88
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9-
"autorest_command": "autorest specification/monitor/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.16.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2",
9+
"autorest_command": "autorest specification/monitor/resource-manager/readme.md --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.1.6 --use=@autorest/modelerfour@4.23.5 --version=3.8.4 --version-tolerant=False",
1010
"readme": "specification/monitor/resource-manager/readme.md"
1111
}

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@
1414
patch_sdk()
1515
except ImportError:
1616
pass
17+
18+
from ._version import VERSION
19+
20+
__version__ = VERSION

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Changes may cause incorrect behavior and will be lost if the code is
99
# regenerated.
1010
# --------------------------------------------------------------------------
11-
from typing import TYPE_CHECKING
11+
from typing import Any, TYPE_CHECKING
1212

1313
from azure.core.configuration import Configuration
1414
from azure.core.pipeline import policies
@@ -18,8 +18,6 @@
1818

1919
if TYPE_CHECKING:
2020
# pylint: disable=unused-import,ungrouped-imports
21-
from typing import Any
22-
2321
from azure.core.credentials import TokenCredential
2422

2523
class MonitorManagementClientConfiguration(Configuration):
@@ -28,16 +26,16 @@ class MonitorManagementClientConfiguration(Configuration):
2826
Note that all parameters used to create this instance are saved as instance
2927
attributes.
3028
31-
:param credential: Credential needed for the client to connect to Azure.
29+
:param credential: Credential needed for the client to connect to Azure. Required.
3230
:type credential: ~azure.core.credentials.TokenCredential
33-
:param subscription_id: The ID of the target subscription.
31+
:param subscription_id: The ID of the target subscription. Required.
3432
:type subscription_id: str
3533
"""
3634

3735
def __init__(
3836
self,
39-
credential, # type: "TokenCredential"
40-
subscription_id, # type: str
37+
credential: "TokenCredential",
38+
subscription_id: str,
4139
**kwargs # type: Any
4240
):
4341
# type: (...) -> None

sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,17 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from typing import TYPE_CHECKING
13-
14-
from msrest import Deserializer, Serializer
12+
from typing import Any, Optional, TYPE_CHECKING
1513

1614
from azure.mgmt.core import ARMPipelineClient
1715
from azure.profiles import KnownProfiles, ProfileDefinition
1816
from azure.profiles.multiapiclient import MultiApiClientMixin
1917

2018
from ._configuration import MonitorManagementClientConfiguration
19+
from ._serialization import Deserializer, Serializer
2120

2221
if TYPE_CHECKING:
2322
# pylint: disable=unused-import,ungrouped-imports
24-
from typing import Any, Optional
25-
2623
from azure.core.credentials import TokenCredential
2724

2825
class _SDKClient(object):
@@ -43,9 +40,9 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
4340
The api-version parameter sets the default API version if the operation
4441
group is not described in the profile.
4542
46-
:param credential: Credential needed for the client to connect to Azure.
43+
:param credential: Credential needed for the client to connect to Azure. Required.
4744
:type credential: ~azure.core.credentials.TokenCredential
48-
:param subscription_id: The ID of the target subscription.
45+
:param subscription_id: The ID of the target subscription. Required.
4946
:type subscription_id: str
5047
:param api_version: API version to use if no profile is provided, or if missing in profile.
5148
:type api_version: str
@@ -56,16 +53,16 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
5653
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
5754
"""
5855

59-
DEFAULT_API_VERSION = '2022-06-01'
56+
DEFAULT_API_VERSION = '2022-10-01'
6057
_PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient"
6158
LATEST_PROFILE = ProfileDefinition({
6259
_PROFILE_TAG: {
6360
None: DEFAULT_API_VERSION,
61+
'action_groups': '2022-06-01',
6462
'activity_log_alerts': '2020-10-01',
6563
'activity_logs': '2015-04-01',
6664
'alert_rule_incidents': '2016-03-01',
6765
'alert_rules': '2016-03-01',
68-
'autoscale_settings': '2015-04-01',
6966
'baselines': '2019-03-01',
7067
'data_collection_endpoints': '2021-04-01',
7168
'data_collection_rule_associations': '2021-04-01',
@@ -83,7 +80,6 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
8380
'metric_namespaces': '2017-12-01-preview',
8481
'metrics': '2018-01-01',
8582
'operations': '2015-07-01',
86-
'predictive_metric': '2021-05-01-preview',
8783
'private_endpoint_connections': '2019-10-17-preview',
8884
'private_link_resources': '2019-10-17-preview',
8985
'private_link_scope_operation_status': '2019-10-17-preview',
@@ -100,10 +96,10 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient):
10096

10197
def __init__(
10298
self,
103-
credential, # type: "TokenCredential"
104-
subscription_id, # type: str
99+
credential: "TokenCredential",
100+
subscription_id: str,
105101
api_version=None, # type: Optional[str]
106-
base_url="https://management.azure.com", # type: str
102+
base_url: str = "https://management.azure.com",
107103
profile=KnownProfiles.default, # type: KnownProfiles
108104
**kwargs # type: Any
109105
):
@@ -149,6 +145,7 @@ def models(cls, api_version=DEFAULT_API_VERSION):
149145
* 2021-09-01-preview: :mod:`v2022_02_01_preview.models<azure.mgmt.monitor.v2022_02_01_preview.models>`
150146
* 2022-04-01: :mod:`v2022_04_01.models<azure.mgmt.monitor.v2022_04_01.models>`
151147
* 2022-06-01: :mod:`v2022_06_01.models<azure.mgmt.monitor.v2022_06_01.models>`
148+
* 2022-10-01: :mod:`v2022_10_01.models<azure.mgmt.monitor.v2022_10_01.models>`
152149
"""
153150
if api_version == '2015-04-01':
154151
from .v2015_04_01 import models
@@ -231,6 +228,9 @@ def models(cls, api_version=DEFAULT_API_VERSION):
231228
elif api_version == '2022-06-01':
232229
from .v2022_06_01 import models
233230
return models
231+
elif api_version == '2022-10-01':
232+
from .v2022_10_01 import models
233+
return models
234234
raise ValueError("API version {} is not available".format(api_version))
235235

236236
@property
@@ -337,12 +337,15 @@ def autoscale_settings(self):
337337
338338
* 2015-04-01: :class:`AutoscaleSettingsOperations<azure.mgmt.monitor.v2015_04_01.operations.AutoscaleSettingsOperations>`
339339
* 2021-05-01-preview: :class:`AutoscaleSettingsOperations<azure.mgmt.monitor.v2021_05_01_preview.operations.AutoscaleSettingsOperations>`
340+
* 2022-10-01: :class:`AutoscaleSettingsOperations<azure.mgmt.monitor.v2022_10_01.operations.AutoscaleSettingsOperations>`
340341
"""
341342
api_version = self._get_api_version('autoscale_settings')
342343
if api_version == '2015-04-01':
343344
from .v2015_04_01.operations import AutoscaleSettingsOperations as OperationClass
344345
elif api_version == '2021-05-01-preview':
345346
from .v2021_05_01_preview.operations import AutoscaleSettingsOperations as OperationClass
347+
elif api_version == '2022-10-01':
348+
from .v2022_10_01.operations import AutoscaleSettingsOperations as OperationClass
346349
else:
347350
raise ValueError("API version {} does not have operation group 'autoscale_settings'".format(api_version))
348351
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
@@ -618,10 +621,13 @@ def predictive_metric(self):
618621
"""Instance depends on the API version:
619622
620623
* 2021-05-01-preview: :class:`PredictiveMetricOperations<azure.mgmt.monitor.v2021_05_01_preview.operations.PredictiveMetricOperations>`
624+
* 2022-10-01: :class:`PredictiveMetricOperations<azure.mgmt.monitor.v2022_10_01.operations.PredictiveMetricOperations>`
621625
"""
622626
api_version = self._get_api_version('predictive_metric')
623627
if api_version == '2021-05-01-preview':
624628
from .v2021_05_01_preview.operations import PredictiveMetricOperations as OperationClass
629+
elif api_version == '2022-10-01':
630+
from .v2022_10_01.operations import PredictiveMetricOperations as OperationClass
625631
else:
626632
raise ValueError("API version {} does not have operation group 'predictive_metric'".format(api_version))
627633
return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))

0 commit comments

Comments
 (0)