diff --git a/sdk/monitor/azure-mgmt-monitor/_meta.json b/sdk/monitor/azure-mgmt-monitor/_meta.json index f5d16436e4bc..950f1eb9cb1b 100644 --- a/sdk/monitor/azure-mgmt-monitor/_meta.json +++ b/sdk/monitor/azure-mgmt-monitor/_meta.json @@ -4,8 +4,8 @@ "@autorest/python@5.12.0", "@autorest/modelerfour@4.19.3" ], - "commit": "8174b2fc60e288a9d7fcdff5f9414e43a6ad5989", + "commit": "040e51d9f2795a0922cad0fb8cd31d12007ccb45", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/monitor/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "autorest_command": "autorest specification/monitor/resource-manager/readme.md --multiapi --python --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/monitor/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/__init__.py index ccbeb512b0c2..fa63968b3759 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] try: from ._patch import patch_sdk # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_configuration.py index 7a92a65b34c6..13b9b1747c9a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_configuration.py @@ -22,8 +22,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -45,7 +45,7 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_client.py similarity index 97% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_client.py index d810d1e177d4..855ed800ef70 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_client.py @@ -16,7 +16,7 @@ from azure.profiles.multiapiclient import MultiApiClientMixin from msrest import Deserializer, Serializer -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -31,7 +31,7 @@ def __init__(self, *args, **kwargs): """ pass -class MonitorManagementClient(MultiApiClientMixin, _SDKClient): +class MonitorClient(MultiApiClientMixin, _SDKClient): """Monitor Management Client. This ready contains multiple API versions, to help you deal with all of the Azure clouds @@ -56,7 +56,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient): """ DEFAULT_API_VERSION = '2021-09-01' - _PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient" + _PROFILE_TAG = "azure.mgmt.monitor.MonitorClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, @@ -65,7 +65,6 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient): 'alert_rule_incidents': '2016-03-01', 'alert_rules': '2016-03-01', 'autoscale_settings': '2015-04-01', - 'baseline': '2018-09-01', 'baselines': '2019-03-01', 'data_collection_endpoints': '2021-04-01', 'data_collection_rule_associations': '2021-04-01', @@ -79,7 +78,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient): 'management_group_diagnostic_settings': '2021-05-01-preview', 'metric_alerts': '2018-03-01', 'metric_alerts_status': '2018-03-01', - 'metric_baseline': '2018-09-01', + 'metric_baseline': '2017-11-01-preview', 'metric_definitions': '2018-01-01', 'metric_namespaces': '2017-12-01-preview', 'metrics': '2018-01-01', @@ -108,9 +107,9 @@ def __init__( profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): - self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(MonitorManagementClient, self).__init__( + super(MonitorClient, self).__init__( api_version=api_version, profile=profile ) @@ -338,19 +337,6 @@ def autoscale_settings(self): raise ValueError("API version {} does not have operation group 'autoscale_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - @property - def baseline(self): - """Instance depends on the API version: - - * 2018-09-01: :class:`BaselineOperations` - """ - api_version = self._get_api_version('baseline') - if api_version == '2018-09-01': - from .v2018_09_01.operations import BaselineOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'baseline'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - @property def baselines(self): """Instance depends on the API version: @@ -549,13 +535,10 @@ def metric_baseline(self): """Instance depends on the API version: * 2017-11-01-preview: :class:`MetricBaselineOperations` - * 2018-09-01: :class:`MetricBaselineOperations` """ api_version = self._get_api_version('metric_baseline') if api_version == '2017-11-01-preview': from .v2017_11_01_preview.operations import MetricBaselineOperations as OperationClass - elif api_version == '2018-09-01': - from .v2018_09_01.operations import MetricBaselineOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'metric_baseline'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/__init__.py index 96ce9b45c05b..7096a59fbc1f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_configuration.py index d1088d0ae2a5..91e8c58f906e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_configuration.py @@ -20,8 +20,8 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -42,7 +42,7 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_client.py similarity index 97% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_client.py index 4baa61a8055b..bb504a4171b8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_client.py @@ -16,7 +16,7 @@ from azure.profiles.multiapiclient import MultiApiClientMixin from msrest import Deserializer, Serializer -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -30,7 +30,7 @@ def __init__(self, *args, **kwargs): """ pass -class MonitorManagementClient(MultiApiClientMixin, _SDKClient): +class MonitorClient(MultiApiClientMixin, _SDKClient): """Monitor Management Client. This ready contains multiple API versions, to help you deal with all of the Azure clouds @@ -55,7 +55,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient): """ DEFAULT_API_VERSION = '2021-09-01' - _PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient" + _PROFILE_TAG = "azure.mgmt.monitor.MonitorClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, @@ -64,7 +64,6 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient): 'alert_rule_incidents': '2016-03-01', 'alert_rules': '2016-03-01', 'autoscale_settings': '2015-04-01', - 'baseline': '2018-09-01', 'baselines': '2019-03-01', 'data_collection_endpoints': '2021-04-01', 'data_collection_rule_associations': '2021-04-01', @@ -78,7 +77,7 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient): 'management_group_diagnostic_settings': '2021-05-01-preview', 'metric_alerts': '2018-03-01', 'metric_alerts_status': '2018-03-01', - 'metric_baseline': '2018-09-01', + 'metric_baseline': '2017-11-01-preview', 'metric_definitions': '2018-01-01', 'metric_namespaces': '2017-12-01-preview', 'metrics': '2018-01-01', @@ -107,9 +106,9 @@ def __init__( profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - super(MonitorManagementClient, self).__init__( + super(MonitorClient, self).__init__( api_version=api_version, profile=profile ) @@ -337,19 +336,6 @@ def autoscale_settings(self): raise ValueError("API version {} does not have operation group 'autoscale_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - @property - def baseline(self): - """Instance depends on the API version: - - * 2018-09-01: :class:`BaselineOperations` - """ - api_version = self._get_api_version('baseline') - if api_version == '2018-09-01': - from ..v2018_09_01.aio.operations import BaselineOperations as OperationClass - else: - raise ValueError("API version {} does not have operation group 'baseline'".format(api_version)) - return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) - @property def baselines(self): """Instance depends on the API version: @@ -548,13 +534,10 @@ def metric_baseline(self): """Instance depends on the API version: * 2017-11-01-preview: :class:`MetricBaselineOperations` - * 2018-09-01: :class:`MetricBaselineOperations` """ api_version = self._get_api_version('metric_baseline') if api_version == '2017-11-01-preview': from ..v2017_11_01_preview.aio.operations import MetricBaselineOperations as OperationClass - elif api_version == '2018-09-01': - from ..v2018_09_01.aio.operations import MetricBaselineOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'metric_baseline'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models.py index 9def65086344..156de7bce87c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models.py @@ -8,12 +8,12 @@ from .v2015_07_01.models import * from .v2016_03_01.models import * from .v2016_09_01.models import * +from .v2017_11_01_preview.models import * from .v2017_12_01_preview.models import * from .v2018_01_01.models import * from .v2018_03_01.models import * from .v2018_04_16.models import * from .v2018_06_01_preview.models import * -from .v2018_09_01.models import * from .v2018_11_27_preview.models import * from .v2019_03_01.models import * from .v2019_10_17.models import * diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_configuration.py index e1f58c99be3f..83816c8492f7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_metadata.json index 3399fadde882..32104e298ff4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2015-04-01", "total_api_version_list": ["2014-04-01", "2015-04-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_client.py index de9d3cc08044..abcaea7c8c2f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActivityLogsOperations, AlertRulesOperations, AutoscaleSettingsOperations, EventCategoriesOperations, Operations, TenantActivityLogsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar activity_logs: ActivityLogsOperations operations @@ -54,7 +54,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -100,7 +100,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_configuration.py index 34bea0f7b202..aa9b6b24e1c8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_client.py index 1859b81d454f..0e7bd244497d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActivityLogsOperations, AlertRulesOperations, AutoscaleSettingsOperations, EventCategoriesOperations, Operations, TenantActivityLogsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar activity_logs: ActivityLogsOperations operations @@ -55,7 +55,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -99,7 +99,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/__init__.py index 8c2ce56ff580..511b160e1bd8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/__init__.py @@ -49,7 +49,7 @@ from ._models_py3 import WebhookNotification -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( ComparisonOperationType, ConditionOperator, EventLevel, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models_py3.py index 56559fa4174d..d3ce4f5783cc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class Resource(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_configuration.py index e1f58c99be3f..83816c8492f7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_metadata.json index d78934a87679..9134a620d2ce 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2015-07-01", "total_api_version_list": ["2014-04-01", "2015-07-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_client.py index 3e6ca5d03b38..16355e29b04b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import AlertRulesOperations, MetricDefinitionsOperations, Operations, ServiceDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar service_diagnostic_settings: ServiceDiagnosticSettingsOperations operations @@ -49,7 +49,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -93,7 +93,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_configuration.py index 34bea0f7b202..aa9b6b24e1c8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_client.py index 022345195cee..51b7ff419fbe 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import AlertRulesOperations, MetricDefinitionsOperations, Operations, ServiceDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar service_diagnostic_settings: ServiceDiagnosticSettingsOperations operations @@ -49,7 +49,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -91,7 +91,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/__init__.py index 04b1680c0010..a7853485f09c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/__init__.py @@ -43,7 +43,7 @@ from ._models_py3 import ThresholdRuleCondition -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( AggregationType, ConditionOperator, TimeAggregationOperator, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models_py3.py index fd3490a9af69..96e8bc815c55 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class Resource(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py index 3c5148998b74..c18f2f9ee66c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_metadata.json index 8b98756e8957..9dacf456b983 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2016-03-01", "total_api_version_list": ["2016-03-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_client.py index 9c79236030cb..4405f6169b66 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import AlertRuleIncidentsOperations, AlertRulesOperations, LogProfilesOperations, MetricDefinitionsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar alert_rule_incidents: AlertRuleIncidentsOperations operations @@ -49,7 +49,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -93,7 +93,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py index 71d775201fb9..3a48ace038d2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_client.py index acb5d7873254..720aa6c32907 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import AlertRuleIncidentsOperations, AlertRulesOperations, LogProfilesOperations, MetricDefinitionsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar alert_rule_incidents: AlertRuleIncidentsOperations operations @@ -50,7 +50,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -92,7 +92,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/__init__.py index 2b9edd288653..31bcfebce51f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/__init__.py @@ -35,7 +35,7 @@ from ._models_py3 import ThresholdRuleCondition -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( AggregationType, ConditionOperator, TimeAggregationOperator, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models_py3.py index abb472b8f34a..844debe9d351 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class Resource(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py index f5100df22e0e..f92c3a458059 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "TokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_metadata.json index 056ea76a8642..c5bea0a5e7c2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2016-09-01", "total_api_version_list": ["2016-09-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_client.py index fc61134de6fc..cadba30cb825 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import MetricsOperations, ServiceDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar metrics: MetricsOperations operations @@ -41,7 +41,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -83,7 +83,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py index e05030315578..ded850205057 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "AsyncTokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_client.py index fc77dcd16de0..c94cd71c97f2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import MetricsOperations, ServiceDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar metrics: MetricsOperations operations @@ -41,7 +41,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -81,7 +81,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/__init__.py index 7e5d780d78e1..376bbff4a5fc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/__init__.py @@ -19,7 +19,7 @@ from ._models_py3 import ServiceDiagnosticSettingsResourcePatch -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( Unit, ) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py index 99a177ae114d..506d2ae591be 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class ErrorResponse(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py index 23b544c587c2..e64bcd617663 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_metadata.json index 877e90f7a5f9..4350c9673aed 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2017-03-01-preview", "total_api_version_list": ["2017-03-01-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_client.py index 2fff9a7767ce..0a65bf334acb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActivityLogAlertsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar activity_log_alerts: ActivityLogAlertsOperations operations @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -83,7 +83,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py index 79386b6bd350..d98e049f0502 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_client.py index ffe1322a32a4..6015740ac131 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActivityLogAlertsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar activity_log_alerts: ActivityLogAlertsOperations operations @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -81,7 +81,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py index 1723a0c2143e..1449431c4fdf 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_metadata.json index 93b8dd8db876..00ad20950a0b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2017-04-01", "total_api_version_list": ["2017-04-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_client.py index 2a3235194c0f..3db0bbbf494d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations, ActivityLogAlertsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -44,7 +44,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -86,7 +86,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py index 9d93745c9a82..80abb1bd65d0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_client.py index e74e70f31cff..039d88eeea8b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations, ActivityLogAlertsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -45,7 +45,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -85,7 +85,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/__init__.py index 52785b077363..31d7116a85da 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/__init__.py @@ -27,7 +27,7 @@ from ._models_py3 import WebhookReceiver -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( ReceiverStatus, ) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py index adb04d3afc9e..570b01e3b819 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_metadata.json index 0f3d571414fa..a98d65f9602f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2017-05-01-preview", "total_api_version_list": ["2017-05-01-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_client.py index 747a5873d2a3..93c085405b4b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import DiagnosticSettingsCategoryOperations, DiagnosticSettingsOperations, MetricDefinitionsOperations, MetricsOperations, SubscriptionDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar diagnostic_settings_category: DiagnosticSettingsCategoryOperations operations @@ -53,7 +53,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -98,7 +98,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py index ac5e4fab2ece..55834a78e60e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_client.py index e5c199e8f47c..33ab2784a6ff 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import DiagnosticSettingsCategoryOperations, DiagnosticSettingsOperations, MetricDefinitionsOperations, MetricsOperations, SubscriptionDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar diagnostic_settings_category: DiagnosticSettingsCategoryOperations operations @@ -53,7 +53,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -96,7 +96,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/__init__.py index e41ba32b99f7..2c55fb0c965c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/__init__.py @@ -30,7 +30,7 @@ from ._models_py3 import TimeSeriesElement -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( AggregationType, CategoryType, ResultType, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py index 5e7f0b6cacbc..3fc4df107c9a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class ProxyOnlyResource(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/__init__.py deleted file mode 100644 index ec9090a57df0..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._monitor_management_client import MonitorManagementClient -from ._version import VERSION - -__version__ = VERSION -__all__ = ['MonitorManagementClient'] - -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_configuration.py deleted file mode 100644 index 2f232283b850..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_configuration.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy - -from ._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials import TokenCredential - - -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - """ - - def __init__( - self, - credential: "TokenCredential", - **kwargs: Any - ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - - self.credential = credential - self.api_version = "2017-11-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs # type: Any - ): - # type: (...) -> None - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_metadata.json deleted file mode 100644 index dc6519555c3a..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_metadata.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "chosen_version": "2017-11-01-preview", - "total_api_version_list": ["2017-11-01-preview"], - "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", - "description": "Monitor Management Client.", - "host_value": "\"https://management.azure.com\"", - "parameterized_host_template": null, - "azure_arm": true, - "has_lro_operations": false, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - } - }, - "constant": { - }, - "call": "credential", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=\"https://management.azure.com\", # type: str", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: str = \"https://management.azure.com\",", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_call_sync": "ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", - "credential_call_async": "AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)", - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMChallengeAuthenticationPolicy\", \"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "metric_baseline": "MetricBaselineOperations" - } -} \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_monitor_management_client.py deleted file mode 100644 index 54b7a3e3d3f5..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_monitor_management_client.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING - -from azure.core.rest import HttpRequest, HttpResponse -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -from . import models -from ._configuration import MonitorManagementClientConfiguration -from .operations import MetricBaselineOperations - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials import TokenCredential - -class MonitorManagementClient: - """Monitor Management Client. - - :ivar metric_baseline: MetricBaselineOperations operations - :vartype metric_baseline: - $(python-base-namespace).v2017_11_01_preview.operations.MetricBaselineOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param base_url: Service URL. Default value is 'https://management.azure.com'. - :type base_url: str - """ - - def __init__( - self, - credential: "TokenCredential", - base_url: str = "https://management.azure.com", - **kwargs: Any - ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - self._serialize.client_side_validation = False - self.metric_baseline = MetricBaselineOperations(self._client, self._config, self._serialize, self._deserialize) - - - def _send_request( - self, - request, # type: HttpRequest - **kwargs: Any - ) -> HttpResponse: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse - """ - - request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> MonitorManagementClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_patch.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_patch.py deleted file mode 100644 index 74e48ecd07cf..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_patch.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# 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. -# -# -------------------------------------------------------------------------- - -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -def patch_sdk(): - pass \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_vendor.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_vendor.py deleted file mode 100644 index 138f663c53a4..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_vendor.py +++ /dev/null @@ -1,27 +0,0 @@ -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.pipeline.transport import HttpRequest - -def _convert_request(request, files=None): - data = request.content if not files else None - request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) - if files: - request.set_formdata_body(files) - return request - -def _format_url_section(template, **kwargs): - components = template.split("/") - while components: - try: - return template.format(**kwargs) - except KeyError as key: - formatted_components = template.split("/") - components = [ - c for c in formatted_components if "{}".format(key.args[0]) not in c - ] - template = "/".join(components) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_version.py deleted file mode 100644 index 47babc28d5ed..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_version.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -VERSION = "3.1.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/__init__.py deleted file mode 100644 index 4eba911f1c6e..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] - -# `._patch.py` is used for handwritten extensions to the generated code -# Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -from ._patch import patch_sdk -patch_sdk() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_configuration.py deleted file mode 100644 index b94ccd520e18..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_configuration.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, TYPE_CHECKING - -from azure.core.configuration import Configuration -from azure.core.pipeline import policies -from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy - -from .._version import VERSION - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - - -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. - - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - **kwargs: Any - ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") - - self.credential = credential - self.api_version = "2017-11-01-preview" - self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) - self._configure(**kwargs) - - def _configure( - self, - **kwargs: Any - ) -> None: - self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) - self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) - self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) - self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) - self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) - self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) - self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) - self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) - self.authentication_policy = kwargs.get('authentication_policy') - if self.credential and not self.authentication_policy: - self.authentication_policy = AsyncARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_monitor_management_client.py deleted file mode 100644 index 294998b3c92d..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_monitor_management_client.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING - -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -from .. import models -from ._configuration import MonitorManagementClientConfiguration -from .operations import MetricBaselineOperations - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -class MonitorManagementClient: - """Monitor Management Client. - - :ivar metric_baseline: MetricBaselineOperations operations - :vartype metric_baseline: - $(python-base-namespace).v2017_11_01_preview.aio.operations.MetricBaselineOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param base_url: Service URL. Default value is 'https://management.azure.com'. - :type base_url: str - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - base_url: str = "https://management.azure.com", - **kwargs: Any - ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - self._serialize.client_side_validation = False - self.metric_baseline = MetricBaselineOperations(self._client, self._config, self._serialize, self._deserialize) - - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse - """ - - request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "MonitorManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_patch.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_patch.py deleted file mode 100644 index 74e48ecd07cf..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_patch.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# 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. -# -# -------------------------------------------------------------------------- - -# This file is used for handwritten extensions to the generated code. Example: -# https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md -def patch_sdk(): - pass \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/__init__.py deleted file mode 100644 index 04cb64ccf630..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._metric_baseline_operations import MetricBaselineOperations - -__all__ = [ - 'MetricBaselineOperations', -] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/_metric_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/_metric_baseline_operations.py deleted file mode 100644 index c8caf0224f93..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/_metric_baseline_operations.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -import functools -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._metric_baseline_operations import build_calculate_baseline_request, build_get_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MetricBaselineOperations: - """MetricBaselineOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~$(python-base-namespace).v2017_11_01_preview.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace_async - async def get( - self, - resource_uri: str, - metric_name: str, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - sensitivities: Optional[str] = None, - result_type: Optional[Union[str, "_models.ResultType"]] = None, - **kwargs: Any - ) -> "_models.BaselineResponse": - """**Gets the baseline values for a specific metric**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param metric_name: The name of the metric to retrieve the baseline for. - :type metric_name: str - :param timespan: The timespan of the query. It is a string with the following format - 'startDateTime_ISO/endDateTime_ISO'. - :type timespan: str - :param interval: The interval (i.e. timegrain) of the query. - :type interval: ~datetime.timedelta - :param aggregation: The aggregation type of the metric to retrieve the baseline for. - :type aggregation: str - :param sensitivities: The list of sensitivities (comma separated) to retrieve. - :type sensitivities: str - :param result_type: Allows retrieving only metadata of the baseline. On data request all - information is retrieved. - :type result_type: str or ~$(python-base-namespace).v2017_11_01_preview.models.ResultType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_11_01_preview.models.BaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - - request = build_get_request( - resource_uri=resource_uri, - metric_name=metric_name, - timespan=timespan, - interval=interval, - aggregation=aggregation, - sensitivities=sensitivities, - result_type=result_type, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}'} # type: ignore - - - @distributed_trace_async - async def calculate_baseline( - self, - resource_uri: str, - time_series_information: "_models.TimeSeriesInformation", - **kwargs: Any - ) -> "_models.CalculateBaselineResponse": - """**Lists the baseline values for a resource**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param time_series_information: Information that need to be specified to calculate a baseline - on a time series. - :type time_series_information: - ~$(python-base-namespace).v2017_11_01_preview.models.TimeSeriesInformation - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CalculateBaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_11_01_preview.models.CalculateBaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CalculateBaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(time_series_information, 'TimeSeriesInformation') - - request = build_calculate_baseline_request( - resource_uri=resource_uri, - content_type=content_type, - json=_json, - template_url=self.calculate_baseline.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CalculateBaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - calculate_baseline.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline'} # type: ignore - diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/__init__.py deleted file mode 100644 index 5ed46c55c546..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/__init__.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._models_py3 import Baseline -from ._models_py3 import BaselineMetadataValue -from ._models_py3 import BaselineResponse -from ._models_py3 import CalculateBaselineResponse -from ._models_py3 import ErrorResponse -from ._models_py3 import LocalizableString -from ._models_py3 import TimeSeriesInformation - - -from ._monitor_management_client_enums import ( - ResultType, - Sensitivity, -) - -__all__ = [ - 'Baseline', - 'BaselineMetadataValue', - 'BaselineResponse', - 'CalculateBaselineResponse', - 'ErrorResponse', - 'LocalizableString', - 'TimeSeriesInformation', - 'ResultType', - 'Sensitivity', -] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models_py3.py deleted file mode 100644 index ddf9d5c536cf..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models_py3.py +++ /dev/null @@ -1,355 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import List, Optional, Union - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - -from ._monitor_management_client_enums import * - - -class Baseline(msrest.serialization.Model): - """The baseline values for a single sensitivity value. - - All required parameters must be populated in order to send to Azure. - - :ivar sensitivity: Required. the sensitivity of the baseline. Possible values include: "Low", - "Medium", "High". - :vartype sensitivity: str or ~$(python-base-namespace).v2017_11_01_preview.models.Sensitivity - :ivar low_thresholds: Required. The low thresholds of the baseline. - :vartype low_thresholds: list[float] - :ivar high_thresholds: Required. The high thresholds of the baseline. - :vartype high_thresholds: list[float] - :ivar timestamps: the array of timestamps of the baselines. - :vartype timestamps: list[~datetime.datetime] - """ - - _validation = { - 'sensitivity': {'required': True}, - 'low_thresholds': {'required': True}, - 'high_thresholds': {'required': True}, - } - - _attribute_map = { - 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, - 'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, - 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, - 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, - } - - def __init__( - self, - *, - sensitivity: Union[str, "Sensitivity"], - low_thresholds: List[float], - high_thresholds: List[float], - timestamps: Optional[List[datetime.datetime]] = None, - **kwargs - ): - """ - :keyword sensitivity: Required. the sensitivity of the baseline. Possible values include: - "Low", "Medium", "High". - :paramtype sensitivity: str or ~$(python-base-namespace).v2017_11_01_preview.models.Sensitivity - :keyword low_thresholds: Required. The low thresholds of the baseline. - :paramtype low_thresholds: list[float] - :keyword high_thresholds: Required. The high thresholds of the baseline. - :paramtype high_thresholds: list[float] - :keyword timestamps: the array of timestamps of the baselines. - :paramtype timestamps: list[~datetime.datetime] - """ - super(Baseline, self).__init__(**kwargs) - self.sensitivity = sensitivity - self.low_thresholds = low_thresholds - self.high_thresholds = high_thresholds - self.timestamps = timestamps - - -class BaselineMetadataValue(msrest.serialization.Model): - """Represents a baseline metadata value. - - :ivar name: the name of the metadata. - :vartype name: ~$(python-base-namespace).v2017_11_01_preview.models.LocalizableString - :ivar value: the value of the metadata. - :vartype value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'LocalizableString'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional["LocalizableString"] = None, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword name: the name of the metadata. - :paramtype name: ~$(python-base-namespace).v2017_11_01_preview.models.LocalizableString - :keyword value: the value of the metadata. - :paramtype value: str - """ - super(BaselineMetadataValue, self).__init__(**kwargs) - self.name = name - self.value = value - - -class BaselineResponse(msrest.serialization.Model): - """The response to a baseline query. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: the metric baseline Id. - :vartype id: str - :ivar type: the resource type of the baseline resource. - :vartype type: str - :ivar name: the name and the display name of the metric, i.e. it is localizable string. - :vartype name: ~$(python-base-namespace).v2017_11_01_preview.models.LocalizableString - :ivar timespan: The timespan for which the data was retrieved. Its value consists of two - datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back - from what was originally requested. - :vartype timespan: str - :ivar interval: The interval (window size) for which the metric data was returned in. This may - be adjusted in the future and returned back from what was originally requested. This is not - present if a metadata request was made. - :vartype interval: ~datetime.timedelta - :ivar aggregation: The aggregation type of the metric. - :vartype aggregation: str - :ivar timestamps: the array of timestamps of the baselines. - :vartype timestamps: list[~datetime.datetime] - :ivar baseline: the baseline values for each sensitivity. - :vartype baseline: list[~$(python-base-namespace).v2017_11_01_preview.models.Baseline] - :ivar metadata: the baseline metadata values. - :vartype metadata: - list[~$(python-base-namespace).v2017_11_01_preview.models.BaselineMetadataValue] - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'LocalizableString'}, - 'timespan': {'key': 'properties.timespan', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'duration'}, - 'aggregation': {'key': 'properties.aggregation', 'type': 'str'}, - 'timestamps': {'key': 'properties.timestamps', 'type': '[iso-8601]'}, - 'baseline': {'key': 'properties.baseline', 'type': '[Baseline]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[BaselineMetadataValue]'}, - } - - def __init__( - self, - *, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - timestamps: Optional[List[datetime.datetime]] = None, - baseline: Optional[List["Baseline"]] = None, - metadata: Optional[List["BaselineMetadataValue"]] = None, - **kwargs - ): - """ - :keyword timespan: The timespan for which the data was retrieved. Its value consists of two - datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back - from what was originally requested. - :paramtype timespan: str - :keyword interval: The interval (window size) for which the metric data was returned in. This - may be adjusted in the future and returned back from what was originally requested. This is - not present if a metadata request was made. - :paramtype interval: ~datetime.timedelta - :keyword aggregation: The aggregation type of the metric. - :paramtype aggregation: str - :keyword timestamps: the array of timestamps of the baselines. - :paramtype timestamps: list[~datetime.datetime] - :keyword baseline: the baseline values for each sensitivity. - :paramtype baseline: list[~$(python-base-namespace).v2017_11_01_preview.models.Baseline] - :keyword metadata: the baseline metadata values. - :paramtype metadata: - list[~$(python-base-namespace).v2017_11_01_preview.models.BaselineMetadataValue] - """ - super(BaselineResponse, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None - self.timespan = timespan - self.interval = interval - self.aggregation = aggregation - self.timestamps = timestamps - self.baseline = baseline - self.metadata = metadata - - -class CalculateBaselineResponse(msrest.serialization.Model): - """The response to a calculate baseline call. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. the resource type of the baseline resource. - :vartype type: str - :ivar timestamps: the array of timestamps of the baselines. - :vartype timestamps: list[~datetime.datetime] - :ivar baseline: Required. the baseline values for each sensitivity. - :vartype baseline: list[~$(python-base-namespace).v2017_11_01_preview.models.Baseline] - """ - - _validation = { - 'type': {'required': True}, - 'baseline': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, - 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, - } - - def __init__( - self, - *, - type: str, - baseline: List["Baseline"], - timestamps: Optional[List[datetime.datetime]] = None, - **kwargs - ): - """ - :keyword type: Required. the resource type of the baseline resource. - :paramtype type: str - :keyword timestamps: the array of timestamps of the baselines. - :paramtype timestamps: list[~datetime.datetime] - :keyword baseline: Required. the baseline values for each sensitivity. - :paramtype baseline: list[~$(python-base-namespace).v2017_11_01_preview.models.Baseline] - """ - super(CalculateBaselineResponse, self).__init__(**kwargs) - self.type = type - self.timestamps = timestamps - self.baseline = baseline - - -class ErrorResponse(msrest.serialization.Model): - """Describes the format of Error response. - - :ivar code: Error code. - :vartype code: str - :ivar message: Error message indicating why the operation failed. - :vartype message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): - """ - :keyword code: Error code. - :paramtype code: str - :keyword message: Error message indicating why the operation failed. - :paramtype message: str - """ - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -class LocalizableString(msrest.serialization.Model): - """The localizable string class. - - All required parameters must be populated in order to send to Azure. - - :ivar value: Required. the invariant value. - :vartype value: str - :ivar localized_value: the locale specific value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__( - self, - *, - value: str, - localized_value: Optional[str] = None, - **kwargs - ): - """ - :keyword value: Required. the invariant value. - :paramtype value: str - :keyword localized_value: the locale specific value. - :paramtype localized_value: str - """ - super(LocalizableString, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class TimeSeriesInformation(msrest.serialization.Model): - """The time series info needed for calculating the baseline. - - All required parameters must be populated in order to send to Azure. - - :ivar sensitivities: Required. the list of sensitivities for calculating the baseline. - :vartype sensitivities: list[str] - :ivar values: Required. The metric values to calculate the baseline. - :vartype values: list[float] - :ivar timestamps: the array of timestamps of the baselines. - :vartype timestamps: list[~datetime.datetime] - """ - - _validation = { - 'sensitivities': {'required': True}, - 'values': {'required': True}, - } - - _attribute_map = { - 'sensitivities': {'key': 'sensitivities', 'type': '[str]'}, - 'values': {'key': 'values', 'type': '[float]'}, - 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, - } - - def __init__( - self, - *, - sensitivities: List[str], - values: List[float], - timestamps: Optional[List[datetime.datetime]] = None, - **kwargs - ): - """ - :keyword sensitivities: Required. the list of sensitivities for calculating the baseline. - :paramtype sensitivities: list[str] - :keyword values: Required. The metric values to calculate the baseline. - :paramtype values: list[float] - :keyword timestamps: the array of timestamps of the baselines. - :paramtype timestamps: list[~datetime.datetime] - """ - super(TimeSeriesInformation, self).__init__(**kwargs) - self.sensitivities = sensitivities - self.values = values - self.timestamps = timestamps diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/__init__.py deleted file mode 100644 index 04cb64ccf630..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._metric_baseline_operations import MetricBaselineOperations - -__all__ = [ - 'MetricBaselineOperations', -] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/_metric_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/_metric_baseline_operations.py deleted file mode 100644 index 872dfcde5bca..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/_metric_baseline_operations.py +++ /dev/null @@ -1,274 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -import functools -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_get_request( - resource_uri: str, - metric_name: str, - *, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - sensitivities: Optional[str] = None, - result_type: Optional[Union[str, "_models.ResultType"]] = None, - **kwargs: Any -) -> HttpRequest: - api_version = "2017-11-01-preview" - accept = "application/json" - # Construct URL - url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}') - path_format_arguments = { - "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), - "metricName": _SERIALIZER.url("metric_name", metric_name, 'str'), - } - - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if timespan is not None: - query_parameters['timespan'] = _SERIALIZER.query("timespan", timespan, 'str') - if interval is not None: - query_parameters['interval'] = _SERIALIZER.query("interval", interval, 'duration') - if aggregation is not None: - query_parameters['aggregation'] = _SERIALIZER.query("aggregation", aggregation, 'str') - if sensitivities is not None: - query_parameters['sensitivities'] = _SERIALIZER.query("sensitivities", sensitivities, 'str') - if result_type is not None: - query_parameters['resultType'] = _SERIALIZER.query("result_type", result_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) - - -def build_calculate_baseline_request( - resource_uri: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - api_version = "2017-11-01-preview" - accept = "application/json" - # Construct URL - url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline') - path_format_arguments = { - "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), - } - - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - json=json, - content=content, - **kwargs - ) - -class MetricBaselineOperations(object): - """MetricBaselineOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~$(python-base-namespace).v2017_11_01_preview.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def get( - self, - resource_uri: str, - metric_name: str, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - sensitivities: Optional[str] = None, - result_type: Optional[Union[str, "_models.ResultType"]] = None, - **kwargs: Any - ) -> "_models.BaselineResponse": - """**Gets the baseline values for a specific metric**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param metric_name: The name of the metric to retrieve the baseline for. - :type metric_name: str - :param timespan: The timespan of the query. It is a string with the following format - 'startDateTime_ISO/endDateTime_ISO'. - :type timespan: str - :param interval: The interval (i.e. timegrain) of the query. - :type interval: ~datetime.timedelta - :param aggregation: The aggregation type of the metric to retrieve the baseline for. - :type aggregation: str - :param sensitivities: The list of sensitivities (comma separated) to retrieve. - :type sensitivities: str - :param result_type: Allows retrieving only metadata of the baseline. On data request all - information is retrieved. - :type result_type: str or ~$(python-base-namespace).v2017_11_01_preview.models.ResultType - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_11_01_preview.models.BaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - - request = build_get_request( - resource_uri=resource_uri, - metric_name=metric_name, - timespan=timespan, - interval=interval, - aggregation=aggregation, - sensitivities=sensitivities, - result_type=result_type, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}'} # type: ignore - - - @distributed_trace - def calculate_baseline( - self, - resource_uri: str, - time_series_information: "_models.TimeSeriesInformation", - **kwargs: Any - ) -> "_models.CalculateBaselineResponse": - """**Lists the baseline values for a resource**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param time_series_information: Information that need to be specified to calculate a baseline - on a time series. - :type time_series_information: - ~$(python-base-namespace).v2017_11_01_preview.models.TimeSeriesInformation - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CalculateBaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_11_01_preview.models.CalculateBaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CalculateBaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(time_series_information, 'TimeSeriesInformation') - - request = build_calculate_baseline_request( - resource_uri=resource_uri, - content_type=content_type, - json=_json, - template_url=self.calculate_baseline.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CalculateBaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - calculate_baseline.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline'} # type: ignore - diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/py.typed b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/py.typed deleted file mode 100644 index e5aff4f83af8..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/py.typed +++ /dev/null @@ -1 +0,0 @@ -# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py index e6aeff663d71..74f797f5584e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "TokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_metadata.json index 18bc077c7cd8..40efc0b9658a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2017-12-01-preview", "total_api_version_list": ["2017-12-01-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_client.py index c477802680d4..942b95c79b9b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import MetricNamespacesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar metric_namespaces: MetricNamespacesOperations operations @@ -39,7 +39,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -80,7 +80,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py index cf4b6135bb51..5134c4308e69 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "AsyncTokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_client.py index da77ac77c9fa..c9ae3d1a7bc8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import MetricNamespacesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar metric_namespaces: MetricNamespacesOperations operations @@ -39,7 +39,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -78,7 +78,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/__init__.py index ba000c367032..14c6117bdfaf 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/__init__.py @@ -12,7 +12,7 @@ from ._models_py3 import MetricNamespaceName -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( NamespaceClassification, ) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models_py3.py index 92439e54e50b..b73136dde18f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models_py3.py @@ -11,7 +11,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class ErrorResponse(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py index 140c72aa1b0c..ef336a800798 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "TokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_metadata.json index 99fa18757f37..756a30ac287a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2018-01-01", "total_api_version_list": ["2018-01-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_client.py index a539766bbfaa..2bf61485151f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import MetricDefinitionsOperations, MetricsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar metric_definitions: MetricDefinitionsOperations operations @@ -41,7 +41,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -83,7 +83,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py index cffdc2d34b31..c0c3b04ed0e0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "AsyncTokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_client.py index 11c57b3a714a..963942c62db7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import MetricDefinitionsOperations, MetricsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar metric_definitions: MetricDefinitionsOperations operations @@ -41,7 +41,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -81,7 +81,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/__init__.py index cb58f8a05df3..cca644143db3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/__init__.py @@ -18,7 +18,7 @@ from ._models_py3 import TimeSeriesElement -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( AggregationType, MetricClass, MetricUnit, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py index f7a0b02333a9..0578ecf82903 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class ErrorResponse(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py index 02f3bff47a57..77fc14a20b12 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_metadata.json index 29e4460a8b75..bf812c58c063 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2018-03-01", "total_api_version_list": ["2018-03-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_client.py index 0096c6fd0b18..0dae421f017a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations, MetricAlertsOperations, MetricAlertsStatusOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -46,7 +46,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -89,7 +89,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py index f68f113b2fde..33ba36ddfffd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_client.py index 42cd3189dd06..39fc0d5181ae 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations, MetricAlertsOperations, MetricAlertsStatusOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -48,7 +48,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -89,7 +89,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/__init__.py index 83660d376814..43860782902d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/__init__.py @@ -39,7 +39,7 @@ from ._models_py3 import WebtestLocationAvailabilityCriteria -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( AggregationTypeEnum, CriterionType, DynamicThresholdOperator, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py index 2c3669778fdb..3b908eae36d1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class ActionGroupList(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py index 6fb25c5332d8..13fb9a87575f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_metadata.json index 14e0dd203124..944b824f954e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2018-04-16", "total_api_version_list": ["2018-04-16"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_client.py index e41f47416657..7f371fe916a2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ScheduledQueryRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -83,7 +83,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py index 8af9a49138cd..3178b8870a6d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_client.py index c73fd5d4fc0e..7c89fd2fea2e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ScheduledQueryRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -81,7 +81,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/__init__.py index 7e948df4f724..c0238fbe4f18 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/__init__.py @@ -24,7 +24,7 @@ from ._models_py3 import TriggerCondition -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( AlertSeverity, ConditionalOperator, Enabled, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models_py3.py index f4941e6938ed..4f55b25bc8a0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models_py3.py @@ -11,7 +11,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class Action(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py index cc2cd2e5d57c..75c7c5da6a28 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_metadata.json index 5aeafd91a05d..06416f747839 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2018-06-01-preview", "total_api_version_list": ["2018-06-01-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_client.py index f0184e69c831..19fe4c0401b6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import GuestDiagnosticsSettingsAssociationOperations, GuestDiagnosticsSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar guest_diagnostics_settings_association: GuestDiagnosticsSettingsAssociationOperations @@ -46,7 +46,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -88,7 +88,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py index f4bfd2172596..3cadf772b859 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_client.py index 6a2eb35ec8f3..497ea06f18e8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import GuestDiagnosticsSettingsAssociationOperations, GuestDiagnosticsSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar guest_diagnostics_settings_association: GuestDiagnosticsSettingsAssociationOperations @@ -46,7 +46,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -86,7 +86,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/__init__.py index fc0647fb2952..93bb136ddd56 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/__init__.py @@ -23,7 +23,7 @@ from ._models_py3 import SinkConfiguration -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( DataSourceKind, GuestDiagnosticSettingsOsType, SinkConfigurationKind, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models_py3.py index dffaff76a32f..7803332f3624 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models_py3.py @@ -11,7 +11,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class DataSource(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py index 58852411de43..6d7ab6b2da12 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_metadata.json index 55a9c50840f2..219785e57617 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2018-09-01", "total_api_version_list": ["2018-09-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -97,8 +97,6 @@ "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\", \"AsyncARMChallengeAuthenticationPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { - "action_groups": "ActionGroupsOperations", - "metric_baseline": "MetricBaselineOperations", - "baseline": "BaselineOperations" + "action_groups": "ActionGroupsOperations" } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_client.py new file mode 100644 index 000000000000..93ede060e4f9 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_client.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.rest import HttpRequest, HttpResponse +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +from . import models +from ._configuration import MonitorClientConfiguration +from .operations import ActionGroupsOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential + +class MonitorClient: + """Monitor Management Client. + + :ivar action_groups: ActionGroupsOperations operations + :vartype action_groups: $(python-base-namespace).v2018_09_01.operations.ActionGroupsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + """ + + def __init__( + self, + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.action_groups = ActionGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request, # type: HttpRequest + **kwargs: Any + ) -> HttpResponse: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> MonitorClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_management_client.py deleted file mode 100644 index ac4a74437887..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_management_client.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, Optional, TYPE_CHECKING - -from azure.core.rest import HttpRequest, HttpResponse -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -from . import models -from ._configuration import MonitorManagementClientConfiguration -from .operations import ActionGroupsOperations, BaselineOperations, MetricBaselineOperations - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials import TokenCredential - -class MonitorManagementClient: - """Monitor Management Client. - - :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2018_09_01.operations.ActionGroupsOperations - :ivar metric_baseline: MetricBaselineOperations operations - :vartype metric_baseline: - $(python-base-namespace).v2018_09_01.operations.MetricBaselineOperations - :ivar baseline: BaselineOperations operations - :vartype baseline: $(python-base-namespace).v2018_09_01.operations.BaselineOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param base_url: Service URL. Default value is 'https://management.azure.com'. - :type base_url: str - """ - - def __init__( - self, - credential: "TokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any - ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - self._serialize.client_side_validation = False - self.action_groups = ActionGroupsOperations(self._client, self._config, self._serialize, self._deserialize) - self.metric_baseline = MetricBaselineOperations(self._client, self._config, self._serialize, self._deserialize) - self.baseline = BaselineOperations(self._client, self._config, self._serialize, self._deserialize) - - - def _send_request( - self, - request, # type: HttpRequest - **kwargs: Any - ) -> HttpResponse: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.HttpResponse - """ - - request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> MonitorManagementClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py index 3149ad11a362..099975af368c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_client.py new file mode 100644 index 000000000000..d9fac7fb1d0d --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_client.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, Optional, TYPE_CHECKING + +from azure.core.rest import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +from .. import models +from ._configuration import MonitorClientConfiguration +from .operations import ActionGroupsOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +class MonitorClient: + """Monitor Management Client. + + :ivar action_groups: ActionGroupsOperations operations + :vartype action_groups: + $(python-base-namespace).v2018_09_01.aio.operations.ActionGroupsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param base_url: Service URL. Default value is 'https://management.azure.com'. + :type base_url: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.action_groups = ActionGroupsOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + request_copy.url = self._client.format_url(request_copy.url) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "MonitorClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_management_client.py deleted file mode 100644 index 13df9dc4d055..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_management_client.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from copy import deepcopy -from typing import Any, Awaitable, Optional, TYPE_CHECKING - -from azure.core.rest import AsyncHttpResponse, HttpRequest -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -from .. import models -from ._configuration import MonitorManagementClientConfiguration -from .operations import ActionGroupsOperations, BaselineOperations, MetricBaselineOperations - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -class MonitorManagementClient: - """Monitor Management Client. - - :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2018_09_01.aio.operations.ActionGroupsOperations - :ivar metric_baseline: MetricBaselineOperations operations - :vartype metric_baseline: - $(python-base-namespace).v2018_09_01.aio.operations.MetricBaselineOperations - :ivar baseline: BaselineOperations operations - :vartype baseline: $(python-base-namespace).v2018_09_01.aio.operations.BaselineOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The ID of the target subscription. - :type subscription_id: str - :param base_url: Service URL. Default value is 'https://management.azure.com'. - :type base_url: str - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: str = "https://management.azure.com", - **kwargs: Any - ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - self._serialize.client_side_validation = False - self.action_groups = ActionGroupsOperations(self._client, self._config, self._serialize, self._deserialize) - self.metric_baseline = MetricBaselineOperations(self._client, self._config, self._serialize, self._deserialize) - self.baseline = BaselineOperations(self._client, self._config, self._serialize, self._deserialize) - - - def _send_request( - self, - request: HttpRequest, - **kwargs: Any - ) -> Awaitable[AsyncHttpResponse]: - """Runs the network request through the client's chained policies. - - >>> from azure.core.rest import HttpRequest - >>> request = HttpRequest("GET", "https://www.example.org/") - - >>> response = await client._send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - - :param request: The network request you want to make. Required. - :type request: ~azure.core.rest.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.rest.AsyncHttpResponse - """ - - request_copy = deepcopy(request) - request_copy.url = self._client.format_url(request_copy.url) - return self._client.send_request(request_copy, **kwargs) - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "MonitorManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/__init__.py index 636f48f0362a..dc488c51fcad 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/__init__.py @@ -7,11 +7,7 @@ # -------------------------------------------------------------------------- from ._action_groups_operations import ActionGroupsOperations -from ._metric_baseline_operations import MetricBaselineOperations -from ._baseline_operations import BaselineOperations __all__ = [ 'ActionGroupsOperations', - 'MetricBaselineOperations', - 'BaselineOperations', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baseline_operations.py deleted file mode 100644 index 13ea4d73c051..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baseline_operations.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -import functools -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._baseline_operations import build_get_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class BaselineOperations: - """BaselineOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~$(python-base-namespace).v2018_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace_async - async def get( - self, - resource_uri: str, - metricnames: Optional[str] = None, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - sensitivities: Optional[str] = None, - result_type: Optional[Union[str, "_models.ResultType"]] = None, - metricnamespace: Optional[str] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> "_models.BaselineResponse": - """**Gets the baseline values for a resource**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param metricnames: The names of the metrics (comma separated) to retrieve. Special case: If a - metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be - **'Metric%2Name1'**. - :type metricnames: str - :param timespan: The timespan of the query. It is a string with the following format - 'startDateTime_ISO/endDateTime_ISO'. - :type timespan: str - :param interval: The interval (i.e. timegrain) of the query. - :type interval: ~datetime.timedelta - :param aggregation: The aggregation type of the metric to retrieve the baseline for. - :type aggregation: str - :param sensitivities: The list of sensitivities (comma separated) to retrieve. - :type sensitivities: str - :param result_type: Allows retrieving only metadata of the baseline. On data request all - information is retrieved. - :type result_type: str or ~$(python-base-namespace).v2018_09_01.models.ResultType - :param metricnamespace: Metric namespace to query metric definitions for. - :type metricnamespace: str - :param filter: The **$filter** is used to describe a set of dimensions with their concrete - values which produce a specific metric's time series, in which a baseline is requested for. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.BaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - - request = build_get_request( - resource_uri=resource_uri, - metricnames=metricnames, - timespan=timespan, - interval=interval, - aggregation=aggregation, - sensitivities=sensitivities, - result_type=result_type, - metricnamespace=metricnamespace, - filter=filter, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline'} # type: ignore - diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_metric_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_metric_baseline_operations.py deleted file mode 100644 index 2837800f421e..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_metric_baseline_operations.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -import functools -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator_async import distributed_trace_async -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models -from ..._vendor import _convert_request -from ...operations._metric_baseline_operations import build_calculate_baseline_request, build_get_request -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class MetricBaselineOperations: - """MetricBaselineOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~$(python-base-namespace).v2018_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace_async - async def get( - self, - resource_uri: str, - metric_name: str, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - sensitivities: Optional[str] = None, - result_type: Optional[Union[str, "_models.ResultType"]] = None, - metricnamespace: Optional[str] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> "_models.BaselineResponse": - """**Gets the baseline values for a specific metric**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param metric_name: The name of the metric to retrieve the baseline for. - :type metric_name: str - :param timespan: The timespan of the query. It is a string with the following format - 'startDateTime_ISO/endDateTime_ISO'. - :type timespan: str - :param interval: The interval (i.e. timegrain) of the query. - :type interval: ~datetime.timedelta - :param aggregation: The aggregation type of the metric to retrieve the baseline for. - :type aggregation: str - :param sensitivities: The list of sensitivities (comma separated) to retrieve. - :type sensitivities: str - :param result_type: Allows retrieving only metadata of the baseline. On data request all - information is retrieved. - :type result_type: str or ~$(python-base-namespace).v2018_09_01.models.ResultType - :param metricnamespace: Metric namespace to query metric definitions for. - :type metricnamespace: str - :param filter: The **$filter** is used to describe a set of dimensions with their concrete - values which produce a specific metric's time series, in which a baseline is requested for. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.BaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - - request = build_get_request( - resource_uri=resource_uri, - metric_name=metric_name, - timespan=timespan, - interval=interval, - aggregation=aggregation, - sensitivities=sensitivities, - result_type=result_type, - metricnamespace=metricnamespace, - filter=filter, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}'} # type: ignore - - - @distributed_trace_async - async def calculate_baseline( - self, - resource_uri: str, - time_series_information: "_models.TimeSeriesInformation", - **kwargs: Any - ) -> "_models.CalculateBaselineResponse": - """**Lists the baseline values for a resource**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param time_series_information: Information that need to be specified to calculate a baseline - on a time series. - :type time_series_information: - ~$(python-base-namespace).v2018_09_01.models.TimeSeriesInformation - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CalculateBaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.CalculateBaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CalculateBaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(time_series_information, 'TimeSeriesInformation') - - request = build_calculate_baseline_request( - resource_uri=resource_uri, - content_type=content_type, - json=_json, - template_url=self.calculate_baseline.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CalculateBaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - calculate_baseline.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline'} # type: ignore - diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/__init__.py index ea8c1f240a93..d72ce2375434 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/__init__.py @@ -13,30 +13,19 @@ from ._models_py3 import AutomationRunbookReceiver from ._models_py3 import AzureAppPushReceiver from ._models_py3 import AzureFunctionReceiver -from ._models_py3 import Baseline -from ._models_py3 import BaselineMetadataValue -from ._models_py3 import BaselineResponse -from ._models_py3 import CalculateBaselineResponse -from ._models_py3 import CalculateBaselineResponseStatistics from ._models_py3 import EmailReceiver from ._models_py3 import EnableRequest from ._models_py3 import ErrorResponse from ._models_py3 import ItsmReceiver -from ._models_py3 import LocalizableString from ._models_py3 import LogicAppReceiver from ._models_py3 import Resource from ._models_py3 import SmsReceiver -from ._models_py3 import TimeSeriesInformation from ._models_py3 import VoiceReceiver from ._models_py3 import WebhookReceiver -from ._monitor_management_client_enums import ( - ErrorType, - PredictionResultType, +from ._monitor_client_enums import ( ReceiverStatus, - ResultType, - Sensitivity, ) __all__ = [ @@ -47,25 +36,14 @@ 'AutomationRunbookReceiver', 'AzureAppPushReceiver', 'AzureFunctionReceiver', - 'Baseline', - 'BaselineMetadataValue', - 'BaselineResponse', - 'CalculateBaselineResponse', - 'CalculateBaselineResponseStatistics', 'EmailReceiver', 'EnableRequest', 'ErrorResponse', 'ItsmReceiver', - 'LocalizableString', 'LogicAppReceiver', 'Resource', 'SmsReceiver', - 'TimeSeriesInformation', 'VoiceReceiver', 'WebhookReceiver', - 'ErrorType', - 'PredictionResultType', 'ReceiverStatus', - 'ResultType', - 'Sensitivity', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models_py3.py index 6f09b8bfb067..80b51029621e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models_py3.py @@ -6,14 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import datetime -from typing import Dict, List, Optional, Union +from typing import Dict, List, Optional from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * - class ActionGroupList(msrest.serialization.Model): """A list of action groups. @@ -503,337 +500,6 @@ def __init__( self.http_trigger_url = http_trigger_url -class Baseline(msrest.serialization.Model): - """The baseline values for a single sensitivity value. - - All required parameters must be populated in order to send to Azure. - - :ivar sensitivity: Required. The sensitivity of the baseline. Possible values include: "Low", - "Medium", "High". - :vartype sensitivity: str or ~$(python-base-namespace).v2018_09_01.models.Sensitivity - :ivar low_thresholds: Required. The low thresholds of the baseline. - :vartype low_thresholds: list[float] - :ivar high_thresholds: Required. The high thresholds of the baseline. - :vartype high_thresholds: list[float] - :ivar timestamps: the array of timestamps of the baselines. - :vartype timestamps: list[~datetime.datetime] - :ivar prediction_result_type: The prediction result type of the baseline. Possible values - include: 0, 1, 2. - :vartype prediction_result_type: int or - ~$(python-base-namespace).v2018_09_01.models.PredictionResultType - :ivar error_type: The error type of the baseline. Possible values include: 0, 1, 2, 3, 4, 100, - 200. - :vartype error_type: int or ~$(python-base-namespace).v2018_09_01.models.ErrorType - """ - - _validation = { - 'sensitivity': {'required': True}, - 'low_thresholds': {'required': True}, - 'high_thresholds': {'required': True}, - } - - _attribute_map = { - 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, - 'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, - 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, - 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, - 'prediction_result_type': {'key': 'PredictionResultType', 'type': 'int'}, - 'error_type': {'key': 'ErrorType', 'type': 'int'}, - } - - def __init__( - self, - *, - sensitivity: Union[str, "Sensitivity"], - low_thresholds: List[float], - high_thresholds: List[float], - timestamps: Optional[List[datetime.datetime]] = None, - prediction_result_type: Optional[Union[int, "PredictionResultType"]] = None, - error_type: Optional[Union[int, "ErrorType"]] = None, - **kwargs - ): - """ - :keyword sensitivity: Required. The sensitivity of the baseline. Possible values include: - "Low", "Medium", "High". - :paramtype sensitivity: str or ~$(python-base-namespace).v2018_09_01.models.Sensitivity - :keyword low_thresholds: Required. The low thresholds of the baseline. - :paramtype low_thresholds: list[float] - :keyword high_thresholds: Required. The high thresholds of the baseline. - :paramtype high_thresholds: list[float] - :keyword timestamps: the array of timestamps of the baselines. - :paramtype timestamps: list[~datetime.datetime] - :keyword prediction_result_type: The prediction result type of the baseline. Possible values - include: 0, 1, 2. - :paramtype prediction_result_type: int or - ~$(python-base-namespace).v2018_09_01.models.PredictionResultType - :keyword error_type: The error type of the baseline. Possible values include: 0, 1, 2, 3, 4, - 100, 200. - :paramtype error_type: int or ~$(python-base-namespace).v2018_09_01.models.ErrorType - """ - super(Baseline, self).__init__(**kwargs) - self.sensitivity = sensitivity - self.low_thresholds = low_thresholds - self.high_thresholds = high_thresholds - self.timestamps = timestamps - self.prediction_result_type = prediction_result_type - self.error_type = error_type - - -class BaselineMetadataValue(msrest.serialization.Model): - """Represents a baseline metadata value. - - :ivar name: The name of the metadata. - :vartype name: ~$(python-base-namespace).v2018_09_01.models.LocalizableString - :ivar value: The value of the metadata. - :vartype value: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'LocalizableString'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional["LocalizableString"] = None, - value: Optional[str] = None, - **kwargs - ): - """ - :keyword name: The name of the metadata. - :paramtype name: ~$(python-base-namespace).v2018_09_01.models.LocalizableString - :keyword value: The value of the metadata. - :paramtype value: str - """ - super(BaselineMetadataValue, self).__init__(**kwargs) - self.name = name - self.value = value - - -class BaselineResponse(msrest.serialization.Model): - """The response to a baseline query. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The metric baseline ID. - :vartype id: str - :ivar type: The resource type of the baseline resource. - :vartype type: str - :ivar name: The name and the display name of the metric, i.e. it is localizable string. - :vartype name: ~$(python-base-namespace).v2018_09_01.models.LocalizableString - :ivar timestamps: The array of timestamps of the baselines. - :vartype timestamps: list[~datetime.datetime] - :ivar baseline: The baseline values for each sensitivity. - :vartype baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] - :ivar metdata: The baseline metadata values. - :vartype metdata: list[~$(python-base-namespace).v2018_09_01.models.BaselineMetadataValue] - :ivar prediction_result_type: The prediction result type of the baseline. Possible values - include: 0, 1, 2. - :vartype prediction_result_type: int or - ~$(python-base-namespace).v2018_09_01.models.PredictionResultType - :ivar error_type: The error type of the baseline. Possible values include: 0, 1, 2, 3, 4, 100, - 200. - :vartype error_type: int or ~$(python-base-namespace).v2018_09_01.models.ErrorType - :ivar timespan: The timespan for which the data was retrieved. Its value consists of two - datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back - from what was originally requested. - :vartype timespan: str - :ivar interval: The interval (window size) for which the metric data was returned in. This may - be adjusted in the future and returned back from what was originally requested. This is not - present if a metadata request was made. - :vartype interval: ~datetime.timedelta - :ivar aggregation: The aggregation type of the metric. - :vartype aggregation: str - :ivar internal_operation_id: internal operation id. - :vartype internal_operation_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'type': {'readonly': True}, - 'name': {'readonly': True}, - 'internal_operation_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'LocalizableString'}, - 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, - 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, - 'metdata': {'key': 'metdata', 'type': '[BaselineMetadataValue]'}, - 'prediction_result_type': {'key': 'predictionResultType', 'type': 'int'}, - 'error_type': {'key': 'errorType', 'type': 'int'}, - 'timespan': {'key': 'properties.timespan', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'duration'}, - 'aggregation': {'key': 'properties.aggregation', 'type': 'str'}, - 'internal_operation_id': {'key': 'properties.internalOperationId', 'type': 'str'}, - } - - def __init__( - self, - *, - timestamps: Optional[List[datetime.datetime]] = None, - baseline: Optional[List["Baseline"]] = None, - metdata: Optional[List["BaselineMetadataValue"]] = None, - prediction_result_type: Optional[Union[int, "PredictionResultType"]] = None, - error_type: Optional[Union[int, "ErrorType"]] = None, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - **kwargs - ): - """ - :keyword timestamps: The array of timestamps of the baselines. - :paramtype timestamps: list[~datetime.datetime] - :keyword baseline: The baseline values for each sensitivity. - :paramtype baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] - :keyword metdata: The baseline metadata values. - :paramtype metdata: list[~$(python-base-namespace).v2018_09_01.models.BaselineMetadataValue] - :keyword prediction_result_type: The prediction result type of the baseline. Possible values - include: 0, 1, 2. - :paramtype prediction_result_type: int or - ~$(python-base-namespace).v2018_09_01.models.PredictionResultType - :keyword error_type: The error type of the baseline. Possible values include: 0, 1, 2, 3, 4, - 100, 200. - :paramtype error_type: int or ~$(python-base-namespace).v2018_09_01.models.ErrorType - :keyword timespan: The timespan for which the data was retrieved. Its value consists of two - datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back - from what was originally requested. - :paramtype timespan: str - :keyword interval: The interval (window size) for which the metric data was returned in. This - may be adjusted in the future and returned back from what was originally requested. This is - not present if a metadata request was made. - :paramtype interval: ~datetime.timedelta - :keyword aggregation: The aggregation type of the metric. - :paramtype aggregation: str - """ - super(BaselineResponse, self).__init__(**kwargs) - self.id = None - self.type = None - self.name = None - self.timestamps = timestamps - self.baseline = baseline - self.metdata = metdata - self.prediction_result_type = prediction_result_type - self.error_type = error_type - self.timespan = timespan - self.interval = interval - self.aggregation = aggregation - self.internal_operation_id = None - - -class CalculateBaselineResponse(msrest.serialization.Model): - """The response to a calculate baseline call. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar type: Required. The resource type of the baseline resource. - :vartype type: str - :ivar timestamps: The array of timestamps of the baselines. - :vartype timestamps: list[~datetime.datetime] - :ivar baseline: Required. The baseline values for each sensitivity. - :vartype baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] - :ivar statistics: The statistics. - :vartype statistics: - ~$(python-base-namespace).v2018_09_01.models.CalculateBaselineResponseStatistics - :ivar internal_operation_id: internal operation id. - :vartype internal_operation_id: str - :ivar error_type: The error type for calculating the baseline. Possible values include: 0, 1, - 2, 3, 4, 100, 200. - :vartype error_type: int or ~$(python-base-namespace).v2018_09_01.models.ErrorType - """ - - _validation = { - 'type': {'required': True}, - 'baseline': {'required': True}, - 'internal_operation_id': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, - 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, - 'statistics': {'key': 'statistics', 'type': 'CalculateBaselineResponseStatistics'}, - 'internal_operation_id': {'key': 'internalOperationId', 'type': 'str'}, - 'error_type': {'key': 'errorType', 'type': 'int'}, - } - - def __init__( - self, - *, - type: str, - baseline: List["Baseline"], - timestamps: Optional[List[datetime.datetime]] = None, - statistics: Optional["CalculateBaselineResponseStatistics"] = None, - error_type: Optional[Union[int, "ErrorType"]] = None, - **kwargs - ): - """ - :keyword type: Required. The resource type of the baseline resource. - :paramtype type: str - :keyword timestamps: The array of timestamps of the baselines. - :paramtype timestamps: list[~datetime.datetime] - :keyword baseline: Required. The baseline values for each sensitivity. - :paramtype baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] - :keyword statistics: The statistics. - :paramtype statistics: - ~$(python-base-namespace).v2018_09_01.models.CalculateBaselineResponseStatistics - :keyword error_type: The error type for calculating the baseline. Possible values include: 0, - 1, 2, 3, 4, 100, 200. - :paramtype error_type: int or ~$(python-base-namespace).v2018_09_01.models.ErrorType - """ - super(CalculateBaselineResponse, self).__init__(**kwargs) - self.type = type - self.timestamps = timestamps - self.baseline = baseline - self.statistics = statistics - self.internal_operation_id = None - self.error_type = error_type - - -class CalculateBaselineResponseStatistics(msrest.serialization.Model): - """The statistics. - - :ivar is_eligible: is series eligible for dynamic threshold analysis. - :vartype is_eligible: bool - :ivar status: The list of extended status for calculating the baseline. - :vartype status: list[str] - :ivar seasonality_period: The seasonality period for calculating the baseline. - :vartype seasonality_period: int - """ - - _attribute_map = { - 'is_eligible': {'key': 'isEligible', 'type': 'bool'}, - 'status': {'key': 'status', 'type': '[str]'}, - 'seasonality_period': {'key': 'seasonalityPeriod', 'type': 'int'}, - } - - def __init__( - self, - *, - is_eligible: Optional[bool] = None, - status: Optional[List[str]] = None, - seasonality_period: Optional[int] = None, - **kwargs - ): - """ - :keyword is_eligible: is series eligible for dynamic threshold analysis. - :paramtype is_eligible: bool - :keyword status: The list of extended status for calculating the baseline. - :paramtype status: list[str] - :keyword seasonality_period: The seasonality period for calculating the baseline. - :paramtype seasonality_period: int - """ - super(CalculateBaselineResponseStatistics, self).__init__(**kwargs) - self.is_eligible = is_eligible - self.status = status - self.seasonality_period = seasonality_period - - class EmailReceiver(msrest.serialization.Model): """An email receiver. @@ -1017,44 +683,6 @@ def __init__( self.region = region -class LocalizableString(msrest.serialization.Model): - """The localizable string class. - - All required parameters must be populated in order to send to Azure. - - :ivar value: Required. The invariant value. - :vartype value: str - :ivar localized_value: The locale specific value. - :vartype localized_value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__( - self, - *, - value: str, - localized_value: Optional[str] = None, - **kwargs - ): - """ - :keyword value: Required. The invariant value. - :paramtype value: str - :keyword localized_value: The locale specific value. - :paramtype localized_value: str - """ - super(LocalizableString, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - class LogicAppReceiver(msrest.serialization.Model): """A logic app receiver. @@ -1161,52 +789,6 @@ def __init__( self.status = None -class TimeSeriesInformation(msrest.serialization.Model): - """The time series info needed for calculating the baseline. - - All required parameters must be populated in order to send to Azure. - - :ivar sensitivities: Required. The list of sensitivities for calculating the baseline. - :vartype sensitivities: list[str] - :ivar values: Required. The metric values to calculate the baseline. - :vartype values: list[float] - :ivar timestamps: The array of timestamps of the baselines. - :vartype timestamps: list[~datetime.datetime] - """ - - _validation = { - 'sensitivities': {'required': True}, - 'values': {'required': True}, - } - - _attribute_map = { - 'sensitivities': {'key': 'sensitivities', 'type': '[str]'}, - 'values': {'key': 'values', 'type': '[float]'}, - 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, - } - - def __init__( - self, - *, - sensitivities: List[str], - values: List[float], - timestamps: Optional[List[datetime.datetime]] = None, - **kwargs - ): - """ - :keyword sensitivities: Required. The list of sensitivities for calculating the baseline. - :paramtype sensitivities: list[str] - :keyword values: Required. The metric values to calculate the baseline. - :paramtype values: list[float] - :keyword timestamps: The array of timestamps of the baselines. - :paramtype timestamps: list[~datetime.datetime] - """ - super(TimeSeriesInformation, self).__init__(**kwargs) - self.sensitivities = sensitivities - self.values = values - self.timestamps = timestamps - - class VoiceReceiver(msrest.serialization.Model): """A voice receiver. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_monitor_management_client_enums.py deleted file mode 100644 index 200d8caf46bb..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_monitor_management_client_enums.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum -from six import with_metaclass -from azure.core import CaseInsensitiveEnumMeta - - -class ErrorType(with_metaclass(CaseInsensitiveEnumMeta, int, Enum)): - """The error type of the baseline. - """ - - ZERO = 0 - ONE = 1 - TWO = 2 - THREE = 3 - FOUR = 4 - ONE_HUNDRED = 100 - TWO_HUNDRED = 200 - -class PredictionResultType(with_metaclass(CaseInsensitiveEnumMeta, int, Enum)): - """The prediction result type of the baseline. - """ - - ZERO = 0 - ONE = 1 - TWO = 2 - -class ReceiverStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Indicates the status of the receiver. Receivers that are not Enabled will not receive any - communications. - """ - - NOT_SPECIFIED = "NotSpecified" - ENABLED = "Enabled" - DISABLED = "Disabled" - -class ResultType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - DATA = "Data" - METADATA = "Metadata" - -class Sensitivity(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The sensitivity of the baseline. - """ - - LOW = "Low" - MEDIUM = "Medium" - HIGH = "High" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/__init__.py index 636f48f0362a..dc488c51fcad 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/__init__.py @@ -7,11 +7,7 @@ # -------------------------------------------------------------------------- from ._action_groups_operations import ActionGroupsOperations -from ._metric_baseline_operations import MetricBaselineOperations -from ._baseline_operations import BaselineOperations __all__ = [ 'ActionGroupsOperations', - 'MetricBaselineOperations', - 'BaselineOperations', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baseline_operations.py deleted file mode 100644 index 991aea74f1e0..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baseline_operations.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -import functools -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_get_request( - resource_uri: str, - *, - metricnames: Optional[str] = None, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - sensitivities: Optional[str] = None, - result_type: Optional[Union[str, "_models.ResultType"]] = None, - metricnamespace: Optional[str] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = "2018-09-01" - accept = "application/json" - # Construct URL - url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.Insights/baseline') - path_format_arguments = { - "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), - } - - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if metricnames is not None: - query_parameters['metricnames'] = _SERIALIZER.query("metricnames", metricnames, 'str') - if timespan is not None: - query_parameters['timespan'] = _SERIALIZER.query("timespan", timespan, 'str') - if interval is not None: - query_parameters['interval'] = _SERIALIZER.query("interval", interval, 'duration') - if aggregation is not None: - query_parameters['aggregation'] = _SERIALIZER.query("aggregation", aggregation, 'str') - if sensitivities is not None: - query_parameters['sensitivities'] = _SERIALIZER.query("sensitivities", sensitivities, 'str') - if result_type is not None: - query_parameters['resultType'] = _SERIALIZER.query("result_type", result_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if metricnamespace is not None: - query_parameters['metricnamespace'] = _SERIALIZER.query("metricnamespace", metricnamespace, 'str') - if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) - -class BaselineOperations(object): - """BaselineOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~$(python-base-namespace).v2018_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def get( - self, - resource_uri: str, - metricnames: Optional[str] = None, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - sensitivities: Optional[str] = None, - result_type: Optional[Union[str, "_models.ResultType"]] = None, - metricnamespace: Optional[str] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> "_models.BaselineResponse": - """**Gets the baseline values for a resource**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param metricnames: The names of the metrics (comma separated) to retrieve. Special case: If a - metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be - **'Metric%2Name1'**. - :type metricnames: str - :param timespan: The timespan of the query. It is a string with the following format - 'startDateTime_ISO/endDateTime_ISO'. - :type timespan: str - :param interval: The interval (i.e. timegrain) of the query. - :type interval: ~datetime.timedelta - :param aggregation: The aggregation type of the metric to retrieve the baseline for. - :type aggregation: str - :param sensitivities: The list of sensitivities (comma separated) to retrieve. - :type sensitivities: str - :param result_type: Allows retrieving only metadata of the baseline. On data request all - information is retrieved. - :type result_type: str or ~$(python-base-namespace).v2018_09_01.models.ResultType - :param metricnamespace: Metric namespace to query metric definitions for. - :type metricnamespace: str - :param filter: The **$filter** is used to describe a set of dimensions with their concrete - values which produce a specific metric's time series, in which a baseline is requested for. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.BaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - - request = build_get_request( - resource_uri=resource_uri, - metricnames=metricnames, - timespan=timespan, - interval=interval, - aggregation=aggregation, - sensitivities=sensitivities, - result_type=result_type, - metricnamespace=metricnamespace, - filter=filter, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline'} # type: ignore - diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_metric_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_metric_baseline_operations.py deleted file mode 100644 index 100616099a95..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_metric_baseline_operations.py +++ /dev/null @@ -1,289 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -import functools -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpResponse -from azure.core.rest import HttpRequest -from azure.core.tracing.decorator import distributed_trace -from azure.mgmt.core.exceptions import ARMErrorFormat -from msrest import Serializer - -from .. import models as _models -from .._vendor import _convert_request, _format_url_section -T = TypeVar('T') -JSONType = Any -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -_SERIALIZER = Serializer() -_SERIALIZER.client_side_validation = False - -def build_get_request( - resource_uri: str, - metric_name: str, - *, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - sensitivities: Optional[str] = None, - result_type: Optional[Union[str, "_models.ResultType"]] = None, - metricnamespace: Optional[str] = None, - filter: Optional[str] = None, - **kwargs: Any -) -> HttpRequest: - api_version = "2018-09-01" - accept = "application/json" - # Construct URL - url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}') - path_format_arguments = { - "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), - "metricName": _SERIALIZER.url("metric_name", metric_name, 'str'), - } - - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if timespan is not None: - query_parameters['timespan'] = _SERIALIZER.query("timespan", timespan, 'str') - if interval is not None: - query_parameters['interval'] = _SERIALIZER.query("interval", interval, 'duration') - if aggregation is not None: - query_parameters['aggregation'] = _SERIALIZER.query("aggregation", aggregation, 'str') - if sensitivities is not None: - query_parameters['sensitivities'] = _SERIALIZER.query("sensitivities", sensitivities, 'str') - if result_type is not None: - query_parameters['resultType'] = _SERIALIZER.query("result_type", result_type, 'str') - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - if metricnamespace is not None: - query_parameters['metricnamespace'] = _SERIALIZER.query("metricnamespace", metricnamespace, 'str') - if filter is not None: - query_parameters['$filter'] = _SERIALIZER.query("filter", filter, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="GET", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) - - -def build_calculate_baseline_request( - resource_uri: str, - *, - json: JSONType = None, - content: Any = None, - **kwargs: Any -) -> HttpRequest: - content_type = kwargs.pop('content_type', None) # type: Optional[str] - - api_version = "2018-09-01" - accept = "application/json" - # Construct URL - url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline') - path_format_arguments = { - "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), - } - - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - json=json, - content=content, - **kwargs - ) - -class MetricBaselineOperations(object): - """MetricBaselineOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~$(python-base-namespace).v2018_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - @distributed_trace - def get( - self, - resource_uri: str, - metric_name: str, - timespan: Optional[str] = None, - interval: Optional[datetime.timedelta] = None, - aggregation: Optional[str] = None, - sensitivities: Optional[str] = None, - result_type: Optional[Union[str, "_models.ResultType"]] = None, - metricnamespace: Optional[str] = None, - filter: Optional[str] = None, - **kwargs: Any - ) -> "_models.BaselineResponse": - """**Gets the baseline values for a specific metric**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param metric_name: The name of the metric to retrieve the baseline for. - :type metric_name: str - :param timespan: The timespan of the query. It is a string with the following format - 'startDateTime_ISO/endDateTime_ISO'. - :type timespan: str - :param interval: The interval (i.e. timegrain) of the query. - :type interval: ~datetime.timedelta - :param aggregation: The aggregation type of the metric to retrieve the baseline for. - :type aggregation: str - :param sensitivities: The list of sensitivities (comma separated) to retrieve. - :type sensitivities: str - :param result_type: Allows retrieving only metadata of the baseline. On data request all - information is retrieved. - :type result_type: str or ~$(python-base-namespace).v2018_09_01.models.ResultType - :param metricnamespace: Metric namespace to query metric definitions for. - :type metricnamespace: str - :param filter: The **$filter** is used to describe a set of dimensions with their concrete - values which produce a specific metric's time series, in which a baseline is requested for. - :type filter: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.BaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - - request = build_get_request( - resource_uri=resource_uri, - metric_name=metric_name, - timespan=timespan, - interval=interval, - aggregation=aggregation, - sensitivities=sensitivities, - result_type=result_type, - metricnamespace=metricnamespace, - filter=filter, - template_url=self.get.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}'} # type: ignore - - - @distributed_trace - def calculate_baseline( - self, - resource_uri: str, - time_series_information: "_models.TimeSeriesInformation", - **kwargs: Any - ) -> "_models.CalculateBaselineResponse": - """**Lists the baseline values for a resource**. - - :param resource_uri: The identifier of the resource. It has the following structure: - subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}. - For example: - subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. - :type resource_uri: str - :param time_series_information: Information that need to be specified to calculate a baseline - on a time series. - :type time_series_information: - ~$(python-base-namespace).v2018_09_01.models.TimeSeriesInformation - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CalculateBaselineResponse, or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.CalculateBaselineResponse - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.CalculateBaselineResponse"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - - _json = self._serialize.body(time_series_information, 'TimeSeriesInformation') - - request = build_calculate_baseline_request( - resource_uri=resource_uri, - content_type=content_type, - json=_json, - template_url=self.calculate_baseline.metadata['url'], - ) - request = _convert_request(request) - request.url = self._client.format_url(request.url) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - deserialized = self._deserialize('CalculateBaselineResponse', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - - calculate_baseline.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline'} # type: ignore - diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py index 97fb7d1dca33..b0cb55fba456 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "TokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_metadata.json index f48dd5306487..0e89776df912 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2018-11-27-preview", "total_api_version_list": ["2018-11-27-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_client.py index a614ecab0d59..eea4a59c47b4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import VMInsightsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar vm_insights: VMInsightsOperations operations @@ -39,7 +39,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -80,7 +80,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py index 77ea6d2eeead..312a3fd82d7d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "AsyncTokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_client.py index d7e018bff1c2..33edb072dd69 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import VMInsightsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar vm_insights: VMInsightsOperations operations @@ -39,7 +39,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -78,7 +78,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/__init__.py index f574db4714d0..fb31b3c59bc6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/__init__.py @@ -14,7 +14,7 @@ from ._models_py3 import WorkspaceInfo -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( DataStatus, OnboardingStatus, ) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models_py3.py index c30e574ee7a6..f4060192f49e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models_py3.py @@ -11,7 +11,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class DataContainer(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py index 104015108097..7d798743171b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_metadata.json index ec859da410c4..8f27d336fe3b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2019-03-01", "total_api_version_list": ["2019-03-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_client.py index 6c955bb8086c..0230b735cfaf 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations, BaselinesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -43,7 +43,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -85,7 +85,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py index 1c02bc997da3..d3b1437fd05b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_client.py index a91a75c74e1c..466a6a26410a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations, BaselinesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -44,7 +44,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -84,7 +84,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/__init__.py index 10b07dab50dc..40158bfb9853 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/__init__.py @@ -30,7 +30,7 @@ from ._models_py3 import WebhookReceiver -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( BaselineSensitivity, ReceiverStatus, ResultType, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py index 2d8ad2bb5632..3421063a22aa 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class ActionGroupList(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py index fd3c7aceb873..688aeece1416 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_metadata.json index 86800ff33772..4ff07103fdd8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2019-06-01", "total_api_version_list": ["2019-06-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_client.py index 07d73bf58d4a..b07d2895ca92 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -41,7 +41,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -82,7 +82,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py index bbcc96275adc..01d257ab853f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_client.py index 49caf9f19a61..5386dd213d37 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -81,7 +81,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/__init__.py index 74d7521ff191..d9e310392ef7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/__init__.py @@ -24,7 +24,7 @@ from ._models_py3 import WebhookReceiver -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( ReceiverStatus, ) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py index ba079fc9b32a..60e4e4c7730d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_metadata.json index c1ab58204142..72f1808cbd18 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2019-10-17-preview", "total_api_version_list": ["2019-10-17-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_client.py similarity index 95% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_client.py index 7ec772089c38..ee08e37f9511 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, PrivateLinkScopeOperationStatusOperations, PrivateLinkScopedResourcesOperations, PrivateLinkScopesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar private_link_scopes: PrivateLinkScopesOperations operations @@ -56,7 +56,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -101,7 +101,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py index 26c8b9416b5d..7d913fb84d1d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_client.py index 33dce3625e85..b8c61953a40c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import PrivateEndpointConnectionsOperations, PrivateLinkResourcesOperations, PrivateLinkScopeOperationStatusOperations, PrivateLinkScopedResourcesOperations, PrivateLinkScopesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar private_link_scopes: PrivateLinkScopesOperations operations @@ -56,7 +56,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -99,7 +99,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py index 3976d687afde..a5b1720903d8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_metadata.json index 34885a43497c..1ce610c2bd96 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2019-11-01-preview", "total_api_version_list": ["2019-11-01-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_client.py index 3c59bcc99068..6e2de21b0837 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import DataCollectionRuleAssociationsOperations, DataCollectionRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations @@ -45,7 +45,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -87,7 +87,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py index 2dc886a8a1f4..b3ffaa54fb17 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_client.py index ea9134b6ffef..d1795ce17028 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import DataCollectionRuleAssociationsOperations, DataCollectionRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations @@ -45,7 +45,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -85,7 +85,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/__init__.py index fc90ea637b48..e49da28a13f7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/__init__.py @@ -32,7 +32,7 @@ from ._models_py3 import WindowsEventLogDataSource -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( KnownDataCollectionRuleAssociationProvisioningState, KnownDataCollectionRuleProvisioningState, KnownDataCollectionRuleResourceKind, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models_py3.py index 7a0a0f36f511..0c5f9df6235a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models_py3.py @@ -11,7 +11,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class AzureMonitorMetricsDestination(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py index a3b6df71aadb..a25f301373a4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "TokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_metadata.json index 378468ef8a93..0ce58f9212d8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2020-01-01-preview", "total_api_version_list": ["2020-01-01-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_client.py index c96780028635..c5e64f311649 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ManagementGroupDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar management_group_diagnostic_settings: ManagementGroupDiagnosticSettingsOperations @@ -40,7 +40,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -81,7 +81,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py index cdef221ece0b..d1c9ebd9da2f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -34,7 +34,7 @@ def __init__( credential: "AsyncTokenCredential", **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_client.py index 8c3c52b5455b..a0fd9adafcb7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ManagementGroupDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar management_group_diagnostic_settings: ManagementGroupDiagnosticSettingsOperations @@ -40,7 +40,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -79,7 +79,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py index 5e7e4b72cc0a..52f92ff2d245 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_metadata.json index 0518924e3fa3..2d54d8d77cd9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2020-05-01-preview", "total_api_version_list": ["2020-05-01-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_client.py index fa5afc6020a9..3f8d6b3ae010 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ScheduledQueryRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -83,7 +83,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py index 9542d1ff846f..67a78ab9e5d8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_client.py index 62e082f8affd..ffd6ad0deab6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ScheduledQueryRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -81,7 +81,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/__init__.py index 5c06ceb743ef..e69da65bad83 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/__init__.py @@ -21,7 +21,7 @@ from ._models_py3 import TrackedResource -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( AlertSeverity, ConditionOperator, DimensionOperator, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models_py3.py index 76b08a05a895..447247f80649 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class Action(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py index 14af96233033..d78b8c897694 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_metadata.json index f1fae9dab958..fdf2bd17b700 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2020-10-01", "total_api_version_list": ["2020-10-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_client.py index 694355cab028..a1008241bbe6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActivityLogAlertsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar activity_log_alerts: ActivityLogAlertsOperations operations @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -83,7 +83,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py index d463a021089f..1fa9c9dd8804 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_client.py index 6f8d6651909b..5c9c9c3d0d93 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActivityLogAlertsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar activity_log_alerts: ActivityLogAlertsOperations operations @@ -42,7 +42,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -81,7 +81,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py index 030a5ba894ea..0d10aa83d39f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_metadata.json index b089e37d50b5..160e8ab4f57d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2021-04-01", "total_api_version_list": ["2021-04-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_client.py index 84dc1ddcca18..ede5c5631436 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import DataCollectionEndpointsOperations, DataCollectionRuleAssociationsOperations, DataCollectionRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations @@ -48,7 +48,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -91,7 +91,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py index 457603f1e001..06b2e6a256e0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_client.py index cc25115a9967..81f0427806c0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import DataCollectionEndpointsOperations, DataCollectionRuleAssociationsOperations, DataCollectionRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations @@ -48,7 +48,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -89,7 +89,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/__init__.py index 1884e0dca0c1..4fbf898cf39e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/__init__.py @@ -46,7 +46,7 @@ from ._models_py3 import WindowsEventLogDataSource -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( CreatedByType, KnownDataCollectionEndpointProvisioningState, KnownDataCollectionEndpointResourceKind, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models_py3.py index 5fbd1e570899..3fd673e90bc7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class AzureMonitorMetricsDestination(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py index daa1eaa37dbe..0422c2f49db0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_metadata.json index 3feeaec00b53..733b995ee773 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2021-05-01-preview", "total_api_version_list": ["2021-05-01-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_client.py similarity index 95% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_client.py index 519c5ba60fc2..24a0a9e1a6a0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import AutoscaleSettingsOperations, DiagnosticSettingsCategoryOperations, DiagnosticSettingsOperations, ManagementGroupDiagnosticSettingsOperations, PredictiveMetricOperations, SubscriptionDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar autoscale_settings: AutoscaleSettingsOperations operations @@ -58,7 +58,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -104,7 +104,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py index 7da2da751912..c2e75981fc99 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_client.py similarity index 95% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_client.py index 1024edbc3147..8860f5edb538 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import AutoscaleSettingsOperations, DiagnosticSettingsCategoryOperations, DiagnosticSettingsOperations, ManagementGroupDiagnosticSettingsOperations, PredictiveMetricOperations, SubscriptionDiagnosticSettingsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar autoscale_settings: AutoscaleSettingsOperations operations @@ -58,7 +58,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -102,7 +102,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/__init__.py index 660f669f65c3..cb26aa5639d5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/__init__.py @@ -44,7 +44,7 @@ from ._models_py3 import WebhookNotification -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( CategoryType, ComparisonOperationType, CreatedByType, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models_py3.py index d0019c4e672d..4ce959a8d389 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class AutoscaleErrorResponse(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_monitor_client_enums.py diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py index 51092e492216..89b061aa0880 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_metadata.json index 935381fe6e10..adcd4c9376e3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2021-09-01", "total_api_version_list": ["2021-09-01"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_client.py index 2c252c063fa9..2c83df0be9ff 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -43,7 +43,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -84,7 +84,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py index 2ae420e15518..054638060a3d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_client.py similarity index 92% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_client.py index d852f15ba63d..5cd544d0769f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import ActionGroupsOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations @@ -44,7 +44,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -83,7 +83,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py index 01dd730f69d1..3190c79d9573 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py @@ -30,7 +30,7 @@ from ._models_py3 import WebhookReceiver -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( ReceiverStatus, ) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_monitor_client_enums.py similarity index 67% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_monitor_client_enums.py index 84dc084ea9ed..5e8a759db49c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_monitor_client_enums.py @@ -11,15 +11,11 @@ from azure.core import CaseInsensitiveEnumMeta -class ResultType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - - DATA = "Data" - METADATA = "Metadata" - -class Sensitivity(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """the sensitivity of the baseline. +class ReceiverStatus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Indicates the status of the receiver. Receivers that are not Enabled will not receive any + communications. """ - LOW = "Low" - MEDIUM = "Medium" - HIGH = "High" + NOT_SPECIFIED = "NotSpecified" + ENABLED = "Enabled" + DISABLED = "Disabled" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/__init__.py index ec9090a57df0..900d774c9610 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient +from ._monitor_client import MonitorClient from ._version import VERSION __version__ = VERSION -__all__ = ['MonitorManagementClient'] +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_configuration.py index 96ea531748cd..0fe349d2bb3f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials import TokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_metadata.json index 828831e97da8..e3cd505360d5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_metadata.json @@ -2,16 +2,16 @@ "chosen_version": "2021-09-01-preview", "total_api_version_list": ["2021-09-01-preview"], "client": { - "name": "MonitorManagementClient", - "filename": "_monitor_management_client", + "name": "MonitorClient", + "filename": "_monitor_client", "description": "Monitor Management Client.", "host_value": "\"https://management.azure.com\"", "parameterized_host_template": null, "azure_arm": true, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_monitor_client.py similarity index 94% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_monitor_client.py index c755626c0bd3..f5018b0029c8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from . import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import DataCollectionEndpointsOperations, DataCollectionRuleAssociationsOperations, DataCollectionRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations @@ -48,7 +48,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -91,7 +91,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> MonitorManagementClient + # type: () -> MonitorClient self._client.__enter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_version.py index 47babc28d5ed..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "3.1.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/__init__.py index 4eba911f1c6e..317194684776 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._monitor_management_client import MonitorManagementClient -__all__ = ['MonitorManagementClient'] +from ._monitor_client import MonitorClient +__all__ = ['MonitorClient'] # `._patch.py` is used for handwritten extensions to the generated code # Example: https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/customize_code/how-to-patch-sdk-code.md diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_configuration.py index c004814b44c1..b57c96e5cbc6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_configuration.py @@ -19,8 +19,8 @@ from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClientConfiguration(Configuration): - """Configuration for MonitorManagementClient. +class MonitorClientConfiguration(Configuration): + """Configuration for MonitorClient. Note that all parameters used to create this instance are saved as instance attributes. @@ -37,7 +37,7 @@ def __init__( subscription_id: str, **kwargs: Any ) -> None: - super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_monitor_client.py similarity index 93% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_monitor_management_client.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_monitor_client.py index eaeaa74c87d5..0d633e785fcc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/_monitor_client.py @@ -14,14 +14,14 @@ from msrest import Deserializer, Serializer from .. import models -from ._configuration import MonitorManagementClientConfiguration +from ._configuration import MonitorClientConfiguration from .operations import DataCollectionEndpointsOperations, DataCollectionRuleAssociationsOperations, DataCollectionRulesOperations if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class MonitorManagementClient: +class MonitorClient: """Monitor Management Client. :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations @@ -48,7 +48,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - self._config = MonitorManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) + self._config = MonitorClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -89,7 +89,7 @@ def _send_request( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "MonitorManagementClient": + async def __aenter__(self) -> "MonitorClient": await self._client.__aenter__() return self diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/__init__.py index 5cb1ed8a7ffb..93cd01084575 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/__init__.py @@ -57,7 +57,7 @@ from ._models_py3 import WindowsEventLogDataSource -from ._monitor_management_client_enums import ( +from ._monitor_client_enums import ( CreatedByType, KnownColumnDefinitionType, KnownDataCollectionEndpointProvisioningState, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_models_py3.py index 1d8328f3f7fc..49d52d164d9c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_models_py3.py @@ -12,7 +12,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._monitor_management_client_enums import * +from ._monitor_client_enums import * class AzureMonitorMetricsDestination(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_monitor_client_enums.py similarity index 100% rename from sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_monitor_management_client_enums.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/models/_monitor_client_enums.py