diff --git a/sdk/monitor/azure-mgmt-monitor/_meta.json b/sdk/monitor/azure-mgmt-monitor/_meta.json index 4a59bdacbfcb..b987baca92bc 100644 --- a/sdk/monitor/azure-mgmt-monitor/_meta.json +++ b/sdk/monitor/azure-mgmt-monitor/_meta.json @@ -1,11 +1,11 @@ { - "commit": "7d313ecb6a58a51046a3916ee5ea6b6d29973522", + "commit": "3f0285327fed2f01daac115d9f560ea83c16534c", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.2", "use": [ - "@autorest/python@6.4.3", + "@autorest/python@6.4.8", "@autorest/modelerfour@4.24.3" ], - "autorest_command": "autorest specification/monitor/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.4.3 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", + "autorest_command": "autorest specification/monitor/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.4.8 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False", "readme": "specification/monitor/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_serialization.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_serialization.py index 25467dfc00bb..e3cc6ce6ed6f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_serialization.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_serialization.py @@ -631,7 +631,7 @@ def _serialize(self, target_obj, data_type=None, **kwargs): if xml_desc.get("attr", False): if xml_ns: ET.register_namespace(xml_prefix, xml_ns) - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) serialized.set(xml_name, new_attr) # type: ignore continue if xml_desc.get("text", False): @@ -1273,7 +1273,7 @@ def _extract_name_from_internal_type(internal_type): xml_name = internal_type_xml_map.get("name", internal_type.__name__) xml_ns = internal_type_xml_map.get("ns", None) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) return xml_name @@ -1297,7 +1297,7 @@ def xml_key_extractor(attr, attr_desc, data): # Integrate namespace if necessary xml_ns = xml_desc.get("ns", internal_type_xml_map.get("ns", None)) if xml_ns: - xml_name = "{}{}".format(xml_ns, xml_name) + xml_name = "{{{}}}{}".format(xml_ns, xml_name) # If it's an attribute, that's simple if xml_desc.get("attr", False): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py index d15d41e4399e..a30a458f8b5b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "0.1.0" \ No newline at end of file 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_management_client.py index 45d04910bf05..1c618b18af39 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_management_client.py @@ -33,20 +33,19 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar activity_logs: ActivityLogsOperations operations - :vartype activity_logs: $(python-base-namespace).v2015_04_01.operations.ActivityLogsOperations + :vartype activity_logs: azure.mgmt.monitor.v2015_04_01.operations.ActivityLogsOperations :ivar autoscale_settings: AutoscaleSettingsOperations operations :vartype autoscale_settings: - $(python-base-namespace).v2015_04_01.operations.AutoscaleSettingsOperations + azure.mgmt.monitor.v2015_04_01.operations.AutoscaleSettingsOperations :ivar event_categories: EventCategoriesOperations operations - :vartype event_categories: - $(python-base-namespace).v2015_04_01.operations.EventCategoriesOperations + :vartype event_categories: azure.mgmt.monitor.v2015_04_01.operations.EventCategoriesOperations :ivar operations: Operations operations - :vartype operations: $(python-base-namespace).v2015_04_01.operations.Operations + :vartype operations: azure.mgmt.monitor.v2015_04_01.operations.Operations :ivar tenant_activity_logs: TenantActivityLogsOperations operations :vartype tenant_activity_logs: - $(python-base-namespace).v2015_04_01.operations.TenantActivityLogsOperations + azure.mgmt.monitor.v2015_04_01.operations.TenantActivityLogsOperations :ivar alert_rules: AlertRulesOperations operations - :vartype alert_rules: $(python-base-namespace).v2015_04_01.operations.AlertRulesOperations + :vartype alert_rules: azure.mgmt.monitor.v2015_04_01.operations.AlertRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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_management_client.py index cdb96caec8db..5640ee566505 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_management_client.py @@ -33,21 +33,20 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar activity_logs: ActivityLogsOperations operations - :vartype activity_logs: - $(python-base-namespace).v2015_04_01.aio.operations.ActivityLogsOperations + :vartype activity_logs: azure.mgmt.monitor.v2015_04_01.aio.operations.ActivityLogsOperations :ivar autoscale_settings: AutoscaleSettingsOperations operations :vartype autoscale_settings: - $(python-base-namespace).v2015_04_01.aio.operations.AutoscaleSettingsOperations + azure.mgmt.monitor.v2015_04_01.aio.operations.AutoscaleSettingsOperations :ivar event_categories: EventCategoriesOperations operations :vartype event_categories: - $(python-base-namespace).v2015_04_01.aio.operations.EventCategoriesOperations + azure.mgmt.monitor.v2015_04_01.aio.operations.EventCategoriesOperations :ivar operations: Operations operations - :vartype operations: $(python-base-namespace).v2015_04_01.aio.operations.Operations + :vartype operations: azure.mgmt.monitor.v2015_04_01.aio.operations.Operations :ivar tenant_activity_logs: TenantActivityLogsOperations operations :vartype tenant_activity_logs: - $(python-base-namespace).v2015_04_01.aio.operations.TenantActivityLogsOperations + azure.mgmt.monitor.v2015_04_01.aio.operations.TenantActivityLogsOperations :ivar alert_rules: AlertRulesOperations operations - :vartype alert_rules: $(python-base-namespace).v2015_04_01.aio.operations.AlertRulesOperations + :vartype alert_rules: azure.mgmt.monitor.v2015_04_01.aio.operations.AlertRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py index 8c20cf8b0c31..696f55a089d1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._activity_logs_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ class ActivityLogsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.aio.MonitorManagementClient`'s :attr:`activity_logs` attribute. """ @@ -87,13 +82,13 @@ def list(self, filter: str, select: Optional[str] = None, **kwargs: Any) -> Asyn :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either EventData or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.EventData] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_04_01.models.EventData] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py index 275f8cddfb41..ab65fc45afc3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +46,7 @@ class AlertRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.aio.MonitorManagementClient`'s :attr:`alert_rules` attribute. """ @@ -82,13 +77,13 @@ async def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :type parameters: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -116,7 +111,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -133,13 +128,13 @@ async def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a AlertRuleResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -153,7 +148,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -234,7 +229,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -279,7 +274,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -293,7 +288,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -350,13 +345,13 @@ async def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResourcePatch + :type alert_rules_resource: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -385,7 +380,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -407,14 +402,13 @@ async def update( :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Is either a AlertRuleResourcePatch type or a IO type. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResourcePatch - or IO + :type alert_rules_resource: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -428,7 +422,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -494,13 +488,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.AlertRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -568,13 +562,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AlertRul :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.AlertRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py index e5fc5ec68149..c16d1484744b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +46,7 @@ class AutoscaleSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.aio.MonitorManagementClient`'s :attr:`autoscale_settings` attribute. """ @@ -77,13 +72,13 @@ def list_by_resource_group( :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -162,13 +157,13 @@ async def create_or_update( :param autoscale_setting_name: The autoscale setting name. Required. :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :type parameters: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -196,7 +191,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -217,13 +212,13 @@ async def create_or_update( :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Is either a AutoscaleSettingResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource or IO + :type parameters: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -237,7 +232,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -318,7 +313,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -365,7 +360,7 @@ async def get( :type autoscale_setting_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -379,7 +374,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -437,13 +432,13 @@ async def update( :type autoscale_setting_name: str :param autoscale_setting_resource: Parameters supplied to the operation. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResourcePatch + ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -472,7 +467,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -495,13 +490,13 @@ async def update( :param autoscale_setting_resource: Parameters supplied to the operation. Is either a AutoscaleSettingResourcePatch type or a IO type. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResourcePatch or IO + ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -515,7 +510,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -573,13 +568,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Autoscal :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py index c0a972c8bf44..a27a3ce7c584 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._event_categories_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ class EventCategoriesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.aio.MonitorManagementClient`'s :attr:`event_categories` attribute. """ @@ -65,13 +60,13 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.LocalizableString"]: :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LocalizableString or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.LocalizableString] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_04_01.models.LocalizableString] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventCategoryCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py index ef73e6fc95d7..c3ab3e4bac0d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class Operations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.aio.MonitorManagementClient`'s :attr:`operations` attribute. """ @@ -61,7 +56,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult: :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.OperationListResult + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.OperationListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -75,7 +70,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py index 2ff7d874e194..0a4609b6cb5e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._tenant_activity_logs_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ class TenantActivityLogsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.aio.MonitorManagementClient`'s :attr:`tenant_activity_logs` attribute. """ @@ -94,13 +89,13 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either EventData or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.EventData] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_04_01.models.EventData] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None) error_map = { 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 4124a44cb898..82dc0158f211 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 @@ -92,13 +92,13 @@ class AlertRuleResource(Resource): # pylint: disable=too-many-instance-attribut :ivar is_enabled: the flag that indicates whether the alert rule is enabled. Required. :vartype is_enabled: bool :ivar condition: the condition that results in the alert rule being activated. Required. - :vartype condition: ~$(python-base-namespace).v2015_04_01.models.RuleCondition + :vartype condition: ~azure.mgmt.monitor.v2015_04_01.models.RuleCondition :ivar action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype action: ~$(python-base-namespace).v2015_04_01.models.RuleAction + :vartype action: ~azure.mgmt.monitor.v2015_04_01.models.RuleAction :ivar actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype actions: list[~$(python-base-namespace).v2015_04_01.models.RuleAction] + :vartype actions: list[~azure.mgmt.monitor.v2015_04_01.models.RuleAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime """ @@ -159,13 +159,13 @@ def __init__( :keyword is_enabled: the flag that indicates whether the alert rule is enabled. Required. :paramtype is_enabled: bool :keyword condition: the condition that results in the alert rule being activated. Required. - :paramtype condition: ~$(python-base-namespace).v2015_04_01.models.RuleCondition + :paramtype condition: ~azure.mgmt.monitor.v2015_04_01.models.RuleCondition :keyword action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype action: ~$(python-base-namespace).v2015_04_01.models.RuleAction + :paramtype action: ~azure.mgmt.monitor.v2015_04_01.models.RuleAction :keyword actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype actions: list[~$(python-base-namespace).v2015_04_01.models.RuleAction] + :paramtype actions: list[~azure.mgmt.monitor.v2015_04_01.models.RuleAction] """ super().__init__(location=location, tags=tags, **kwargs) self.name_properties_name = name_properties_name @@ -182,7 +182,7 @@ class AlertRuleResourceCollection(_serialization.Model): """Represents a collection of alert rule resources. :ivar value: the values for the alert rule resources. - :vartype value: list[~$(python-base-namespace).v2015_04_01.models.AlertRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource] """ _attribute_map = { @@ -192,7 +192,7 @@ class AlertRuleResourceCollection(_serialization.Model): def __init__(self, *, value: Optional[List["_models.AlertRuleResource"]] = None, **kwargs: Any) -> None: """ :keyword value: the values for the alert rule resources. - :paramtype value: list[~$(python-base-namespace).v2015_04_01.models.AlertRuleResource] + :paramtype value: list[~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource] """ super().__init__(**kwargs) self.value = value @@ -214,13 +214,13 @@ class AlertRuleResourcePatch(_serialization.Model): :ivar is_enabled: the flag that indicates whether the alert rule is enabled. :vartype is_enabled: bool :ivar condition: the condition that results in the alert rule being activated. - :vartype condition: ~$(python-base-namespace).v2015_04_01.models.RuleCondition + :vartype condition: ~azure.mgmt.monitor.v2015_04_01.models.RuleCondition :ivar action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype action: ~$(python-base-namespace).v2015_04_01.models.RuleAction + :vartype action: ~azure.mgmt.monitor.v2015_04_01.models.RuleAction :ivar actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype actions: list[~$(python-base-namespace).v2015_04_01.models.RuleAction] + :vartype actions: list[~azure.mgmt.monitor.v2015_04_01.models.RuleAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime """ @@ -267,13 +267,13 @@ def __init__( :keyword is_enabled: the flag that indicates whether the alert rule is enabled. :paramtype is_enabled: bool :keyword condition: the condition that results in the alert rule being activated. - :paramtype condition: ~$(python-base-namespace).v2015_04_01.models.RuleCondition + :paramtype condition: ~azure.mgmt.monitor.v2015_04_01.models.RuleCondition :keyword action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype action: ~$(python-base-namespace).v2015_04_01.models.RuleAction + :paramtype action: ~azure.mgmt.monitor.v2015_04_01.models.RuleAction :keyword actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype actions: list[~$(python-base-namespace).v2015_04_01.models.RuleAction] + :paramtype actions: list[~azure.mgmt.monitor.v2015_04_01.models.RuleAction] """ super().__init__(**kwargs) self.tags = tags @@ -298,9 +298,9 @@ class AutoscaleNotification(_serialization.Model): Required. Default value is "Scale". :vartype operation: str :ivar email: the email notification. - :vartype email: ~$(python-base-namespace).v2015_04_01.models.EmailNotification + :vartype email: ~azure.mgmt.monitor.v2015_04_01.models.EmailNotification :ivar webhooks: the collection of webhook notifications. - :vartype webhooks: list[~$(python-base-namespace).v2015_04_01.models.WebhookNotification] + :vartype webhooks: list[~azure.mgmt.monitor.v2015_04_01.models.WebhookNotification] """ _validation = { @@ -324,9 +324,9 @@ def __init__( ) -> None: """ :keyword email: the email notification. - :paramtype email: ~$(python-base-namespace).v2015_04_01.models.EmailNotification + :paramtype email: ~azure.mgmt.monitor.v2015_04_01.models.EmailNotification :keyword webhooks: the collection of webhook notifications. - :paramtype webhooks: list[~$(python-base-namespace).v2015_04_01.models.WebhookNotification] + :paramtype webhooks: list[~azure.mgmt.monitor.v2015_04_01.models.WebhookNotification] """ super().__init__(**kwargs) self.email = email @@ -341,16 +341,16 @@ class AutoscaleProfile(_serialization.Model): :ivar name: the name of the profile. Required. :vartype name: str :ivar capacity: the number of instances that can be used during this profile. Required. - :vartype capacity: ~$(python-base-namespace).v2015_04_01.models.ScaleCapacity + :vartype capacity: ~azure.mgmt.monitor.v2015_04_01.models.ScaleCapacity :ivar rules: the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. Required. - :vartype rules: list[~$(python-base-namespace).v2015_04_01.models.ScaleRule] + :vartype rules: list[~azure.mgmt.monitor.v2015_04_01.models.ScaleRule] :ivar fixed_date: the specific date-time for the profile. This element is not used if the Recurrence element is used. - :vartype fixed_date: ~$(python-base-namespace).v2015_04_01.models.TimeWindow + :vartype fixed_date: ~azure.mgmt.monitor.v2015_04_01.models.TimeWindow :ivar recurrence: the repeating times at which this profile begins. This element is not used if the FixedDate element is used. - :vartype recurrence: ~$(python-base-namespace).v2015_04_01.models.Recurrence + :vartype recurrence: ~azure.mgmt.monitor.v2015_04_01.models.Recurrence """ _validation = { @@ -381,16 +381,16 @@ def __init__( :keyword name: the name of the profile. Required. :paramtype name: str :keyword capacity: the number of instances that can be used during this profile. Required. - :paramtype capacity: ~$(python-base-namespace).v2015_04_01.models.ScaleCapacity + :paramtype capacity: ~azure.mgmt.monitor.v2015_04_01.models.ScaleCapacity :keyword rules: the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. Required. - :paramtype rules: list[~$(python-base-namespace).v2015_04_01.models.ScaleRule] + :paramtype rules: list[~azure.mgmt.monitor.v2015_04_01.models.ScaleRule] :keyword fixed_date: the specific date-time for the profile. This element is not used if the Recurrence element is used. - :paramtype fixed_date: ~$(python-base-namespace).v2015_04_01.models.TimeWindow + :paramtype fixed_date: ~azure.mgmt.monitor.v2015_04_01.models.TimeWindow :keyword recurrence: the repeating times at which this profile begins. This element is not used if the FixedDate element is used. - :paramtype recurrence: ~$(python-base-namespace).v2015_04_01.models.Recurrence + :paramtype recurrence: ~azure.mgmt.monitor.v2015_04_01.models.Recurrence """ super().__init__(**kwargs) self.name = name @@ -419,10 +419,9 @@ class AutoscaleSettingResource(Resource): # pylint: disable=too-many-instance-a :vartype tags: dict[str, str] :ivar profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Required. - :vartype profiles: list[~$(python-base-namespace).v2015_04_01.models.AutoscaleProfile] + :vartype profiles: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleProfile] :ivar notifications: the collection of notifications. - :vartype notifications: - list[~$(python-base-namespace).v2015_04_01.models.AutoscaleNotification] + :vartype notifications: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleNotification] :ivar enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :vartype enabled: bool @@ -478,10 +477,9 @@ def __init__( :paramtype tags: dict[str, str] :keyword profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Required. - :paramtype profiles: list[~$(python-base-namespace).v2015_04_01.models.AutoscaleProfile] + :paramtype profiles: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleProfile] :keyword notifications: the collection of notifications. - :paramtype notifications: - list[~$(python-base-namespace).v2015_04_01.models.AutoscaleNotification] + :paramtype notifications: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleNotification] :keyword enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :paramtype enabled: bool @@ -509,7 +507,7 @@ class AutoscaleSettingResourceCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the values for the autoscale setting resources. Required. - :vartype value: list[~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource] + :vartype value: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource] :ivar next_link: URL to get the next set of results. :vartype next_link: str """ @@ -528,7 +526,7 @@ def __init__( ) -> None: """ :keyword value: the values for the autoscale setting resources. Required. - :paramtype value: list[~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource] + :paramtype value: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource] :keyword next_link: URL to get the next set of results. :paramtype next_link: str """ @@ -544,10 +542,9 @@ class AutoscaleSettingResourcePatch(_serialization.Model): :vartype tags: dict[str, str] :ivar profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. - :vartype profiles: list[~$(python-base-namespace).v2015_04_01.models.AutoscaleProfile] + :vartype profiles: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleProfile] :ivar notifications: the collection of notifications. - :vartype notifications: - list[~$(python-base-namespace).v2015_04_01.models.AutoscaleNotification] + :vartype notifications: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleNotification] :ivar enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :vartype enabled: bool @@ -592,10 +589,9 @@ def __init__( :paramtype tags: dict[str, str] :keyword profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. - :paramtype profiles: list[~$(python-base-namespace).v2015_04_01.models.AutoscaleProfile] + :paramtype profiles: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleProfile] :keyword notifications: the collection of notifications. - :paramtype notifications: - list[~$(python-base-namespace).v2015_04_01.models.AutoscaleNotification] + :paramtype notifications: list[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleNotification] :keyword enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :paramtype enabled: bool @@ -696,7 +692,7 @@ class EventCategoryCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the list that includes the Azure event categories. Required. - :vartype value: list[~$(python-base-namespace).v2015_04_01.models.LocalizableString] + :vartype value: list[~azure.mgmt.monitor.v2015_04_01.models.LocalizableString] """ _validation = { @@ -710,7 +706,7 @@ class EventCategoryCollection(_serialization.Model): def __init__(self, *, value: List["_models.LocalizableString"], **kwargs: Any) -> None: """ :keyword value: the list that includes the Azure event categories. Required. - :paramtype value: list[~$(python-base-namespace).v2015_04_01.models.LocalizableString] + :paramtype value: list[~azure.mgmt.monitor.v2015_04_01.models.LocalizableString] """ super().__init__(**kwargs) self.value = value @@ -722,7 +718,7 @@ class EventData(_serialization.Model): # pylint: disable=too-many-instance-attr Variables are only populated by the server, and will be ignored when sending a request. :ivar authorization: The sender authorization information. - :vartype authorization: ~$(python-base-namespace).v2015_04_01.models.SenderAuthorization + :vartype authorization: ~azure.mgmt.monitor.v2015_04_01.models.SenderAuthorization :ivar claims: key value pairs to identify ARM permissions. :vartype claims: dict[str, str] :ivar caller: the email address of the user who has performed the operation, the UPN claim or @@ -740,43 +736,43 @@ class EventData(_serialization.Model): # pylint: disable=too-many-instance-attr :vartype correlation_id: str :ivar event_name: the event name. This value should not be confused with OperationName. For practical purposes, OperationName might be more appealing to end users. - :vartype event_name: ~$(python-base-namespace).v2015_04_01.models.LocalizableString + :vartype event_name: ~azure.mgmt.monitor.v2015_04_01.models.LocalizableString :ivar category: the event category. - :vartype category: ~$(python-base-namespace).v2015_04_01.models.LocalizableString + :vartype category: ~azure.mgmt.monitor.v2015_04_01.models.LocalizableString :ivar http_request: the HTTP request info. Usually includes the 'clientRequestId', 'clientIpAddress' (IP address of the user who initiated the event) and 'method' (HTTP method e.g. PUT). - :vartype http_request: ~$(python-base-namespace).v2015_04_01.models.HttpRequestInfo + :vartype http_request: ~azure.mgmt.monitor.v2015_04_01.models.HttpRequestInfo :ivar level: the event level. Known values are: "Critical", "Error", "Warning", "Informational", and "Verbose". - :vartype level: str or ~$(python-base-namespace).v2015_04_01.models.EventLevel + :vartype level: str or ~azure.mgmt.monitor.v2015_04_01.models.EventLevel :ivar resource_group_name: the resource group name of the impacted resource. :vartype resource_group_name: str :ivar resource_provider_name: the resource provider name of the impacted resource. - :vartype resource_provider_name: ~$(python-base-namespace).v2015_04_01.models.LocalizableString + :vartype resource_provider_name: ~azure.mgmt.monitor.v2015_04_01.models.LocalizableString :ivar resource_id: the resource uri that uniquely identifies the resource that caused this event. :vartype resource_id: str :ivar resource_type: the resource type. - :vartype resource_type: ~$(python-base-namespace).v2015_04_01.models.LocalizableString + :vartype resource_type: ~azure.mgmt.monitor.v2015_04_01.models.LocalizableString :ivar operation_id: It is usually a GUID shared among the events corresponding to single operation. This value should not be confused with EventName. :vartype operation_id: str :ivar operation_name: the operation name. - :vartype operation_name: ~$(python-base-namespace).v2015_04_01.models.LocalizableString + :vartype operation_name: ~azure.mgmt.monitor.v2015_04_01.models.LocalizableString :ivar properties: the set of pairs (usually a Dictionary) that includes details about the event. :vartype properties: dict[str, str] :ivar status: a string describing the status of the operation. Some typical values are: Started, In progress, Succeeded, Failed, Resolved. - :vartype status: ~$(python-base-namespace).v2015_04_01.models.LocalizableString + :vartype status: ~azure.mgmt.monitor.v2015_04_01.models.LocalizableString :ivar sub_status: the event sub status. Most of the time, when included, this captures the HTTP status code of the REST call. Common values are: OK (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP Status Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service Unavailable (HTTP Status Code:503), Gateway Timeout (HTTP Status Code: 504). - :vartype sub_status: ~$(python-base-namespace).v2015_04_01.models.LocalizableString + :vartype sub_status: ~azure.mgmt.monitor.v2015_04_01.models.LocalizableString :ivar event_timestamp: the timestamp of when the event was generated by the Azure service processing the request corresponding the event. It in ISO 8601 format. :vartype event_timestamp: ~datetime.datetime @@ -880,7 +876,7 @@ class EventDataCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: this list that includes the Azure audit logs. Required. - :vartype value: list[~$(python-base-namespace).v2015_04_01.models.EventData] + :vartype value: list[~azure.mgmt.monitor.v2015_04_01.models.EventData] :ivar next_link: Provides the link to retrieve the next set of events. :vartype next_link: str """ @@ -897,7 +893,7 @@ class EventDataCollection(_serialization.Model): def __init__(self, *, value: List["_models.EventData"], next_link: Optional[str] = None, **kwargs: Any) -> None: """ :keyword value: this list that includes the Azure audit logs. Required. - :paramtype value: list[~$(python-base-namespace).v2015_04_01.models.EventData] + :paramtype value: list[~azure.mgmt.monitor.v2015_04_01.models.EventData] :keyword next_link: Provides the link to retrieve the next set of events. :paramtype next_link: str """ @@ -999,7 +995,7 @@ class RuleCondition(_serialization.Model): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2015_04_01.models.RuleDataSource """ _validation = { @@ -1023,7 +1019,7 @@ def __init__(self, *, data_source: Optional["_models.RuleDataSource"] = None, ** """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2015_04_01.models.RuleDataSource """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -1042,7 +1038,7 @@ class LocationThresholdRuleCondition(RuleCondition): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2015_04_01.models.RuleDataSource :ivar window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. @@ -1075,7 +1071,7 @@ def __init__( """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2015_04_01.models.RuleDataSource :keyword window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. @@ -1095,7 +1091,7 @@ class ManagementEventAggregationCondition(_serialization.Model): :ivar operator: the condition operator. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or ~$(python-base-namespace).v2015_04_01.models.ConditionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2015_04_01.models.ConditionOperator :ivar threshold: The threshold value that activates the alert. :vartype threshold: float :ivar window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -1121,7 +1117,7 @@ def __init__( """ :keyword operator: the condition operator. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or ~$(python-base-namespace).v2015_04_01.models.ConditionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2015_04_01.models.ConditionOperator :keyword threshold: The threshold value that activates the alert. :paramtype threshold: float :keyword window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -1147,12 +1143,12 @@ class ManagementEventRuleCondition(RuleCondition): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2015_04_01.models.RuleDataSource :ivar aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate. :vartype aggregation: - ~$(python-base-namespace).v2015_04_01.models.ManagementEventAggregationCondition + ~azure.mgmt.monitor.v2015_04_01.models.ManagementEventAggregationCondition """ _validation = { @@ -1175,12 +1171,12 @@ def __init__( """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2015_04_01.models.RuleDataSource :keyword aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate. :paramtype aggregation: - ~$(python-base-namespace).v2015_04_01.models.ManagementEventAggregationCondition + ~azure.mgmt.monitor.v2015_04_01.models.ManagementEventAggregationCondition """ super().__init__(data_source=data_source, **kwargs) self.odata_type: str = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" @@ -1206,7 +1202,7 @@ class MetricTrigger(_serialization.Model): # pylint: disable=too-many-instance- :vartype time_grain: ~datetime.timedelta :ivar statistic: the metric statistic type. How the metrics from multiple instances are combined. Required. Known values are: "Average", "Min", "Max", "Sum", and "Count". - :vartype statistic: str or ~$(python-base-namespace).v2015_04_01.models.MetricStatisticType + :vartype statistic: str or ~azure.mgmt.monitor.v2015_04_01.models.MetricStatisticType :ivar time_window: the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. Required. @@ -1214,18 +1210,16 @@ class MetricTrigger(_serialization.Model): # pylint: disable=too-many-instance- :ivar time_aggregation: time aggregation type. How the data that is collected should be combined over time. The default value is Average. Required. Known values are: "Average", "Minimum", "Maximum", "Total", "Count", and "Last". - :vartype time_aggregation: str or - ~$(python-base-namespace).v2015_04_01.models.TimeAggregationType + :vartype time_aggregation: str or ~azure.mgmt.monitor.v2015_04_01.models.TimeAggregationType :ivar operator: the operator that is used to compare the metric data and the threshold. Required. Known values are: "Equals", "NotEquals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or ~$(python-base-namespace).v2015_04_01.models.ComparisonOperationType + :vartype operator: str or ~azure.mgmt.monitor.v2015_04_01.models.ComparisonOperationType :ivar threshold: the threshold of the metric that triggers the scale action. Required. :vartype threshold: float :ivar dimensions: List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. - :vartype dimensions: - list[~$(python-base-namespace).v2015_04_01.models.ScaleRuleMetricDimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2015_04_01.models.ScaleRuleMetricDimension] :ivar divide_per_instance: a value indicating whether metric should divide per instance. :vartype divide_per_instance: bool """ @@ -1289,7 +1283,7 @@ def __init__( :paramtype time_grain: ~datetime.timedelta :keyword statistic: the metric statistic type. How the metrics from multiple instances are combined. Required. Known values are: "Average", "Min", "Max", "Sum", and "Count". - :paramtype statistic: str or ~$(python-base-namespace).v2015_04_01.models.MetricStatisticType + :paramtype statistic: str or ~azure.mgmt.monitor.v2015_04_01.models.MetricStatisticType :keyword time_window: the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. Required. @@ -1297,19 +1291,16 @@ def __init__( :keyword time_aggregation: time aggregation type. How the data that is collected should be combined over time. The default value is Average. Required. Known values are: "Average", "Minimum", "Maximum", "Total", "Count", and "Last". - :paramtype time_aggregation: str or - ~$(python-base-namespace).v2015_04_01.models.TimeAggregationType + :paramtype time_aggregation: str or ~azure.mgmt.monitor.v2015_04_01.models.TimeAggregationType :keyword operator: the operator that is used to compare the metric data and the threshold. Required. Known values are: "Equals", "NotEquals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or - ~$(python-base-namespace).v2015_04_01.models.ComparisonOperationType + :paramtype operator: str or ~azure.mgmt.monitor.v2015_04_01.models.ComparisonOperationType :keyword threshold: the threshold of the metric that triggers the scale action. Required. :paramtype threshold: float :keyword dimensions: List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. - :paramtype dimensions: - list[~$(python-base-namespace).v2015_04_01.models.ScaleRuleMetricDimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2015_04_01.models.ScaleRuleMetricDimension] :keyword divide_per_instance: a value indicating whether metric should divide per instance. :paramtype divide_per_instance: bool """ @@ -1334,7 +1325,7 @@ class Operation(_serialization.Model): :ivar name: Operation name: {provider}/{resource}/{operation}. :vartype name: str :ivar display: Display metadata associated with the operation. - :vartype display: ~$(python-base-namespace).v2015_04_01.models.OperationDisplay + :vartype display: ~azure.mgmt.monitor.v2015_04_01.models.OperationDisplay """ _attribute_map = { @@ -1349,7 +1340,7 @@ def __init__( :keyword name: Operation name: {provider}/{resource}/{operation}. :paramtype name: str :keyword display: Display metadata associated with the operation. - :paramtype display: ~$(python-base-namespace).v2015_04_01.models.OperationDisplay + :paramtype display: ~azure.mgmt.monitor.v2015_04_01.models.OperationDisplay """ super().__init__(**kwargs) self.name = name @@ -1400,7 +1391,7 @@ class OperationListResult(_serialization.Model): and a URL link to get the next set of results. :ivar value: List of operations supported by the Microsoft.Insights provider. - :vartype value: list[~$(python-base-namespace).v2015_04_01.models.Operation] + :vartype value: list[~azure.mgmt.monitor.v2015_04_01.models.Operation] :ivar next_link: URL to get the next set of operation list results if there are any. :vartype next_link: str """ @@ -1415,7 +1406,7 @@ def __init__( ) -> None: """ :keyword value: List of operations supported by the Microsoft.Insights provider. - :paramtype value: list[~$(python-base-namespace).v2015_04_01.models.Operation] + :paramtype value: list[~azure.mgmt.monitor.v2015_04_01.models.Operation] :keyword next_link: URL to get the next set of operation list results if there are any. :paramtype next_link: str """ @@ -1435,9 +1426,9 @@ class Recurrence(_serialization.Model): set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. Required. Known values are: "None", "Second", "Minute", "Hour", "Day", "Week", "Month", and "Year". - :vartype frequency: str or ~$(python-base-namespace).v2015_04_01.models.RecurrenceFrequency + :vartype frequency: str or ~azure.mgmt.monitor.v2015_04_01.models.RecurrenceFrequency :ivar schedule: the scheduling constraints for when the profile begins. Required. - :vartype schedule: ~$(python-base-namespace).v2015_04_01.models.RecurrentSchedule + :vartype schedule: ~azure.mgmt.monitor.v2015_04_01.models.RecurrentSchedule """ _validation = { @@ -1463,9 +1454,9 @@ def __init__( example, to set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. Required. Known values are: "None", "Second", "Minute", "Hour", "Day", "Week", "Month", and "Year". - :paramtype frequency: str or ~$(python-base-namespace).v2015_04_01.models.RecurrenceFrequency + :paramtype frequency: str or ~azure.mgmt.monitor.v2015_04_01.models.RecurrenceFrequency :keyword schedule: the scheduling constraints for when the profile begins. Required. - :paramtype schedule: ~$(python-base-namespace).v2015_04_01.models.RecurrentSchedule + :paramtype schedule: ~azure.mgmt.monitor.v2015_04_01.models.RecurrentSchedule """ super().__init__(**kwargs) self.frequency = frequency @@ -1789,8 +1780,7 @@ class RuleManagementEventDataSource(RuleDataSource): # pylint: disable=too-many :ivar sub_status: the substatus. :vartype sub_status: str :ivar claims: the claims. - :vartype claims: - ~$(python-base-namespace).v2015_04_01.models.RuleManagementEventClaimsDataSource + :vartype claims: ~azure.mgmt.monitor.v2015_04_01.models.RuleManagementEventClaimsDataSource """ _validation = { @@ -1862,8 +1852,7 @@ def __init__( :keyword sub_status: the substatus. :paramtype sub_status: str :keyword claims: the claims. - :paramtype claims: - ~$(python-base-namespace).v2015_04_01.models.RuleManagementEventClaimsDataSource + :paramtype claims: ~azure.mgmt.monitor.v2015_04_01.models.RuleManagementEventClaimsDataSource """ super().__init__( resource_uri=resource_uri, @@ -2005,10 +1994,10 @@ class ScaleAction(_serialization.Model): :ivar direction: the scale direction. Whether the scaling action increases or decreases the number of instances. Required. Known values are: "None", "Increase", and "Decrease". - :vartype direction: str or ~$(python-base-namespace).v2015_04_01.models.ScaleDirection + :vartype direction: str or ~azure.mgmt.monitor.v2015_04_01.models.ScaleDirection :ivar type: the type of action that should occur when the scale rule fires. Required. Known values are: "ChangeCount", "PercentChangeCount", "ExactCount", and "ServiceAllowedNextValue". - :vartype type: str or ~$(python-base-namespace).v2015_04_01.models.ScaleType + :vartype type: str or ~azure.mgmt.monitor.v2015_04_01.models.ScaleType :ivar value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. :vartype value: str @@ -2042,10 +2031,10 @@ def __init__( """ :keyword direction: the scale direction. Whether the scaling action increases or decreases the number of instances. Required. Known values are: "None", "Increase", and "Decrease". - :paramtype direction: str or ~$(python-base-namespace).v2015_04_01.models.ScaleDirection + :paramtype direction: str or ~azure.mgmt.monitor.v2015_04_01.models.ScaleDirection :keyword type: the type of action that should occur when the scale rule fires. Required. Known values are: "ChangeCount", "PercentChangeCount", "ExactCount", and "ServiceAllowedNextValue". - :paramtype type: str or ~$(python-base-namespace).v2015_04_01.models.ScaleType + :paramtype type: str or ~azure.mgmt.monitor.v2015_04_01.models.ScaleType :keyword value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. :paramtype value: str @@ -2112,9 +2101,9 @@ class ScaleRule(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar metric_trigger: the trigger that results in a scaling action. Required. - :vartype metric_trigger: ~$(python-base-namespace).v2015_04_01.models.MetricTrigger + :vartype metric_trigger: ~azure.mgmt.monitor.v2015_04_01.models.MetricTrigger :ivar scale_action: the parameters for the scaling action. Required. - :vartype scale_action: ~$(python-base-namespace).v2015_04_01.models.ScaleAction + :vartype scale_action: ~azure.mgmt.monitor.v2015_04_01.models.ScaleAction """ _validation = { @@ -2132,9 +2121,9 @@ def __init__( ) -> None: """ :keyword metric_trigger: the trigger that results in a scaling action. Required. - :paramtype metric_trigger: ~$(python-base-namespace).v2015_04_01.models.MetricTrigger + :paramtype metric_trigger: ~azure.mgmt.monitor.v2015_04_01.models.MetricTrigger :keyword scale_action: the parameters for the scaling action. Required. - :paramtype scale_action: ~$(python-base-namespace).v2015_04_01.models.ScaleAction + :paramtype scale_action: ~azure.mgmt.monitor.v2015_04_01.models.ScaleAction """ super().__init__(**kwargs) self.metric_trigger = metric_trigger @@ -2152,7 +2141,7 @@ class ScaleRuleMetricDimension(_serialization.Model): being equal to any of the values. 'NotEquals' being not equal to all of the values. Required. Known values are: "Equals" and "NotEquals". :vartype operator: str or - ~$(python-base-namespace).v2015_04_01.models.ScaleRuleMetricDimensionOperationType + ~azure.mgmt.monitor.v2015_04_01.models.ScaleRuleMetricDimensionOperationType :ivar values: list of dimension values. For example: ["App1","App2"]. Required. :vartype values: list[str] """ @@ -2184,7 +2173,7 @@ def __init__( 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. Required. Known values are: "Equals" and "NotEquals". :paramtype operator: str or - ~$(python-base-namespace).v2015_04_01.models.ScaleRuleMetricDimensionOperationType + ~azure.mgmt.monitor.v2015_04_01.models.ScaleRuleMetricDimensionOperationType :keyword values: list of dimension values. For example: ["App1","App2"]. Required. :paramtype values: list[str] """ @@ -2242,10 +2231,10 @@ class ThresholdRuleCondition(RuleCondition): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2015_04_01.models.RuleDataSource :ivar operator: the operator used to compare the data and the threshold. Required. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or ~$(python-base-namespace).v2015_04_01.models.ConditionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2015_04_01.models.ConditionOperator :ivar threshold: the threshold value that activates the alert. Required. :vartype threshold: float :ivar window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -2256,7 +2245,7 @@ class ThresholdRuleCondition(RuleCondition): be combined over time. The default value is the PrimaryAggregationType of the Metric. Known values are: "Average", "Minimum", "Maximum", "Total", and "Last". :vartype time_aggregation: str or - ~$(python-base-namespace).v2015_04_01.models.TimeAggregationOperator + ~azure.mgmt.monitor.v2015_04_01.models.TimeAggregationOperator """ _validation = { @@ -2287,10 +2276,10 @@ def __init__( """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2015_04_01.models.RuleDataSource :keyword operator: the operator used to compare the data and the threshold. Required. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or ~$(python-base-namespace).v2015_04_01.models.ConditionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2015_04_01.models.ConditionOperator :keyword threshold: the threshold value that activates the alert. Required. :paramtype threshold: float :keyword window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -2301,7 +2290,7 @@ def __init__( should be combined over time. The default value is the PrimaryAggregationType of the Metric. Known values are: "Average", "Minimum", "Maximum", "Total", and "Last". :paramtype time_aggregation: str or - ~$(python-base-namespace).v2015_04_01.models.TimeAggregationOperator + ~azure.mgmt.monitor.v2015_04_01.models.TimeAggregationOperator """ super().__init__(data_source=data_source, **kwargs) self.odata_type: str = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py index 9ee792bd6ad7..41448270c836 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +41,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,7 +72,7 @@ class ActivityLogsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.MonitorManagementClient`'s :attr:`activity_logs` attribute. """ @@ -120,13 +115,13 @@ def list(self, filter: str, select: Optional[str] = None, **kwargs: Any) -> Iter :type select: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either EventData or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_04_01.models.EventData] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_04_01.models.EventData] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py index 534ee776ee7f..4d80bab51be1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +41,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -80,7 +75,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -111,7 +106,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,7 +137,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,7 +171,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -206,7 +201,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -232,7 +227,7 @@ class AlertRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.MonitorManagementClient`'s :attr:`alert_rules` attribute. """ @@ -263,13 +258,13 @@ def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :type parameters: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -297,7 +292,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -314,13 +309,13 @@ def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a AlertRuleResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -334,7 +329,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -415,7 +410,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -474,7 +469,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -531,13 +526,13 @@ def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResourcePatch + :type alert_rules_resource: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -566,7 +561,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -588,14 +583,13 @@ def update( :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Is either a AlertRuleResourcePatch type or a IO type. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResourcePatch - or IO + :type alert_rules_resource: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -609,7 +603,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -672,14 +666,13 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_04_01.models.AlertRuleResource] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -746,14 +739,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AlertRuleReso :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_04_01.models.AlertRuleResource] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_04_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py index 5253f300c718..9f69f7172c88 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +71,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -112,7 +107,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -145,7 +140,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -178,7 +173,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -212,7 +207,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -238,7 +233,7 @@ class AutoscaleSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.MonitorManagementClient`'s :attr:`autoscale_settings` attribute. """ @@ -264,13 +259,13 @@ def list_by_resource_group( :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -349,13 +344,13 @@ def create_or_update( :param autoscale_setting_name: The autoscale setting name. Required. :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :type parameters: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -383,7 +378,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -404,13 +399,13 @@ def create_or_update( :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Is either a AutoscaleSettingResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource or IO + :type parameters: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -424,7 +419,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -505,7 +500,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -552,7 +547,7 @@ def get( :type autoscale_setting_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -566,7 +561,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -624,13 +619,13 @@ def update( :type autoscale_setting_name: str :param autoscale_setting_resource: Parameters supplied to the operation. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResourcePatch + ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -659,7 +654,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -682,13 +677,13 @@ def update( :param autoscale_setting_resource: Parameters supplied to the operation. Is either a AutoscaleSettingResourcePatch type or a IO type. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResourcePatch or IO + ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -702,7 +697,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -760,13 +755,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AutoscaleSett :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_04_01.models.AutoscaleSettingResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_04_01.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py index 410131451239..a09308f98491 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -65,7 +60,7 @@ class EventCategoriesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.MonitorManagementClient`'s :attr:`event_categories` attribute. """ @@ -86,14 +81,13 @@ def list(self, **kwargs: Any) -> Iterable["_models.LocalizableString"]: :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LocalizableString or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_04_01.models.LocalizableString] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_04_01.models.LocalizableString] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventCategoryCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py index 89ce207c2b3c..05ac4a16b7d4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -64,7 +59,7 @@ class Operations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.MonitorManagementClient`'s :attr:`operations` attribute. """ @@ -83,7 +78,7 @@ def list(self, **kwargs: Any) -> _models.OperationListResult: :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_04_01.models.OperationListResult + :rtype: ~azure.mgmt.monitor.v2015_04_01.models.OperationListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -97,7 +92,7 @@ def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py index d88c0e1f614e..60dea5639b33 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_list_request(*, filter: Optional[str] = None, select: Optional[str] = _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -69,7 +64,7 @@ class TenantActivityLogsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_04_01.MonitorManagementClient`'s :attr:`tenant_activity_logs` attribute. """ @@ -119,13 +114,13 @@ def list( :type select: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either EventData or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_04_01.models.EventData] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_04_01.models.EventData] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-04-01")) cls: ClsType[_models.EventDataCollection] = kwargs.pop("cls", None) error_map = { 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_management_client.py index d80153709df9..f731fd10450f 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_management_client.py @@ -32,14 +32,14 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar service_diagnostic_settings: ServiceDiagnosticSettingsOperations operations :vartype service_diagnostic_settings: - $(python-base-namespace).v2015_07_01.operations.ServiceDiagnosticSettingsOperations + azure.mgmt.monitor.v2015_07_01.operations.ServiceDiagnosticSettingsOperations :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2015_07_01.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2015_07_01.operations.MetricDefinitionsOperations :ivar alert_rules: AlertRulesOperations operations - :vartype alert_rules: $(python-base-namespace).v2015_07_01.operations.AlertRulesOperations + :vartype alert_rules: azure.mgmt.monitor.v2015_07_01.operations.AlertRulesOperations :ivar operations: Operations operations - :vartype operations: $(python-base-namespace).v2015_07_01.operations.Operations + :vartype operations: azure.mgmt.monitor.v2015_07_01.operations.Operations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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_management_client.py index 4a93b3c31de2..34c68d3a46a3 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_management_client.py @@ -32,14 +32,14 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar service_diagnostic_settings: ServiceDiagnosticSettingsOperations operations :vartype service_diagnostic_settings: - $(python-base-namespace).v2015_07_01.aio.operations.ServiceDiagnosticSettingsOperations + azure.mgmt.monitor.v2015_07_01.aio.operations.ServiceDiagnosticSettingsOperations :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2015_07_01.aio.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2015_07_01.aio.operations.MetricDefinitionsOperations :ivar alert_rules: AlertRulesOperations operations - :vartype alert_rules: $(python-base-namespace).v2015_07_01.aio.operations.AlertRulesOperations + :vartype alert_rules: azure.mgmt.monitor.v2015_07_01.aio.operations.AlertRulesOperations :ivar operations: Operations operations - :vartype operations: $(python-base-namespace).v2015_07_01.aio.operations.Operations + :vartype operations: azure.mgmt.monitor.v2015_07_01.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py index 791ee8984256..01f85a07da2c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +46,7 @@ class AlertRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_07_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_07_01.aio.MonitorManagementClient`'s :attr:`alert_rules` attribute. """ @@ -82,13 +77,13 @@ async def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :type parameters: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -116,7 +111,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -133,13 +128,13 @@ async def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a AlertRuleResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -153,7 +148,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -234,7 +229,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -279,7 +274,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -293,7 +288,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -350,13 +345,13 @@ async def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResourcePatch + :type alert_rules_resource: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -385,7 +380,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -407,14 +402,13 @@ async def update( :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Is either a AlertRuleResourcePatch type or a IO type. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResourcePatch - or IO + :type alert_rules_resource: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -428,7 +422,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -494,13 +488,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_07_01.models.AlertRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -568,13 +562,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AlertRul :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_07_01.models.AlertRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py index 8c5205e5360b..51928f7de011 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_07_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_07_01.aio.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -74,13 +69,13 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_07_01.models.MetricDefinition] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2015_07_01.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py index 34188c0319b0..05cc5136db3f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class Operations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_07_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_07_01.aio.MonitorManagementClient`'s :attr:`operations` attribute. """ @@ -61,7 +56,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult: :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.OperationListResult + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.OperationListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -75,7 +70,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py index 3ebe1cd0d77a..a7d0a3178b8f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._service_diagnostic_settings_operations import build_create_or_update_request, build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class ServiceDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_07_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_07_01.aio.MonitorManagementClient`'s :attr:`service_diagnostic_settings` attribute. """ @@ -63,7 +58,7 @@ async def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnost :type resource_uri: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -77,7 +72,7 @@ async def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnost _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -125,14 +120,13 @@ async def create_or_update( :param resource_uri: The identifier of the resource. Required. :type resource_uri: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: - ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :type parameters: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -151,7 +145,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -165,14 +159,14 @@ async def create_or_update( :type resource_uri: str :param parameters: Parameters supplied to the operation. Is either a ServiceDiagnosticSettingsResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource or IO + :type parameters: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -186,7 +180,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) 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 f9b0a8b41d11..3f108a3518d5 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 @@ -99,13 +99,13 @@ class AlertRuleResource(Resource): # pylint: disable=too-many-instance-attribut :ivar is_enabled: the flag that indicates whether the alert rule is enabled. Required. :vartype is_enabled: bool :ivar condition: the condition that results in the alert rule being activated. Required. - :vartype condition: ~$(python-base-namespace).v2015_07_01.models.RuleCondition + :vartype condition: ~azure.mgmt.monitor.v2015_07_01.models.RuleCondition :ivar action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype action: ~$(python-base-namespace).v2015_07_01.models.RuleAction + :vartype action: ~azure.mgmt.monitor.v2015_07_01.models.RuleAction :ivar actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype actions: list[~$(python-base-namespace).v2015_07_01.models.RuleAction] + :vartype actions: list[~azure.mgmt.monitor.v2015_07_01.models.RuleAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime """ @@ -166,13 +166,13 @@ def __init__( :keyword is_enabled: the flag that indicates whether the alert rule is enabled. Required. :paramtype is_enabled: bool :keyword condition: the condition that results in the alert rule being activated. Required. - :paramtype condition: ~$(python-base-namespace).v2015_07_01.models.RuleCondition + :paramtype condition: ~azure.mgmt.monitor.v2015_07_01.models.RuleCondition :keyword action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype action: ~$(python-base-namespace).v2015_07_01.models.RuleAction + :paramtype action: ~azure.mgmt.monitor.v2015_07_01.models.RuleAction :keyword actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype actions: list[~$(python-base-namespace).v2015_07_01.models.RuleAction] + :paramtype actions: list[~azure.mgmt.monitor.v2015_07_01.models.RuleAction] """ super().__init__(location=location, tags=tags, **kwargs) self.name_properties_name = name_properties_name @@ -189,7 +189,7 @@ class AlertRuleResourceCollection(_serialization.Model): """Represents a collection of alert rule resources. :ivar value: the values for the alert rule resources. - :vartype value: list[~$(python-base-namespace).v2015_07_01.models.AlertRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource] """ _attribute_map = { @@ -199,7 +199,7 @@ class AlertRuleResourceCollection(_serialization.Model): def __init__(self, *, value: Optional[List["_models.AlertRuleResource"]] = None, **kwargs: Any) -> None: """ :keyword value: the values for the alert rule resources. - :paramtype value: list[~$(python-base-namespace).v2015_07_01.models.AlertRuleResource] + :paramtype value: list[~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource] """ super().__init__(**kwargs) self.value = value @@ -221,13 +221,13 @@ class AlertRuleResourcePatch(_serialization.Model): :ivar is_enabled: the flag that indicates whether the alert rule is enabled. :vartype is_enabled: bool :ivar condition: the condition that results in the alert rule being activated. - :vartype condition: ~$(python-base-namespace).v2015_07_01.models.RuleCondition + :vartype condition: ~azure.mgmt.monitor.v2015_07_01.models.RuleCondition :ivar action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype action: ~$(python-base-namespace).v2015_07_01.models.RuleAction + :vartype action: ~azure.mgmt.monitor.v2015_07_01.models.RuleAction :ivar actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype actions: list[~$(python-base-namespace).v2015_07_01.models.RuleAction] + :vartype actions: list[~azure.mgmt.monitor.v2015_07_01.models.RuleAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime """ @@ -274,13 +274,13 @@ def __init__( :keyword is_enabled: the flag that indicates whether the alert rule is enabled. :paramtype is_enabled: bool :keyword condition: the condition that results in the alert rule being activated. - :paramtype condition: ~$(python-base-namespace).v2015_07_01.models.RuleCondition + :paramtype condition: ~azure.mgmt.monitor.v2015_07_01.models.RuleCondition :keyword action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype action: ~$(python-base-namespace).v2015_07_01.models.RuleAction + :paramtype action: ~azure.mgmt.monitor.v2015_07_01.models.RuleAction :keyword actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype actions: list[~$(python-base-namespace).v2015_07_01.models.RuleAction] + :paramtype actions: list[~azure.mgmt.monitor.v2015_07_01.models.RuleAction] """ super().__init__(**kwargs) self.tags = tags @@ -356,7 +356,7 @@ class ErrorContract(_serialization.Model): operations. (This also follows the OData error response format.). :ivar error: The error object. - :vartype error: ~$(python-base-namespace).v2015_07_01.models.ErrorResponse + :vartype error: ~azure.mgmt.monitor.v2015_07_01.models.ErrorResponse """ _attribute_map = { @@ -366,7 +366,7 @@ class ErrorContract(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorResponse"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~$(python-base-namespace).v2015_07_01.models.ErrorResponse + :paramtype error: ~azure.mgmt.monitor.v2015_07_01.models.ErrorResponse """ super().__init__(**kwargs) self.error = error @@ -445,7 +445,7 @@ class RuleCondition(_serialization.Model): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2015_07_01.models.RuleDataSource """ _validation = { @@ -469,7 +469,7 @@ def __init__(self, *, data_source: Optional["_models.RuleDataSource"] = None, ** """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2015_07_01.models.RuleDataSource """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -488,7 +488,7 @@ class LocationThresholdRuleCondition(RuleCondition): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2015_07_01.models.RuleDataSource :ivar window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. @@ -521,7 +521,7 @@ def __init__( """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2015_07_01.models.RuleDataSource :keyword window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. @@ -548,7 +548,7 @@ class LogSettings(_serialization.Model): :ivar enabled: a value indicating whether this log is enabled. Required. :vartype enabled: bool :ivar retention_policy: the retention policy for this log. - :vartype retention_policy: ~$(python-base-namespace).v2015_07_01.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2015_07_01.models.RetentionPolicy """ _validation = { @@ -577,7 +577,7 @@ def __init__( :keyword enabled: a value indicating whether this log is enabled. Required. :paramtype enabled: bool :keyword retention_policy: the retention policy for this log. - :paramtype retention_policy: ~$(python-base-namespace).v2015_07_01.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2015_07_01.models.RetentionPolicy """ super().__init__(**kwargs) self.category = category @@ -629,7 +629,7 @@ class ManagementEventAggregationCondition(_serialization.Model): :ivar operator: the condition operator. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or ~$(python-base-namespace).v2015_07_01.models.ConditionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2015_07_01.models.ConditionOperator :ivar threshold: The threshold value that activates the alert. :vartype threshold: float :ivar window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -655,7 +655,7 @@ def __init__( """ :keyword operator: the condition operator. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or ~$(python-base-namespace).v2015_07_01.models.ConditionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2015_07_01.models.ConditionOperator :keyword threshold: The threshold value that activates the alert. :paramtype threshold: float :keyword window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -681,12 +681,12 @@ class ManagementEventRuleCondition(RuleCondition): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2015_07_01.models.RuleDataSource :ivar aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate. :vartype aggregation: - ~$(python-base-namespace).v2015_07_01.models.ManagementEventAggregationCondition + ~azure.mgmt.monitor.v2015_07_01.models.ManagementEventAggregationCondition """ _validation = { @@ -709,12 +709,12 @@ def __init__( """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2015_07_01.models.RuleDataSource :keyword aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate. :paramtype aggregation: - ~$(python-base-namespace).v2015_07_01.models.ManagementEventAggregationCondition + ~azure.mgmt.monitor.v2015_07_01.models.ManagementEventAggregationCondition """ super().__init__(data_source=data_source, **kwargs) self.odata_type: str = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" @@ -732,7 +732,7 @@ class MetricAvailability(_serialization.Model): a duration 'PT1M', 'P1D', etc. :vartype retention: ~datetime.timedelta :ivar location: Info about where the metric data is stored. - :vartype location: ~$(python-base-namespace).v2015_07_01.models.MetricAvailabilityLocation + :vartype location: ~azure.mgmt.monitor.v2015_07_01.models.MetricAvailabilityLocation """ _attribute_map = { @@ -757,7 +757,7 @@ def __init__( as a duration 'PT1M', 'P1D', etc. :paramtype retention: ~datetime.timedelta :keyword location: Info about where the metric data is stored. - :paramtype location: ~$(python-base-namespace).v2015_07_01.models.MetricAvailabilityLocation + :paramtype location: ~azure.mgmt.monitor.v2015_07_01.models.MetricAvailabilityLocation """ super().__init__(**kwargs) self.time_grain = time_grain @@ -771,7 +771,7 @@ class MetricAvailabilityLocation(_serialization.Model): :ivar table_endpoint: The url for the storage account. :vartype table_endpoint: str :ivar table_info: Info about the storage tables storing this resources metrics. - :vartype table_info: list[~$(python-base-namespace).v2015_07_01.models.TableInfoEntry] + :vartype table_info: list[~azure.mgmt.monitor.v2015_07_01.models.TableInfoEntry] :ivar partition_key: partition key in the table where the metrics for this resource are stored. :vartype partition_key: str """ @@ -794,7 +794,7 @@ def __init__( :keyword table_endpoint: The url for the storage account. :paramtype table_endpoint: str :keyword table_info: Info about the storage tables storing this resources metrics. - :paramtype table_info: list[~$(python-base-namespace).v2015_07_01.models.TableInfoEntry] + :paramtype table_info: list[~azure.mgmt.monitor.v2015_07_01.models.TableInfoEntry] :keyword partition_key: partition key in the table where the metrics for this resource are stored. :paramtype partition_key: str @@ -813,12 +813,12 @@ class MetricDefinition(_serialization.Model): # pylint: disable=too-many-instan :ivar resource_uri: The resource identifier of the resource that emitted the metric. :vartype resource_uri: str :ivar name: the name and the display name of the metric, i.e. it is a localizable string. - :vartype name: ~$(python-base-namespace).v2015_07_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2015_07_01.models.LocalizableString :ivar category: The category of this metric. :vartype category: str :ivar unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", and "MilliSeconds". - :vartype unit: str or ~$(python-base-namespace).v2015_07_01.models.Unit + :vartype unit: str or ~azure.mgmt.monitor.v2015_07_01.models.Unit :ivar start_time: Start time of the metadata request timespan. :vartype start_time: ~datetime.datetime :ivar end_time: End time of the metadata request timespan. @@ -827,15 +827,14 @@ class MetricDefinition(_serialization.Model): # pylint: disable=too-many-instan values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :vartype primary_aggregation_type: str or - ~$(python-base-namespace).v2015_07_01.models.AggregationType + ~azure.mgmt.monitor.v2015_07_01.models.AggregationType :ivar supported_aggregation_types: List of all aggregations that are applicable for this metric. :vartype supported_aggregation_types: list[str or - ~$(python-base-namespace).v2015_07_01.models.AggregationType] + ~azure.mgmt.monitor.v2015_07_01.models.AggregationType] :ivar metric_availabilities: the collection of what aggregation intervals are available to be queried. - :vartype metric_availabilities: - list[~$(python-base-namespace).v2015_07_01.models.MetricAvailability] + :vartype metric_availabilities: list[~azure.mgmt.monitor.v2015_07_01.models.MetricAvailability] :ivar id: the resource identifier of the metric definition. :vartype id: str """ @@ -876,12 +875,12 @@ def __init__( :keyword resource_uri: The resource identifier of the resource that emitted the metric. :paramtype resource_uri: str :keyword name: the name and the display name of the metric, i.e. it is a localizable string. - :paramtype name: ~$(python-base-namespace).v2015_07_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2015_07_01.models.LocalizableString :keyword category: The category of this metric. :paramtype category: str :keyword unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", and "MilliSeconds". - :paramtype unit: str or ~$(python-base-namespace).v2015_07_01.models.Unit + :paramtype unit: str or ~azure.mgmt.monitor.v2015_07_01.models.Unit :keyword start_time: Start time of the metadata request timespan. :paramtype start_time: ~datetime.datetime :keyword end_time: End time of the metadata request timespan. @@ -890,15 +889,15 @@ def __init__( values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :paramtype primary_aggregation_type: str or - ~$(python-base-namespace).v2015_07_01.models.AggregationType + ~azure.mgmt.monitor.v2015_07_01.models.AggregationType :keyword supported_aggregation_types: List of all aggregations that are applicable for this metric. :paramtype supported_aggregation_types: list[str or - ~$(python-base-namespace).v2015_07_01.models.AggregationType] + ~azure.mgmt.monitor.v2015_07_01.models.AggregationType] :keyword metric_availabilities: the collection of what aggregation intervals are available to be queried. :paramtype metric_availabilities: - list[~$(python-base-namespace).v2015_07_01.models.MetricAvailability] + list[~azure.mgmt.monitor.v2015_07_01.models.MetricAvailability] :keyword id: the resource identifier of the metric definition. :paramtype id: str """ @@ -924,7 +923,7 @@ class MetricDefinitionCollection(_serialization.Model): :ivar id: Resource Id for these metric definitions. :vartype id: str :ivar value: the values for the metric definitions. Required. - :vartype value: list[~$(python-base-namespace).v2015_07_01.models.MetricDefinition] + :vartype value: list[~azure.mgmt.monitor.v2015_07_01.models.MetricDefinition] """ _validation = { @@ -947,7 +946,7 @@ def __init__( :keyword id: Resource Id for these metric definitions. :paramtype id: str :keyword value: the values for the metric definitions. Required. - :paramtype value: list[~$(python-base-namespace).v2015_07_01.models.MetricDefinition] + :paramtype value: list[~azure.mgmt.monitor.v2015_07_01.models.MetricDefinition] """ super().__init__(**kwargs) self.id = id @@ -964,7 +963,7 @@ class MetricSettings(_serialization.Model): :ivar enabled: a value indicating whether this timegrain is enabled. Required. :vartype enabled: bool :ivar retention_policy: the retention policy for this timegrain. - :vartype retention_policy: ~$(python-base-namespace).v2015_07_01.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2015_07_01.models.RetentionPolicy """ _validation = { @@ -992,7 +991,7 @@ def __init__( :keyword enabled: a value indicating whether this timegrain is enabled. Required. :paramtype enabled: bool :keyword retention_policy: the retention policy for this timegrain. - :paramtype retention_policy: ~$(python-base-namespace).v2015_07_01.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2015_07_01.models.RetentionPolicy """ super().__init__(**kwargs) self.time_grain = time_grain @@ -1026,7 +1025,7 @@ class MetricSpecification(_serialization.Model): # pylint: disable=too-many-ins :ivar category: Category or type of metric. :vartype category: str :ivar dimensions: The dimensions of metric. - :vartype dimensions: list[~$(python-base-namespace).v2015_07_01.models.DimensionProperties] + :vartype dimensions: list[~azure.mgmt.monitor.v2015_07_01.models.DimensionProperties] :ivar fill_gap_with_zero: Property to specify whether to fill empty gaps with zero. :vartype fill_gap_with_zero: bool :ivar internal_metric_name: The internal metric name. @@ -1091,7 +1090,7 @@ def __init__( :keyword category: Category or type of metric. :paramtype category: str :keyword dimensions: The dimensions of metric. - :paramtype dimensions: list[~$(python-base-namespace).v2015_07_01.models.DimensionProperties] + :paramtype dimensions: list[~azure.mgmt.monitor.v2015_07_01.models.DimensionProperties] :keyword fill_gap_with_zero: Property to specify whether to fill empty gaps with zero. :paramtype fill_gap_with_zero: bool :keyword internal_metric_name: The internal metric name. @@ -1121,10 +1120,9 @@ class Operation(_serialization.Model): :ivar is_data_action: Property to specify whether the action is a data action. :vartype is_data_action: bool :ivar display: Display metadata associated with the operation. - :vartype display: ~$(python-base-namespace).v2015_07_01.models.OperationDisplay + :vartype display: ~azure.mgmt.monitor.v2015_07_01.models.OperationDisplay :ivar service_specification: One property of operation, include metric specifications. - :vartype service_specification: - ~$(python-base-namespace).v2015_07_01.models.ServiceSpecification + :vartype service_specification: ~azure.mgmt.monitor.v2015_07_01.models.ServiceSpecification """ _attribute_map = { @@ -1149,10 +1147,9 @@ def __init__( :keyword is_data_action: Property to specify whether the action is a data action. :paramtype is_data_action: bool :keyword display: Display metadata associated with the operation. - :paramtype display: ~$(python-base-namespace).v2015_07_01.models.OperationDisplay + :paramtype display: ~azure.mgmt.monitor.v2015_07_01.models.OperationDisplay :keyword service_specification: One property of operation, include metric specifications. - :paramtype service_specification: - ~$(python-base-namespace).v2015_07_01.models.ServiceSpecification + :paramtype service_specification: ~azure.mgmt.monitor.v2015_07_01.models.ServiceSpecification """ super().__init__(**kwargs) self.name = name @@ -1219,7 +1216,7 @@ class OperationListResult(_serialization.Model): and a URL link to get the next set of results. :ivar value: List of operations supported by the Microsoft.Insights provider. - :vartype value: list[~$(python-base-namespace).v2015_07_01.models.Operation] + :vartype value: list[~azure.mgmt.monitor.v2015_07_01.models.Operation] :ivar next_link: URL to get the next set of operation list results if there are any. :vartype next_link: str """ @@ -1234,7 +1231,7 @@ def __init__( ) -> None: """ :keyword value: List of operations supported by the Microsoft.Insights provider. - :paramtype value: list[~$(python-base-namespace).v2015_07_01.models.Operation] + :paramtype value: list[~azure.mgmt.monitor.v2015_07_01.models.Operation] :keyword next_link: URL to get the next set of operation list results if there are any. :paramtype next_link: str """ @@ -1486,8 +1483,7 @@ class RuleManagementEventDataSource(RuleDataSource): # pylint: disable=too-many :ivar sub_status: the substatus. :vartype sub_status: str :ivar claims: the claims. - :vartype claims: - ~$(python-base-namespace).v2015_07_01.models.RuleManagementEventClaimsDataSource + :vartype claims: ~azure.mgmt.monitor.v2015_07_01.models.RuleManagementEventClaimsDataSource """ _validation = { @@ -1559,8 +1555,7 @@ def __init__( :keyword sub_status: the substatus. :paramtype sub_status: str :keyword claims: the claims. - :paramtype claims: - ~$(python-base-namespace).v2015_07_01.models.RuleManagementEventClaimsDataSource + :paramtype claims: ~azure.mgmt.monitor.v2015_07_01.models.RuleManagementEventClaimsDataSource """ super().__init__( resource_uri=resource_uri, @@ -1720,9 +1715,9 @@ class ServiceDiagnosticSettingsResource(Resource): format: '{service bus resource ID}/authorizationrules/{key name}'. :vartype service_bus_rule_id: str :ivar metrics: the list of metric settings. - :vartype metrics: list[~$(python-base-namespace).v2015_07_01.models.MetricSettings] + :vartype metrics: list[~azure.mgmt.monitor.v2015_07_01.models.MetricSettings] :ivar logs: the list of logs settings. - :vartype logs: list[~$(python-base-namespace).v2015_07_01.models.LogSettings] + :vartype logs: list[~azure.mgmt.monitor.v2015_07_01.models.LogSettings] :ivar workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -1774,9 +1769,9 @@ def __init__( format: '{service bus resource ID}/authorizationrules/{key name}'. :paramtype service_bus_rule_id: str :keyword metrics: the list of metric settings. - :paramtype metrics: list[~$(python-base-namespace).v2015_07_01.models.MetricSettings] + :paramtype metrics: list[~azure.mgmt.monitor.v2015_07_01.models.MetricSettings] :keyword logs: the list of logs settings. - :paramtype logs: list[~$(python-base-namespace).v2015_07_01.models.LogSettings] + :paramtype logs: list[~azure.mgmt.monitor.v2015_07_01.models.LogSettings] :keyword workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -1794,11 +1789,10 @@ class ServiceSpecification(_serialization.Model): """One property of operation, include log specifications. :ivar log_specifications: Log specifications of operation. - :vartype log_specifications: - list[~$(python-base-namespace).v2015_07_01.models.LogSpecification] + :vartype log_specifications: list[~azure.mgmt.monitor.v2015_07_01.models.LogSpecification] :ivar metric_specifications: Metric specifications of operation. :vartype metric_specifications: - list[~$(python-base-namespace).v2015_07_01.models.MetricSpecification] + list[~azure.mgmt.monitor.v2015_07_01.models.MetricSpecification] :ivar legacy_metric_specifications: Legacy Metric specifications for operation. Deprecated, do not use. :vartype legacy_metric_specifications: JSON @@ -1820,11 +1814,10 @@ def __init__( ) -> None: """ :keyword log_specifications: Log specifications of operation. - :paramtype log_specifications: - list[~$(python-base-namespace).v2015_07_01.models.LogSpecification] + :paramtype log_specifications: list[~azure.mgmt.monitor.v2015_07_01.models.LogSpecification] :keyword metric_specifications: Metric specifications of operation. :paramtype metric_specifications: - list[~$(python-base-namespace).v2015_07_01.models.MetricSpecification] + list[~azure.mgmt.monitor.v2015_07_01.models.MetricSpecification] :keyword legacy_metric_specifications: Legacy Metric specifications for operation. Deprecated, do not use. :paramtype legacy_metric_specifications: JSON @@ -1900,10 +1893,10 @@ class ThresholdRuleCondition(RuleCondition): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2015_07_01.models.RuleDataSource :ivar operator: the operator used to compare the data and the threshold. Required. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or ~$(python-base-namespace).v2015_07_01.models.ConditionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2015_07_01.models.ConditionOperator :ivar threshold: the threshold value that activates the alert. Required. :vartype threshold: float :ivar window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -1914,7 +1907,7 @@ class ThresholdRuleCondition(RuleCondition): be combined over time. The default value is the PrimaryAggregationType of the Metric. Known values are: "Average", "Minimum", "Maximum", "Total", and "Last". :vartype time_aggregation: str or - ~$(python-base-namespace).v2015_07_01.models.TimeAggregationOperator + ~azure.mgmt.monitor.v2015_07_01.models.TimeAggregationOperator """ _validation = { @@ -1945,10 +1938,10 @@ def __init__( """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2015_07_01.models.RuleDataSource :keyword operator: the operator used to compare the data and the threshold. Required. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or ~$(python-base-namespace).v2015_07_01.models.ConditionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2015_07_01.models.ConditionOperator :keyword threshold: the threshold value that activates the alert. Required. :paramtype threshold: float :keyword window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -1959,7 +1952,7 @@ def __init__( should be combined over time. The default value is the PrimaryAggregationType of the Metric. Known values are: "Average", "Minimum", "Maximum", "Total", and "Last". :paramtype time_aggregation: str or - ~$(python-base-namespace).v2015_07_01.models.TimeAggregationOperator + ~azure.mgmt.monitor.v2015_07_01.models.TimeAggregationOperator """ super().__init__(data_source=data_source, **kwargs) self.odata_type: str = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py index 32328f2555d7..f08dee11cab6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +41,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -80,7 +75,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -111,7 +106,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,7 +137,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,7 +171,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -206,7 +201,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -232,7 +227,7 @@ class AlertRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_07_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_07_01.MonitorManagementClient`'s :attr:`alert_rules` attribute. """ @@ -263,13 +258,13 @@ def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :type parameters: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -297,7 +292,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -314,13 +309,13 @@ def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a AlertRuleResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -334,7 +329,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -415,7 +410,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -474,7 +469,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -531,13 +526,13 @@ def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResourcePatch + :type alert_rules_resource: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -566,7 +561,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -588,14 +583,13 @@ def update( :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Is either a AlertRuleResourcePatch type or a IO type. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResourcePatch - or IO + :type alert_rules_resource: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -609,7 +603,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -672,14 +666,13 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_07_01.models.AlertRuleResource] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -746,14 +739,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AlertRuleReso :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_07_01.models.AlertRuleResource] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_07_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2014-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2014-04-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py index 6d2030791124..9e32aa773b3a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_list_request(resource_uri: str, *, filter: Optional[str] = None, **kwa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,7 +67,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_07_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_07_01.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -102,14 +97,13 @@ def list( :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_07_01.models.MetricDefinition] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2015_07_01.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py index b673f2be2522..37efc4af1b1f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -64,7 +59,7 @@ class Operations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_07_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_07_01.MonitorManagementClient`'s :attr:`operations` attribute. """ @@ -83,7 +78,7 @@ def list(self, **kwargs: Any) -> _models.OperationListResult: :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.OperationListResult + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.OperationListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -97,7 +92,7 @@ def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py index 7a99ea39c932..f6e2ac932398 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_get_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,7 +62,7 @@ def build_create_or_update_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -96,7 +91,7 @@ class ServiceDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2015_07_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2015_07_01.MonitorManagementClient`'s :attr:`service_diagnostic_settings` attribute. """ @@ -117,7 +112,7 @@ def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnosticSett :type resource_uri: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -131,7 +126,7 @@ def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnosticSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -179,14 +174,13 @@ def create_or_update( :param resource_uri: The identifier of the resource. Required. :type resource_uri: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: - ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :type parameters: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -205,7 +199,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -219,14 +213,14 @@ def create_or_update( :type resource_uri: str :param parameters: Parameters supplied to the operation. Is either a ServiceDiagnosticSettingsResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource or IO + :type parameters: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2015_07_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2015_07_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -240,7 +234,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2015-07-01"] = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2015-07-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) 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 a0bc5d9fd0fe..45c019a2dd03 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", "2016-03-01") + api_version: str = kwargs.pop("api_version", "2016-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index 4701fe7483cd..7102648640c1 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_management_client.py @@ -32,14 +32,14 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar alert_rule_incidents: AlertRuleIncidentsOperations operations :vartype alert_rule_incidents: - $(python-base-namespace).v2016_03_01.operations.AlertRuleIncidentsOperations + azure.mgmt.monitor.v2016_03_01.operations.AlertRuleIncidentsOperations :ivar alert_rules: AlertRulesOperations operations - :vartype alert_rules: $(python-base-namespace).v2016_03_01.operations.AlertRulesOperations + :vartype alert_rules: azure.mgmt.monitor.v2016_03_01.operations.AlertRulesOperations :ivar log_profiles: LogProfilesOperations operations - :vartype log_profiles: $(python-base-namespace).v2016_03_01.operations.LogProfilesOperations + :vartype log_profiles: azure.mgmt.monitor.v2016_03_01.operations.LogProfilesOperations :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2016_03_01.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2016_03_01.operations.MetricDefinitionsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 41f10ab23424..b092b2cb7239 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", "2016-03-01") + api_version: str = kwargs.pop("api_version", "2016-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 43adba24c8e5..dcb044338740 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_management_client.py @@ -32,15 +32,14 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar alert_rule_incidents: AlertRuleIncidentsOperations operations :vartype alert_rule_incidents: - $(python-base-namespace).v2016_03_01.aio.operations.AlertRuleIncidentsOperations + azure.mgmt.monitor.v2016_03_01.aio.operations.AlertRuleIncidentsOperations :ivar alert_rules: AlertRulesOperations operations - :vartype alert_rules: $(python-base-namespace).v2016_03_01.aio.operations.AlertRulesOperations + :vartype alert_rules: azure.mgmt.monitor.v2016_03_01.aio.operations.AlertRulesOperations :ivar log_profiles: LogProfilesOperations operations - :vartype log_profiles: - $(python-base-namespace).v2016_03_01.aio.operations.LogProfilesOperations + :vartype log_profiles: azure.mgmt.monitor.v2016_03_01.aio.operations.LogProfilesOperations :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2016_03_01.aio.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2016_03_01.aio.operations.MetricDefinitionsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py index 1764b3b26b46..88163d63ffd3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._alert_rule_incidents_operations import build_get_request, build_list_by_alert_rule_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ class AlertRuleIncidentsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_03_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_03_01.aio.MonitorManagementClient`'s :attr:`alert_rule_incidents` attribute. """ @@ -73,7 +68,7 @@ async def get( :type incident_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Incident or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.Incident + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.Incident :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -87,7 +82,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.Incident] = kwargs.pop("cls", None) request = build_get_request( @@ -140,13 +135,13 @@ def list_by_alert_rule( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Incident or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2016_03_01.models.Incident] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2016_03_01.models.Incident] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.IncidentListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py index e389e31ffe7f..7b923b3df73b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class AlertRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_03_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_03_01.aio.MonitorManagementClient`'s :attr:`alert_rules` attribute. """ @@ -83,13 +78,13 @@ async def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :type parameters: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -117,7 +112,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -134,13 +129,13 @@ async def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a AlertRuleResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -154,7 +149,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -235,7 +230,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -280,7 +275,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -294,7 +289,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -351,13 +346,13 @@ async def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResourcePatch + :type alert_rules_resource: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -386,7 +381,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -408,14 +403,13 @@ async def update( :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Is either a AlertRuleResourcePatch type or a IO type. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResourcePatch - or IO + :type alert_rules_resource: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -429,7 +423,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -495,13 +489,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2016_03_01.models.AlertRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -580,13 +574,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AlertRul :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2016_03_01.models.AlertRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py index 10cb590a9bd3..ecabbf2f5591 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +46,7 @@ class LogProfilesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_03_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_03_01.aio.MonitorManagementClient`'s :attr:`log_profiles` attribute. """ @@ -88,7 +83,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -128,7 +123,7 @@ async def get(self, log_profile_name: str, **kwargs: Any) -> _models.LogProfileR :type log_profile_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -142,7 +137,7 @@ async def get(self, log_profile_name: str, **kwargs: Any) -> _models.LogProfileR _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) request = build_get_request( @@ -191,13 +186,13 @@ async def create_or_update( :param log_profile_name: The name of the log profile. Required. :type log_profile_name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :type parameters: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -216,7 +211,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -230,13 +225,13 @@ async def create_or_update( :type log_profile_name: str :param parameters: Parameters supplied to the operation. Is either a LogProfileResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource or IO + :type parameters: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -250,7 +245,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) @@ -312,14 +307,13 @@ async def update( :param log_profile_name: The name of the log profile. Required. :type log_profile_name: str :param log_profiles_resource: Parameters supplied to the operation. Required. - :type log_profiles_resource: - ~$(python-base-namespace).v2016_03_01.models.LogProfileResourcePatch + :type log_profiles_resource: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -338,7 +332,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -352,14 +346,14 @@ async def update( :type log_profile_name: str :param log_profiles_resource: Parameters supplied to the operation. Is either a LogProfileResourcePatch type or a IO type. Required. - :type log_profiles_resource: - ~$(python-base-namespace).v2016_03_01.models.LogProfileResourcePatch or IO + :type log_profiles_resource: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResourcePatch or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -373,7 +367,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) @@ -429,13 +423,13 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.LogProfileResource"]: :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LogProfileResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2016_03_01.models.LogProfileResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.LogProfileCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py index 556b0b8def4d..d8a60beccbd5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_03_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_03_01.aio.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -75,13 +70,13 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2016_03_01.models.MetricDefinition] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2016_03_01.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { 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 f8da2cbaea2e..9085894db256 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 @@ -92,13 +92,13 @@ class AlertRuleResource(Resource): # pylint: disable=too-many-instance-attribut :ivar is_enabled: the flag that indicates whether the alert rule is enabled. Required. :vartype is_enabled: bool :ivar condition: the condition that results in the alert rule being activated. Required. - :vartype condition: ~$(python-base-namespace).v2016_03_01.models.RuleCondition + :vartype condition: ~azure.mgmt.monitor.v2016_03_01.models.RuleCondition :ivar action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype action: ~$(python-base-namespace).v2016_03_01.models.RuleAction + :vartype action: ~azure.mgmt.monitor.v2016_03_01.models.RuleAction :ivar actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype actions: list[~$(python-base-namespace).v2016_03_01.models.RuleAction] + :vartype actions: list[~azure.mgmt.monitor.v2016_03_01.models.RuleAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime """ @@ -159,13 +159,13 @@ def __init__( :keyword is_enabled: the flag that indicates whether the alert rule is enabled. Required. :paramtype is_enabled: bool :keyword condition: the condition that results in the alert rule being activated. Required. - :paramtype condition: ~$(python-base-namespace).v2016_03_01.models.RuleCondition + :paramtype condition: ~azure.mgmt.monitor.v2016_03_01.models.RuleCondition :keyword action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype action: ~$(python-base-namespace).v2016_03_01.models.RuleAction + :paramtype action: ~azure.mgmt.monitor.v2016_03_01.models.RuleAction :keyword actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype actions: list[~$(python-base-namespace).v2016_03_01.models.RuleAction] + :paramtype actions: list[~azure.mgmt.monitor.v2016_03_01.models.RuleAction] """ super().__init__(location=location, tags=tags, **kwargs) self.name_properties_name = name_properties_name @@ -182,7 +182,7 @@ class AlertRuleResourceCollection(_serialization.Model): """Represents a collection of alert rule resources. :ivar value: the values for the alert rule resources. - :vartype value: list[~$(python-base-namespace).v2016_03_01.models.AlertRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource] """ _attribute_map = { @@ -192,7 +192,7 @@ class AlertRuleResourceCollection(_serialization.Model): def __init__(self, *, value: Optional[List["_models.AlertRuleResource"]] = None, **kwargs: Any) -> None: """ :keyword value: the values for the alert rule resources. - :paramtype value: list[~$(python-base-namespace).v2016_03_01.models.AlertRuleResource] + :paramtype value: list[~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource] """ super().__init__(**kwargs) self.value = value @@ -214,13 +214,13 @@ class AlertRuleResourcePatch(_serialization.Model): :ivar is_enabled: the flag that indicates whether the alert rule is enabled. :vartype is_enabled: bool :ivar condition: the condition that results in the alert rule being activated. - :vartype condition: ~$(python-base-namespace).v2016_03_01.models.RuleCondition + :vartype condition: ~azure.mgmt.monitor.v2016_03_01.models.RuleCondition :ivar action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype action: ~$(python-base-namespace).v2016_03_01.models.RuleAction + :vartype action: ~azure.mgmt.monitor.v2016_03_01.models.RuleAction :ivar actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype actions: list[~$(python-base-namespace).v2016_03_01.models.RuleAction] + :vartype actions: list[~azure.mgmt.monitor.v2016_03_01.models.RuleAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime """ @@ -267,13 +267,13 @@ def __init__( :keyword is_enabled: the flag that indicates whether the alert rule is enabled. :paramtype is_enabled: bool :keyword condition: the condition that results in the alert rule being activated. - :paramtype condition: ~$(python-base-namespace).v2016_03_01.models.RuleCondition + :paramtype condition: ~azure.mgmt.monitor.v2016_03_01.models.RuleCondition :keyword action: action that is performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype action: ~$(python-base-namespace).v2016_03_01.models.RuleAction + :paramtype action: ~azure.mgmt.monitor.v2016_03_01.models.RuleAction :keyword actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype actions: list[~$(python-base-namespace).v2016_03_01.models.RuleAction] + :paramtype actions: list[~azure.mgmt.monitor.v2016_03_01.models.RuleAction] """ super().__init__(**kwargs) self.tags = tags @@ -361,7 +361,7 @@ class IncidentListResult(_serialization.Model): """The List incidents operation response. :ivar value: the incident collection. - :vartype value: list[~$(python-base-namespace).v2016_03_01.models.Incident] + :vartype value: list[~azure.mgmt.monitor.v2016_03_01.models.Incident] """ _attribute_map = { @@ -371,7 +371,7 @@ class IncidentListResult(_serialization.Model): def __init__(self, *, value: Optional[List["_models.Incident"]] = None, **kwargs: Any) -> None: """ :keyword value: the incident collection. - :paramtype value: list[~$(python-base-namespace).v2016_03_01.models.Incident] + :paramtype value: list[~azure.mgmt.monitor.v2016_03_01.models.Incident] """ super().__init__(**kwargs) self.value = value @@ -424,7 +424,7 @@ class RuleCondition(_serialization.Model): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2016_03_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2016_03_01.models.RuleDataSource """ _validation = { @@ -448,7 +448,7 @@ def __init__(self, *, data_source: Optional["_models.RuleDataSource"] = None, ** """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2016_03_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2016_03_01.models.RuleDataSource """ super().__init__(**kwargs) self.odata_type: Optional[str] = None @@ -467,7 +467,7 @@ class LocationThresholdRuleCondition(RuleCondition): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2016_03_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2016_03_01.models.RuleDataSource :ivar window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. @@ -500,7 +500,7 @@ def __init__( """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2016_03_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2016_03_01.models.RuleDataSource :keyword window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold. If specified then it must be between 5 minutes and 1 day. @@ -521,7 +521,7 @@ class LogProfileCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the values of the log profiles. Required. - :vartype value: list[~$(python-base-namespace).v2016_03_01.models.LogProfileResource] + :vartype value: list[~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource] """ _validation = { @@ -535,7 +535,7 @@ class LogProfileCollection(_serialization.Model): def __init__(self, *, value: List["_models.LogProfileResource"], **kwargs: Any) -> None: """ :keyword value: the values of the log profiles. Required. - :paramtype value: list[~$(python-base-namespace).v2016_03_01.models.LogProfileResource] + :paramtype value: list[~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource] """ super().__init__(**kwargs) self.value = value @@ -572,7 +572,7 @@ class LogProfileResource(Resource): the user. Some values are: 'Write', 'Delete', and/or 'Action.'. Required. :vartype categories: list[str] :ivar retention_policy: the retention policy for the events in the log. Required. - :vartype retention_policy: ~$(python-base-namespace).v2016_03_01.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2016_03_01.models.RetentionPolicy """ _validation = { @@ -629,7 +629,7 @@ def __init__( to the user. Some values are: 'Write', 'Delete', and/or 'Action.'. Required. :paramtype categories: list[str] :keyword retention_policy: the retention policy for the events in the log. Required. - :paramtype retention_policy: ~$(python-base-namespace).v2016_03_01.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2016_03_01.models.RetentionPolicy """ super().__init__(location=location, tags=tags, **kwargs) self.storage_account_id = storage_account_id @@ -658,7 +658,7 @@ class LogProfileResourcePatch(_serialization.Model): the user. Some values are: 'Write', 'Delete', and/or 'Action.'. :vartype categories: list[str] :ivar retention_policy: the retention policy for the events in the log. - :vartype retention_policy: ~$(python-base-namespace).v2016_03_01.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2016_03_01.models.RetentionPolicy """ _attribute_map = { @@ -698,7 +698,7 @@ def __init__( to the user. Some values are: 'Write', 'Delete', and/or 'Action.'. :paramtype categories: list[str] :keyword retention_policy: the retention policy for the events in the log. - :paramtype retention_policy: ~$(python-base-namespace).v2016_03_01.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2016_03_01.models.RetentionPolicy """ super().__init__(**kwargs) self.tags = tags @@ -714,7 +714,7 @@ class ManagementEventAggregationCondition(_serialization.Model): :ivar operator: the condition operator. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or ~$(python-base-namespace).v2016_03_01.models.ConditionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2016_03_01.models.ConditionOperator :ivar threshold: The threshold value that activates the alert. :vartype threshold: float :ivar window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -740,7 +740,7 @@ def __init__( """ :keyword operator: the condition operator. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or ~$(python-base-namespace).v2016_03_01.models.ConditionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2016_03_01.models.ConditionOperator :keyword threshold: The threshold value that activates the alert. :paramtype threshold: float :keyword window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -766,12 +766,12 @@ class ManagementEventRuleCondition(RuleCondition): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2016_03_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2016_03_01.models.RuleDataSource :ivar aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate. :vartype aggregation: - ~$(python-base-namespace).v2016_03_01.models.ManagementEventAggregationCondition + ~azure.mgmt.monitor.v2016_03_01.models.ManagementEventAggregationCondition """ _validation = { @@ -794,12 +794,12 @@ def __init__( """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2016_03_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2016_03_01.models.RuleDataSource :keyword aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate. :paramtype aggregation: - ~$(python-base-namespace).v2016_03_01.models.ManagementEventAggregationCondition + ~azure.mgmt.monitor.v2016_03_01.models.ManagementEventAggregationCondition """ super().__init__(data_source=data_source, **kwargs) self.odata_type: str = "Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition" @@ -849,20 +849,19 @@ class MetricDefinition(_serialization.Model): :ivar resource_id: the resource identifier of the resource that emitted the metric. :vartype resource_id: str :ivar name: the name and the display name of the metric, i.e. it is a localizable string. - :vartype name: ~$(python-base-namespace).v2016_03_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2016_03_01.models.LocalizableString :ivar unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2016_03_01.models.Unit + :vartype unit: str or ~azure.mgmt.monitor.v2016_03_01.models.Unit :ivar primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :vartype primary_aggregation_type: str or - ~$(python-base-namespace).v2016_03_01.models.AggregationType + ~azure.mgmt.monitor.v2016_03_01.models.AggregationType :ivar metric_availabilities: the collection of what aggregation intervals are available to be queried. - :vartype metric_availabilities: - list[~$(python-base-namespace).v2016_03_01.models.MetricAvailability] + :vartype metric_availabilities: list[~azure.mgmt.monitor.v2016_03_01.models.MetricAvailability] :ivar id: the resource identifier of the metric definition. :vartype id: str """ @@ -891,20 +890,20 @@ def __init__( :keyword resource_id: the resource identifier of the resource that emitted the metric. :paramtype resource_id: str :keyword name: the name and the display name of the metric, i.e. it is a localizable string. - :paramtype name: ~$(python-base-namespace).v2016_03_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2016_03_01.models.LocalizableString :keyword unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2016_03_01.models.Unit + :paramtype unit: str or ~azure.mgmt.monitor.v2016_03_01.models.Unit :keyword primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :paramtype primary_aggregation_type: str or - ~$(python-base-namespace).v2016_03_01.models.AggregationType + ~azure.mgmt.monitor.v2016_03_01.models.AggregationType :keyword metric_availabilities: the collection of what aggregation intervals are available to be queried. :paramtype metric_availabilities: - list[~$(python-base-namespace).v2016_03_01.models.MetricAvailability] + list[~azure.mgmt.monitor.v2016_03_01.models.MetricAvailability] :keyword id: the resource identifier of the metric definition. :paramtype id: str """ @@ -923,7 +922,7 @@ class MetricDefinitionCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the values for the metric definitions. Required. - :vartype value: list[~$(python-base-namespace).v2016_03_01.models.MetricDefinition] + :vartype value: list[~azure.mgmt.monitor.v2016_03_01.models.MetricDefinition] """ _validation = { @@ -937,7 +936,7 @@ class MetricDefinitionCollection(_serialization.Model): def __init__(self, *, value: List["_models.MetricDefinition"], **kwargs: Any) -> None: """ :keyword value: the values for the metric definitions. Required. - :paramtype value: list[~$(python-base-namespace).v2016_03_01.models.MetricDefinition] + :paramtype value: list[~azure.mgmt.monitor.v2016_03_01.models.MetricDefinition] """ super().__init__(**kwargs) self.value = value @@ -1186,8 +1185,7 @@ class RuleManagementEventDataSource(RuleDataSource): # pylint: disable=too-many :ivar sub_status: the substatus. :vartype sub_status: str :ivar claims: the claims. - :vartype claims: - ~$(python-base-namespace).v2016_03_01.models.RuleManagementEventClaimsDataSource + :vartype claims: ~azure.mgmt.monitor.v2016_03_01.models.RuleManagementEventClaimsDataSource """ _validation = { @@ -1259,8 +1257,7 @@ def __init__( :keyword sub_status: the substatus. :paramtype sub_status: str :keyword claims: the claims. - :paramtype claims: - ~$(python-base-namespace).v2016_03_01.models.RuleManagementEventClaimsDataSource + :paramtype claims: ~azure.mgmt.monitor.v2016_03_01.models.RuleManagementEventClaimsDataSource """ super().__init__( resource_uri=resource_uri, @@ -1407,10 +1404,10 @@ class ThresholdRuleCondition(RuleCondition): :vartype odata_type: str :ivar data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :vartype data_source: ~$(python-base-namespace).v2016_03_01.models.RuleDataSource + :vartype data_source: ~azure.mgmt.monitor.v2016_03_01.models.RuleDataSource :ivar operator: the operator used to compare the data and the threshold. Required. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or ~$(python-base-namespace).v2016_03_01.models.ConditionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2016_03_01.models.ConditionOperator :ivar threshold: the threshold value that activates the alert. Required. :vartype threshold: float :ivar window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -1421,7 +1418,7 @@ class ThresholdRuleCondition(RuleCondition): be combined over time. The default value is the PrimaryAggregationType of the Metric. Known values are: "Average", "Minimum", "Maximum", "Total", and "Last". :vartype time_aggregation: str or - ~$(python-base-namespace).v2016_03_01.models.TimeAggregationOperator + ~azure.mgmt.monitor.v2016_03_01.models.TimeAggregationOperator """ _validation = { @@ -1452,10 +1449,10 @@ def __init__( """ :keyword data_source: the resource from which the rule collects its data. For this type dataSource will always be of type RuleMetricDataSource. - :paramtype data_source: ~$(python-base-namespace).v2016_03_01.models.RuleDataSource + :paramtype data_source: ~azure.mgmt.monitor.v2016_03_01.models.RuleDataSource :keyword operator: the operator used to compare the data and the threshold. Required. Known values are: "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or ~$(python-base-namespace).v2016_03_01.models.ConditionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2016_03_01.models.ConditionOperator :keyword threshold: the threshold value that activates the alert. Required. :paramtype threshold: float :keyword window_size: the period of time (in ISO 8601 duration format) that is used to monitor @@ -1466,7 +1463,7 @@ def __init__( should be combined over time. The default value is the PrimaryAggregationType of the Metric. Known values are: "Average", "Minimum", "Maximum", "Total", and "Last". :paramtype time_aggregation: str or - ~$(python-base-namespace).v2016_03_01.models.TimeAggregationOperator + ~azure.mgmt.monitor.v2016_03_01.models.TimeAggregationOperator """ super().__init__(data_source=data_source, **kwargs) self.odata_type: str = "Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py index a0e63b9675f0..d088008c787c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -81,7 +76,7 @@ def build_list_by_alert_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -114,7 +109,7 @@ class AlertRuleIncidentsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_03_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_03_01.MonitorManagementClient`'s :attr:`alert_rule_incidents` attribute. """ @@ -140,7 +135,7 @@ def get(self, resource_group_name: str, rule_name: str, incident_name: str, **kw :type incident_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Incident or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.Incident + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.Incident :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -154,7 +149,7 @@ def get(self, resource_group_name: str, rule_name: str, incident_name: str, **kw _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.Incident] = kwargs.pop("cls", None) request = build_get_request( @@ -206,13 +201,13 @@ def list_by_alert_rule( :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Incident or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2016_03_01.models.Incident] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2016_03_01.models.Incident] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.IncidentListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py index 670ca8f322fb..7b83bb3f1825 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -81,7 +76,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +107,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -143,7 +138,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -177,7 +172,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -233,7 +228,7 @@ class AlertRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_03_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_03_01.MonitorManagementClient`'s :attr:`alert_rules` attribute. """ @@ -264,13 +259,13 @@ def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :type parameters: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -298,7 +293,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -315,13 +310,13 @@ def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a AlertRuleResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -335,7 +330,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -416,7 +411,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -461,7 +456,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -475,7 +470,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -532,13 +527,13 @@ def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResourcePatch + :type alert_rules_resource: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -567,7 +562,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -589,14 +584,13 @@ def update( :type rule_name: str :param alert_rules_resource: Parameters supplied to the operation. Is either a AlertRuleResourcePatch type or a IO type. Required. - :type alert_rules_resource: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResourcePatch - or IO + :type alert_rules_resource: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AlertRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.AlertRuleResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -610,7 +604,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AlertRuleResource] = kwargs.pop("cls", None) @@ -673,14 +667,13 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2016_03_01.models.AlertRuleResource] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -758,14 +751,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AlertRuleReso :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AlertRuleResource or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2016_03_01.models.AlertRuleResource] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2016_03_01.models.AlertRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.AlertRuleResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py index 6226c7b42433..2f8ac57fc9e2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ def build_delete_request(log_profile_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) # Construct URL _url = kwargs.pop( "template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}" @@ -66,7 +61,7 @@ def build_get_request(log_profile_name: str, subscription_id: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +88,7 @@ def build_create_or_update_request(log_profile_name: str, subscription_id: str, _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -123,7 +118,7 @@ def build_update_request(log_profile_name: str, subscription_id: str, **kwargs: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -153,7 +148,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -179,7 +174,7 @@ class LogProfilesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_03_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_03_01.MonitorManagementClient`'s :attr:`log_profiles` attribute. """ @@ -214,7 +209,7 @@ def delete(self, log_profile_name: str, **kwargs: Any) -> None: # pylint: disab _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -254,7 +249,7 @@ def get(self, log_profile_name: str, **kwargs: Any) -> _models.LogProfileResourc :type log_profile_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -268,7 +263,7 @@ def get(self, log_profile_name: str, **kwargs: Any) -> _models.LogProfileResourc _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) request = build_get_request( @@ -317,13 +312,13 @@ def create_or_update( :param log_profile_name: The name of the log profile. Required. :type log_profile_name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :type parameters: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -342,7 +337,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -356,13 +351,13 @@ def create_or_update( :type log_profile_name: str :param parameters: Parameters supplied to the operation. Is either a LogProfileResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource or IO + :type parameters: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -376,7 +371,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) @@ -438,14 +433,13 @@ def update( :param log_profile_name: The name of the log profile. Required. :type log_profile_name: str :param log_profiles_resource: Parameters supplied to the operation. Required. - :type log_profiles_resource: - ~$(python-base-namespace).v2016_03_01.models.LogProfileResourcePatch + :type log_profiles_resource: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -464,7 +458,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -478,14 +472,14 @@ def update( :type log_profile_name: str :param log_profiles_resource: Parameters supplied to the operation. Is either a LogProfileResourcePatch type or a IO type. Required. - :type log_profiles_resource: - ~$(python-base-namespace).v2016_03_01.models.LogProfileResourcePatch or IO + :type log_profiles_resource: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResourcePatch or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogProfileResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_03_01.models.LogProfileResource + :rtype: ~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -499,7 +493,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogProfileResource] = kwargs.pop("cls", None) @@ -554,14 +548,13 @@ def list(self, **kwargs: Any) -> Iterable["_models.LogProfileResource"]: :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LogProfileResource or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2016_03_01.models.LogProfileResource] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2016_03_01.models.LogProfileResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.LogProfileCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py index 80762775b379..03b71f5a9106 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(resource_uri: str, *, filter: Optional[str] = None, **kwa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,7 +68,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_03_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_03_01.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -103,14 +98,13 @@ def list( :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2016_03_01.models.MetricDefinition] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2016_03_01.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-03-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { 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 b01c661afc04..562b6f4def40 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", "2016-09-01") + api_version: str = kwargs.pop("api_version", "2016-09-01") 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/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_management_client.py index e0b1c9ffa2de..d892cfe15515 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_management_client.py @@ -26,10 +26,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar metrics: MetricsOperations operations - :vartype metrics: $(python-base-namespace).v2016_09_01.operations.MetricsOperations + :vartype metrics: azure.mgmt.monitor.v2016_09_01.operations.MetricsOperations :ivar service_diagnostic_settings: ServiceDiagnosticSettingsOperations operations :vartype service_diagnostic_settings: - $(python-base-namespace).v2016_09_01.operations.ServiceDiagnosticSettingsOperations + azure.mgmt.monitor.v2016_09_01.operations.ServiceDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 cf31f284f0d8..fe8724826315 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", "2016-09-01") + api_version: str = kwargs.pop("api_version", "2016-09-01") 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_management_client.py index 90c182f65493..7b1d43f0764e 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_management_client.py @@ -26,10 +26,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar metrics: MetricsOperations operations - :vartype metrics: $(python-base-namespace).v2016_09_01.aio.operations.MetricsOperations + :vartype metrics: azure.mgmt.monitor.v2016_09_01.aio.operations.MetricsOperations :ivar service_diagnostic_settings: ServiceDiagnosticSettingsOperations operations :vartype service_diagnostic_settings: - $(python-base-namespace).v2016_09_01.aio.operations.ServiceDiagnosticSettingsOperations + azure.mgmt.monitor.v2016_09_01.aio.operations.ServiceDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py index 4099aa2b9d35..bdce1709ba5b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metrics_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ class MetricsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_09_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_09_01.aio.MonitorManagementClient`'s :attr:`metrics` attribute. """ @@ -84,14 +79,13 @@ def list(self, resource_uri: str, filter: Optional[str] = None, **kwargs: Any) - :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Metric or the result of cls(response) - :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2016_09_01.models.Metric] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2016_09_01.models.Metric] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) cls: ClsType[_models.MetricCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py index 448baa914e6d..73cfe0f9daac 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -32,10 +31,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -46,7 +41,7 @@ class ServiceDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_09_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_09_01.aio.MonitorManagementClient`'s :attr:`service_diagnostic_settings` attribute. """ @@ -68,7 +63,7 @@ async def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnost :type resource_uri: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -82,7 +77,7 @@ async def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnost _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -131,14 +126,13 @@ async def create_or_update( :param resource_uri: The identifier of the resource. Required. :type resource_uri: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: - ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :type parameters: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -158,7 +152,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -173,14 +167,14 @@ async def create_or_update( :type resource_uri: str :param parameters: Parameters supplied to the operation. Is either a ServiceDiagnosticSettingsResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource or IO + :type parameters: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -194,7 +188,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -255,13 +249,13 @@ async def update( :type resource_uri: str :param service_diagnostic_settings_resource: Parameters supplied to the operation. Required. :type service_diagnostic_settings_resource: - ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResourcePatch + ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -286,7 +280,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -305,13 +299,13 @@ async def update( :param service_diagnostic_settings_resource: Parameters supplied to the operation. Is either a ServiceDiagnosticSettingsResourcePatch type or a IO type. Required. :type service_diagnostic_settings_resource: - ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResourcePatch or IO + ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -325,7 +319,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) 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 240a0a582827..21c5db38e5b1 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 @@ -87,7 +87,7 @@ class LogSettings(_serialization.Model): :ivar enabled: a value indicating whether this log is enabled. Required. :vartype enabled: bool :ivar retention_policy: the retention policy for this log. - :vartype retention_policy: ~$(python-base-namespace).v2016_09_01.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2016_09_01.models.RetentionPolicy """ _validation = { @@ -116,7 +116,7 @@ def __init__( :keyword enabled: a value indicating whether this log is enabled. Required. :paramtype enabled: bool :keyword retention_policy: the retention policy for this log. - :paramtype retention_policy: ~$(python-base-namespace).v2016_09_01.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2016_09_01.models.RetentionPolicy """ super().__init__(**kwargs) self.category = category @@ -135,13 +135,13 @@ class Metric(_serialization.Model): :vartype type: str :ivar name: the name and the display name of the metric, i.e. it is localizable string. Required. - :vartype name: ~$(python-base-namespace).v2016_09_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2016_09_01.models.LocalizableString :ivar unit: the unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2016_09_01.models.Unit + :vartype unit: str or ~azure.mgmt.monitor.v2016_09_01.models.Unit :ivar data: Array of data points representing the metric values. Required. - :vartype data: list[~$(python-base-namespace).v2016_09_01.models.MetricValue] + :vartype data: list[~azure.mgmt.monitor.v2016_09_01.models.MetricValue] """ _validation = { @@ -175,13 +175,13 @@ def __init__( :paramtype type: str :keyword name: the name and the display name of the metric, i.e. it is localizable string. Required. - :paramtype name: ~$(python-base-namespace).v2016_09_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2016_09_01.models.LocalizableString :keyword unit: the unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2016_09_01.models.Unit + :paramtype unit: str or ~azure.mgmt.monitor.v2016_09_01.models.Unit :keyword data: Array of data points representing the metric values. Required. - :paramtype data: list[~$(python-base-namespace).v2016_09_01.models.MetricValue] + :paramtype data: list[~azure.mgmt.monitor.v2016_09_01.models.MetricValue] """ super().__init__(**kwargs) self.id = id @@ -197,7 +197,7 @@ class MetricCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the value of the collection. Required. - :vartype value: list[~$(python-base-namespace).v2016_09_01.models.Metric] + :vartype value: list[~azure.mgmt.monitor.v2016_09_01.models.Metric] """ _validation = { @@ -211,7 +211,7 @@ class MetricCollection(_serialization.Model): def __init__(self, *, value: List["_models.Metric"], **kwargs: Any) -> None: """ :keyword value: the value of the collection. Required. - :paramtype value: list[~$(python-base-namespace).v2016_09_01.models.Metric] + :paramtype value: list[~azure.mgmt.monitor.v2016_09_01.models.Metric] """ super().__init__(**kwargs) self.value = value @@ -227,7 +227,7 @@ class MetricSettings(_serialization.Model): :ivar enabled: a value indicating whether this timegrain is enabled. Required. :vartype enabled: bool :ivar retention_policy: the retention policy for this timegrain. - :vartype retention_policy: ~$(python-base-namespace).v2016_09_01.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2016_09_01.models.RetentionPolicy """ _validation = { @@ -255,7 +255,7 @@ def __init__( :keyword enabled: a value indicating whether this timegrain is enabled. Required. :paramtype enabled: bool :keyword retention_policy: the retention policy for this timegrain. - :paramtype retention_policy: ~$(python-base-namespace).v2016_09_01.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2016_09_01.models.RetentionPolicy """ super().__init__(**kwargs) self.time_grain = time_grain @@ -443,9 +443,9 @@ class ServiceDiagnosticSettingsResource(Resource): # pylint: disable=too-many-i authorization rule. :vartype event_hub_authorization_rule_id: str :ivar metrics: the list of metric settings. - :vartype metrics: list[~$(python-base-namespace).v2016_09_01.models.MetricSettings] + :vartype metrics: list[~azure.mgmt.monitor.v2016_09_01.models.MetricSettings] :ivar logs: the list of logs settings. - :vartype logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings] + :vartype logs: list[~azure.mgmt.monitor.v2016_09_01.models.LogSettings] :ivar workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -502,9 +502,9 @@ def __init__( authorization rule. :paramtype event_hub_authorization_rule_id: str :keyword metrics: the list of metric settings. - :paramtype metrics: list[~$(python-base-namespace).v2016_09_01.models.MetricSettings] + :paramtype metrics: list[~azure.mgmt.monitor.v2016_09_01.models.MetricSettings] :keyword logs: the list of logs settings. - :paramtype logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings] + :paramtype logs: list[~azure.mgmt.monitor.v2016_09_01.models.LogSettings] :keyword workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -535,9 +535,9 @@ class ServiceDiagnosticSettingsResourcePatch(_serialization.Model): authorization rule. :vartype event_hub_authorization_rule_id: str :ivar metrics: the list of metric settings. - :vartype metrics: list[~$(python-base-namespace).v2016_09_01.models.MetricSettings] + :vartype metrics: list[~azure.mgmt.monitor.v2016_09_01.models.MetricSettings] :ivar logs: the list of logs settings. - :vartype logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings] + :vartype logs: list[~azure.mgmt.monitor.v2016_09_01.models.LogSettings] :ivar workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -580,9 +580,9 @@ def __init__( authorization rule. :paramtype event_hub_authorization_rule_id: str :keyword metrics: the list of metric settings. - :paramtype metrics: list[~$(python-base-namespace).v2016_09_01.models.MetricSettings] + :paramtype metrics: list[~azure.mgmt.monitor.v2016_09_01.models.MetricSettings] :keyword logs: the list of logs settings. - :paramtype logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings] + :paramtype logs: list[~azure.mgmt.monitor.v2016_09_01.models.LogSettings] :keyword workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py index a72f1d4b8ca2..dbc223710694 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(resource_uri: str, *, filter: Optional[str] = None, **kwa _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,7 +68,7 @@ class MetricsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_09_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_09_01.MonitorManagementClient`'s :attr:`metrics` attribute. """ @@ -113,13 +108,13 @@ def list(self, resource_uri: str, filter: Optional[str] = None, **kwargs: Any) - :type filter: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Metric or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2016_09_01.models.Metric] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2016_09_01.models.Metric] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) cls: ClsType[_models.MetricCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py index 3185be78cc06..4f09c027be1c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_get_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -67,7 +62,7 @@ def build_create_or_update_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -94,7 +89,7 @@ def build_update_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -123,7 +118,7 @@ class ServiceDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2016_09_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2016_09_01.MonitorManagementClient`'s :attr:`service_diagnostic_settings` attribute. """ @@ -145,7 +140,7 @@ def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnosticSett :type resource_uri: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -159,7 +154,7 @@ def get(self, resource_uri: str, **kwargs: Any) -> _models.ServiceDiagnosticSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -208,14 +203,13 @@ def create_or_update( :param resource_uri: The identifier of the resource. Required. :type resource_uri: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: - ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :type parameters: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -235,7 +229,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -250,14 +244,14 @@ def create_or_update( :type resource_uri: str :param parameters: Parameters supplied to the operation. Is either a ServiceDiagnosticSettingsResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource or IO + :type parameters: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -271,7 +265,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -332,13 +326,13 @@ def update( :type resource_uri: str :param service_diagnostic_settings_resource: Parameters supplied to the operation. Required. :type service_diagnostic_settings_resource: - ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResourcePatch + ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -363,7 +357,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -382,13 +376,13 @@ def update( :param service_diagnostic_settings_resource: Parameters supplied to the operation. Is either a ServiceDiagnosticSettingsResourcePatch type or a IO type. Required. :type service_diagnostic_settings_resource: - ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResourcePatch or IO + ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ServiceDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2016_09_01.models.ServiceDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2016_09_01.models.ServiceDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -402,7 +396,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2016-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2016-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ServiceDiagnosticSettingsResource] = kwargs.pop("cls", None) 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 84b48bb6a7a5..fdcd1f8c7456 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-03-01-preview"] = kwargs.pop("api_version", "2017-03-01-preview") + api_version: str = kwargs.pop("api_version", "2017-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index bae3c4771af0..8e181236d253 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar activity_log_alerts: ActivityLogAlertsOperations operations :vartype activity_log_alerts: - $(python-base-namespace).v2017_03_01_preview.operations.ActivityLogAlertsOperations + azure.mgmt.monitor.v2017_03_01_preview.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 4cde3faf0edc..40ec0a582da1 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-03-01-preview"] = kwargs.pop("api_version", "2017-03-01-preview") + api_version: str = kwargs.pop("api_version", "2017-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 4afb99ca2d0b..47608ace8a5c 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar activity_log_alerts: ActivityLogAlertsOperations operations :vartype activity_log_alerts: - $(python-base-namespace).v2017_03_01_preview.aio.operations.ActivityLogAlertsOperations + azure.mgmt.monitor.v2017_03_01_preview.aio.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py index 22493b5b1647..61c912abf42b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class ActivityLogAlertsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_03_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_03_01_preview.aio.MonitorManagementClient`'s :attr:`activity_log_alerts` attribute. """ @@ -84,13 +79,13 @@ async def create_or_update( :type activity_log_alert_name: str :param activity_log_alert: The activity log alert to create or use for the update. Required. :type activity_log_alert: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -118,7 +113,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -140,13 +135,13 @@ async def create_or_update( :param activity_log_alert: The activity log alert to create or use for the update. Is either a ActivityLogAlertResource type or a IO type. Required. :type activity_log_alert: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource or IO + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -160,9 +155,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -229,7 +222,7 @@ async def get( :type activity_log_alert_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -243,9 +236,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -310,9 +301,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -366,13 +355,13 @@ async def update( :type activity_log_alert_name: str :param activity_log_alert_patch: Parameters supplied to the operation. Required. :type activity_log_alert_patch: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResourcePatch + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -401,7 +390,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -424,13 +413,13 @@ async def update( :param activity_log_alert_patch: Parameters supplied to the operation. Is either a ActivityLogAlertResourcePatch type or a IO type. Required. :type activity_log_alert_patch: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResourcePatch or IO + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -444,9 +433,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -504,15 +491,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Activ :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { @@ -596,15 +581,13 @@ def list_by_resource_group( :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models_py3.py index 69174c882a31..b0c4fb509c4a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models_py3.py @@ -59,7 +59,7 @@ class ActivityLogAlertActionList(_serialization.Model): :ivar action_groups: The list of activity log alerts. :vartype action_groups: - list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertActionGroup] + list[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertActionGroup] """ _attribute_map = { @@ -72,7 +72,7 @@ def __init__( """ :keyword action_groups: The list of activity log alerts. :paramtype action_groups: - list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertActionGroup] + list[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertActionGroup] """ super().__init__(**kwargs) self.action_groups = action_groups @@ -85,7 +85,7 @@ class ActivityLogAlertAllOfCondition(_serialization.Model): :ivar all_of: The list of activity log alert conditions. Required. :vartype all_of: - list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertLeafCondition] + list[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertLeafCondition] """ _validation = { @@ -100,7 +100,7 @@ def __init__(self, *, all_of: List["_models.ActivityLogAlertLeafCondition"], **k """ :keyword all_of: The list of activity log alert conditions. Required. :paramtype all_of: - list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertLeafCondition] + list[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertLeafCondition] """ super().__init__(**kwargs) self.all_of = all_of @@ -151,8 +151,7 @@ class ActivityLogAlertList(_serialization.Model): """A list of activity log alerts. :ivar value: The list of activity log alerts. - :vartype value: - list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource] + :vartype value: list[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource] """ _attribute_map = { @@ -162,8 +161,7 @@ class ActivityLogAlertList(_serialization.Model): def __init__(self, *, value: Optional[List["_models.ActivityLogAlertResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of activity log alerts. - :paramtype value: - list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource] + :paramtype value: list[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource] """ super().__init__(**kwargs) self.value = value @@ -244,10 +242,9 @@ class ActivityLogAlertResource(Resource): :vartype enabled: bool :ivar condition: The condition that will cause this alert to activate. :vartype condition: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertAllOfCondition + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertAllOfCondition :ivar actions: The actions that will activate when the condition is met. - :vartype actions: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertActionList + :vartype actions: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertActionList :ivar description: A description of this activity log alert. :vartype description: str """ @@ -298,10 +295,9 @@ def __init__( :paramtype enabled: bool :keyword condition: The condition that will cause this alert to activate. :paramtype condition: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertAllOfCondition + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertAllOfCondition :keyword actions: The actions that will activate when the condition is met. - :paramtype actions: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertActionList + :paramtype actions: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertActionList :keyword description: A description of this activity log alert. :paramtype description: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py index 787d559ae857..850077311db8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,9 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -120,9 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -155,9 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -191,9 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -217,9 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -251,7 +234,7 @@ class ActivityLogAlertsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_03_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_03_01_preview.MonitorManagementClient`'s :attr:`activity_log_alerts` attribute. """ @@ -283,13 +266,13 @@ def create_or_update( :type activity_log_alert_name: str :param activity_log_alert: The activity log alert to create or use for the update. Required. :type activity_log_alert: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -317,7 +300,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -339,13 +322,13 @@ def create_or_update( :param activity_log_alert: The activity log alert to create or use for the update. Is either a ActivityLogAlertResource type or a IO type. Required. :type activity_log_alert: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource or IO + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -359,9 +342,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -428,7 +409,7 @@ def get( :type activity_log_alert_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -442,9 +423,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -509,9 +488,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -565,13 +542,13 @@ def update( :type activity_log_alert_name: str :param activity_log_alert_patch: Parameters supplied to the operation. Required. :type activity_log_alert_patch: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResourcePatch + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -600,7 +577,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -623,13 +600,13 @@ def update( :param activity_log_alert_patch: Parameters supplied to the operation. Is either a ActivityLogAlertResourcePatch type or a IO type. Required. :type activity_log_alert_patch: - ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResourcePatch or IO + ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -643,9 +620,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -703,15 +678,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActivityLo :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { @@ -795,15 +768,13 @@ def list_by_resource_group( :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2017_03_01_preview.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-03-01-preview")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { 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 1d781d6471a4..9cbb2f0deda3 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", "2017-04-01") + api_version: str = kwargs.pop("api_version", "2017-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index 6d03b79933cb..6ce7c69392ab 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_management_client.py @@ -26,10 +26,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2017_04_01.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2017_04_01.operations.ActionGroupsOperations :ivar activity_log_alerts: ActivityLogAlertsOperations operations :vartype activity_log_alerts: - $(python-base-namespace).v2017_04_01.operations.ActivityLogAlertsOperations + azure.mgmt.monitor.v2017_04_01.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 1816576cd041..8a6aabc450e2 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", "2017-04-01") + api_version: str = kwargs.pop("api_version", "2017-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 7c55e2fce0f9..e0679b80cee6 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_management_client.py @@ -26,11 +26,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2017_04_01.aio.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2017_04_01.aio.operations.ActionGroupsOperations :ivar activity_log_alerts: ActivityLogAlertsOperations operations :vartype activity_log_alerts: - $(python-base-namespace).v2017_04_01.aio.operations.ActivityLogAlertsOperations + azure.mgmt.monitor.v2017_04_01.aio.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py index af911c286fe5..b7e49ee0bde7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_04_01.aio.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -84,13 +79,13 @@ async def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -118,7 +113,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -139,13 +134,13 @@ async def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -224,7 +219,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -355,13 +350,13 @@ async def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2017_04_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -389,7 +384,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -410,14 +405,13 @@ async def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2017_04_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -431,7 +425,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -488,13 +482,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2017_04_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -577,13 +571,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2017_04_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -674,7 +668,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2017_04_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2017_04_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -731,7 +725,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2017_04_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2017_04_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -751,7 +745,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py index fa77aef8486e..6817f7dda629 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class ActivityLogAlertsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_04_01.aio.MonitorManagementClient`'s :attr:`activity_log_alerts` attribute. """ @@ -83,13 +78,13 @@ async def create_or_update( :param activity_log_alert_name: The name of the activity log alert. Required. :type activity_log_alert_name: str :param activity_log_alert: The activity log alert to create or use for the update. Required. - :type activity_log_alert: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :type activity_log_alert: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -117,7 +112,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -138,14 +133,13 @@ async def create_or_update( :type activity_log_alert_name: str :param activity_log_alert: The activity log alert to create or use for the update. Is either a ActivityLogAlertResource type or a IO type. Required. - :type activity_log_alert: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource - or IO + :type activity_log_alert: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -159,7 +153,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -226,7 +220,7 @@ async def get( :type activity_log_alert_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -240,7 +234,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -305,7 +299,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -359,13 +353,13 @@ async def update( :type activity_log_alert_name: str :param activity_log_alert_patch: Parameters supplied to the operation. Required. :type activity_log_alert_patch: - ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertPatchBody + ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -394,7 +388,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -417,13 +411,13 @@ async def update( :param activity_log_alert_patch: Parameters supplied to the operation. Is either a ActivityLogAlertPatchBody type or a IO type. Required. :type activity_log_alert_patch: - ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertPatchBody or IO + ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -437,7 +431,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -495,13 +489,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Activ :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { @@ -585,13 +579,13 @@ def list_by_resource_group( :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models_py3.py index 0196034e2d72..8a9f989dad6b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models_py3.py @@ -20,7 +20,7 @@ class ActionGroupList(_serialization.Model): """A list of action groups. :ivar value: The list of action groups. - :vartype value: list[~$(python-base-namespace).v2017_04_01.models.ActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -39,7 +39,7 @@ def __init__( ) -> None: """ :keyword value: The list of action groups. - :paramtype value: list[~$(python-base-namespace).v2017_04_01.models.ActionGroupResource] + :paramtype value: list[~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -148,21 +148,21 @@ class ActionGroupResource(Resource): # pylint: disable=too-many-instance-attrib enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2017_04_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2017_04_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2017_04_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2017_04_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2017_04_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2017_04_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2017_04_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2017_04_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2017_04_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2017_04_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2017_04_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2017_04_01.models.AutomationRunbookReceiver] """ _validation = { @@ -219,22 +219,21 @@ def __init__( enabled, then none of its receivers will receive communications. :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2017_04_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2017_04_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2017_04_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2017_04_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2017_04_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2017_04_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2017_04_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2017_04_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2017_04_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2017_04_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2017_04_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2017_04_01.models.AutomationRunbookReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name @@ -290,7 +289,7 @@ class ActivityLogAlertActionList(_serialization.Model): :ivar action_groups: The list of activity log alerts. :vartype action_groups: - list[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertActionGroup] + list[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertActionGroup] """ _attribute_map = { @@ -303,7 +302,7 @@ def __init__( """ :keyword action_groups: The list of activity log alerts. :paramtype action_groups: - list[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertActionGroup] + list[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertActionGroup] """ super().__init__(**kwargs) self.action_groups = action_groups @@ -315,8 +314,7 @@ class ActivityLogAlertAllOfCondition(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar all_of: The list of activity log alert conditions. Required. - :vartype all_of: - list[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertLeafCondition] + :vartype all_of: list[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertLeafCondition] """ _validation = { @@ -330,8 +328,7 @@ class ActivityLogAlertAllOfCondition(_serialization.Model): def __init__(self, *, all_of: List["_models.ActivityLogAlertLeafCondition"], **kwargs: Any) -> None: """ :keyword all_of: The list of activity log alert conditions. Required. - :paramtype all_of: - list[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertLeafCondition] + :paramtype all_of: list[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertLeafCondition] """ super().__init__(**kwargs) self.all_of = all_of @@ -382,7 +379,7 @@ class ActivityLogAlertList(_serialization.Model): """A list of activity log alerts. :ivar value: The list of activity log alerts. - :vartype value: list[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource] + :vartype value: list[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -401,7 +398,7 @@ def __init__( ) -> None: """ :keyword value: The list of activity log alerts. - :paramtype value: list[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource] + :paramtype value: list[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -463,9 +460,9 @@ class ActivityLogAlertResource(Resource): is not enabled, then none of its actions will be activated. :vartype enabled: bool :ivar condition: The condition that will cause this alert to activate. - :vartype condition: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertAllOfCondition + :vartype condition: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertAllOfCondition :ivar actions: The actions that will activate when the condition is met. - :vartype actions: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertActionList + :vartype actions: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertActionList :ivar description: A description of this activity log alert. :vartype description: str """ @@ -515,10 +512,9 @@ def __init__( alert is not enabled, then none of its actions will be activated. :paramtype enabled: bool :keyword condition: The condition that will cause this alert to activate. - :paramtype condition: - ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertAllOfCondition + :paramtype condition: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertAllOfCondition :keyword actions: The actions that will activate when the condition is met. - :paramtype actions: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertActionList + :paramtype actions: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertActionList :keyword description: A description of this activity log alert. :paramtype description: str """ @@ -650,7 +646,7 @@ class EmailReceiver(_serialization.Model): :vartype email_address: str :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2017_04_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2017_04_01.models.ReceiverStatus """ _validation = { @@ -813,7 +809,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2017_04_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2017_04_01.models.ReceiverStatus """ _validation = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py index 3f97b160b1d8..ec9b3d745d80 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -275,7 +270,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_04_01.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -306,13 +301,13 @@ def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -340,7 +335,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -361,13 +356,13 @@ def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -446,7 +441,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -577,13 +572,13 @@ def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2017_04_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -611,7 +606,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -632,14 +627,13 @@ def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2017_04_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -653,7 +647,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -710,13 +704,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2017_04_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -799,13 +793,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2017_04_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2017_04_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -896,7 +890,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2017_04_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2017_04_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -953,7 +947,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2017_04_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2017_04_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -973,7 +967,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py index 69cbd686f903..5ec2a2b958b4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ class ActivityLogAlertsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_04_01.MonitorManagementClient`'s :attr:`activity_log_alerts` attribute. """ @@ -270,13 +265,13 @@ def create_or_update( :param activity_log_alert_name: The name of the activity log alert. Required. :type activity_log_alert_name: str :param activity_log_alert: The activity log alert to create or use for the update. Required. - :type activity_log_alert: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :type activity_log_alert: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -304,7 +299,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -325,14 +320,13 @@ def create_or_update( :type activity_log_alert_name: str :param activity_log_alert: The activity log alert to create or use for the update. Is either a ActivityLogAlertResource type or a IO type. Required. - :type activity_log_alert: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource - or IO + :type activity_log_alert: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -346,7 +340,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -413,7 +407,7 @@ def get( :type activity_log_alert_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -427,7 +421,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -492,7 +486,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -546,13 +540,13 @@ def update( :type activity_log_alert_name: str :param activity_log_alert_patch: Parameters supplied to the operation. Required. :type activity_log_alert_patch: - ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertPatchBody + ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -581,7 +575,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -604,13 +598,13 @@ def update( :param activity_log_alert_patch: Parameters supplied to the operation. Is either a ActivityLogAlertPatchBody type or a IO type. Required. :type activity_log_alert_patch: - ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertPatchBody or IO + ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -624,7 +618,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -682,13 +676,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActivityLo :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { @@ -772,13 +766,13 @@ def list_by_resource_group( :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2017_04_01.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-04-01")) cls: ClsType[_models.ActivityLogAlertList] = kwargs.pop("cls", None) error_map = { 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 e68c824c7a36..4997675f6534 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-05-01-preview"] = kwargs.pop("api_version", "2017-05-01-preview") + api_version: str = kwargs.pop("api_version", "2017-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index b4755555277c..716984e952e1 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_management_client.py @@ -33,18 +33,18 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar diagnostic_settings_category: DiagnosticSettingsCategoryOperations operations :vartype diagnostic_settings_category: - $(python-base-namespace).v2017_05_01_preview.operations.DiagnosticSettingsCategoryOperations + azure.mgmt.monitor.v2017_05_01_preview.operations.DiagnosticSettingsCategoryOperations :ivar diagnostic_settings: DiagnosticSettingsOperations operations :vartype diagnostic_settings: - $(python-base-namespace).v2017_05_01_preview.operations.DiagnosticSettingsOperations + azure.mgmt.monitor.v2017_05_01_preview.operations.DiagnosticSettingsOperations :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2017_05_01_preview.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2017_05_01_preview.operations.MetricDefinitionsOperations :ivar metrics: MetricsOperations operations - :vartype metrics: $(python-base-namespace).v2017_05_01_preview.operations.MetricsOperations + :vartype metrics: azure.mgmt.monitor.v2017_05_01_preview.operations.MetricsOperations :ivar subscription_diagnostic_settings: SubscriptionDiagnosticSettingsOperations operations :vartype subscription_diagnostic_settings: - $(python-base-namespace).v2017_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations + azure.mgmt.monitor.v2017_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 b85932e74533..850cb89324d2 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-05-01-preview"] = kwargs.pop("api_version", "2017-05-01-preview") + api_version: str = kwargs.pop("api_version", "2017-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 8f92ef8799cb..086db347d6d9 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_management_client.py @@ -33,18 +33,18 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar diagnostic_settings_category: DiagnosticSettingsCategoryOperations operations :vartype diagnostic_settings_category: - $(python-base-namespace).v2017_05_01_preview.aio.operations.DiagnosticSettingsCategoryOperations + azure.mgmt.monitor.v2017_05_01_preview.aio.operations.DiagnosticSettingsCategoryOperations :ivar diagnostic_settings: DiagnosticSettingsOperations operations :vartype diagnostic_settings: - $(python-base-namespace).v2017_05_01_preview.aio.operations.DiagnosticSettingsOperations + azure.mgmt.monitor.v2017_05_01_preview.aio.operations.DiagnosticSettingsOperations :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2017_05_01_preview.aio.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2017_05_01_preview.aio.operations.MetricDefinitionsOperations :ivar metrics: MetricsOperations operations - :vartype metrics: $(python-base-namespace).v2017_05_01_preview.aio.operations.MetricsOperations + :vartype metrics: azure.mgmt.monitor.v2017_05_01_preview.aio.operations.MetricsOperations :ivar subscription_diagnostic_settings: SubscriptionDiagnosticSettingsOperations operations :vartype subscription_diagnostic_settings: - $(python-base-namespace).v2017_05_01_preview.aio.operations.SubscriptionDiagnosticSettingsOperations + azure.mgmt.monitor.v2017_05_01_preview.aio.operations.SubscriptionDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py index b88b2a5d77a7..0d83e355a73a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._diagnostic_settings_category_operations import build_get_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class DiagnosticSettingsCategoryOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.aio.MonitorManagementClient`'s :attr:`diagnostic_settings_category` attribute. """ @@ -65,7 +60,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsCategoryResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsCategoryResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -79,9 +74,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResource] = kwargs.pop("cls", None) request = build_get_request( @@ -125,7 +118,7 @@ async def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSett :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsCategoryResourceCollection or the result of cls(response) :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResourceCollection + ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsCategoryResourceCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -139,9 +132,7 @@ async def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py index 381826d35040..dc66df3a6c66 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -33,10 +32,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ class DiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.aio.MonitorManagementClient`'s :attr:`diagnostic_settings` attribute. """ @@ -70,7 +65,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -84,9 +79,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -138,14 +131,13 @@ async def create_or_update( :param name: The name of the diagnostic setting. Required. :type name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: - ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :type parameters: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -166,7 +158,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -182,14 +174,14 @@ async def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Is either a DiagnosticSettingsResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource or IO + :type parameters: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -203,9 +195,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -278,9 +268,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -319,8 +307,7 @@ async def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSett :type resource_uri: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResourceCollection or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResourceCollection + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResourceCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -334,9 +321,7 @@ async def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSett _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py index 8f6e420c7b25..4fc92805e16b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.aio.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -66,15 +61,13 @@ def list(self, resource_uri: str, **kwargs: Any) -> AsyncIterable["_models.Metri :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2017_05_01_preview.models.MetricDefinition] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py index 77cd4b16629a..9f58ae2b706a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._metrics_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ class MetricsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.aio.MonitorManagementClient`'s :attr:`metrics` attribute. """ @@ -105,10 +100,10 @@ async def list( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2017_05_01_preview.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2017_05_01_preview.models.ResultType :keyword callable cls: A custom type or function that will be passed the direct response :return: Response or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.Response + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.Response :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -122,9 +117,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py index faca93278b29..943d33f893aa 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -33,10 +32,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ class SubscriptionDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.aio.MonitorManagementClient`'s :attr:`subscription_diagnostic_settings` attribute. """ @@ -68,8 +63,7 @@ async def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticS :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -83,9 +77,7 @@ async def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -135,14 +127,13 @@ async def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -161,8 +152,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -177,15 +167,13 @@ async def create_or_update( :param parameters: Parameters supplied to the operation. Is either a SubscriptionDiagnosticSettingsResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource or - IO + ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -199,9 +187,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -272,9 +258,7 @@ async def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inc _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -312,7 +296,7 @@ async def list(self, **kwargs: Any) -> _models.SubscriptionDiagnosticSettingsRes :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResourceCollection or the result of cls(response) :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection + ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -326,9 +310,7 @@ async def list(self, **kwargs: Any) -> _models.SubscriptionDiagnosticSettingsRes _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) request = build_list_request( 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 f52522f0e1d2..0564434e908a 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 @@ -63,8 +63,7 @@ class DiagnosticSettingsCategoryResource(ProxyOnlyResource): :vartype type: str :ivar category_type: The type of the diagnostic settings category. Known values are: "Metrics" and "Logs". - :vartype category_type: str or - ~$(python-base-namespace).v2017_05_01_preview.models.CategoryType + :vartype category_type: str or ~azure.mgmt.monitor.v2017_05_01_preview.models.CategoryType """ _validation = { @@ -84,8 +83,7 @@ def __init__(self, *, category_type: Optional[Union[str, "_models.CategoryType"] """ :keyword category_type: The type of the diagnostic settings category. Known values are: "Metrics" and "Logs". - :paramtype category_type: str or - ~$(python-base-namespace).v2017_05_01_preview.models.CategoryType + :paramtype category_type: str or ~azure.mgmt.monitor.v2017_05_01_preview.models.CategoryType """ super().__init__(**kwargs) self.category_type = category_type @@ -96,7 +94,7 @@ class DiagnosticSettingsCategoryResourceCollection(_serialization.Model): :ivar value: The collection of diagnostic settings category resources. :vartype value: - list[~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResource] + list[~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsCategoryResource] """ _attribute_map = { @@ -109,7 +107,7 @@ def __init__( """ :keyword value: The collection of diagnostic settings category resources. :paramtype value: - list[~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResource] + list[~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsCategoryResource] """ super().__init__(**kwargs) self.value = value @@ -138,9 +136,9 @@ class DiagnosticSettingsResource(ProxyOnlyResource): # pylint: disable=too-many will be selected. :vartype event_hub_name: str :ivar metrics: The list of metric settings. - :vartype metrics: list[~$(python-base-namespace).v2017_05_01_preview.models.MetricSettings] + :vartype metrics: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricSettings] :ivar logs: The list of logs settings. - :vartype logs: list[~$(python-base-namespace).v2017_05_01_preview.models.LogSettings] + :vartype logs: list[~azure.mgmt.monitor.v2017_05_01_preview.models.LogSettings] :ivar workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -198,9 +196,9 @@ def __init__( will be selected. :paramtype event_hub_name: str :keyword metrics: The list of metric settings. - :paramtype metrics: list[~$(python-base-namespace).v2017_05_01_preview.models.MetricSettings] + :paramtype metrics: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricSettings] :keyword logs: The list of logs settings. - :paramtype logs: list[~$(python-base-namespace).v2017_05_01_preview.models.LogSettings] + :paramtype logs: list[~azure.mgmt.monitor.v2017_05_01_preview.models.LogSettings] :keyword workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -226,8 +224,7 @@ class DiagnosticSettingsResourceCollection(_serialization.Model): """Represents a collection of alert rule resources. :ivar value: The collection of diagnostic settings resources;. - :vartype value: - list[~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource] + :vartype value: list[~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource] """ _attribute_map = { @@ -238,7 +235,7 @@ def __init__(self, *, value: Optional[List["_models.DiagnosticSettingsResource"] """ :keyword value: The collection of diagnostic settings resources;. :paramtype value: - list[~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource] """ super().__init__(**kwargs) self.value = value @@ -314,7 +311,7 @@ class LogSettings(_serialization.Model): :ivar enabled: a value indicating whether this log is enabled. Required. :vartype enabled: bool :ivar retention_policy: the retention policy for this log. - :vartype retention_policy: ~$(python-base-namespace).v2017_05_01_preview.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2017_05_01_preview.models.RetentionPolicy """ _validation = { @@ -343,8 +340,7 @@ def __init__( :keyword enabled: a value indicating whether this log is enabled. Required. :paramtype enabled: bool :keyword retention_policy: the retention policy for this log. - :paramtype retention_policy: - ~$(python-base-namespace).v2017_05_01_preview.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2017_05_01_preview.models.RetentionPolicy """ super().__init__(**kwargs) self.category = category @@ -356,7 +352,7 @@ class MetadataValue(_serialization.Model): """Represents a metric metadata value. :ivar name: the name of the metadata. - :vartype name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2017_05_01_preview.models.LocalizableString :ivar value: the value of the metadata. :vartype value: str """ @@ -371,7 +367,7 @@ def __init__( ) -> None: """ :keyword name: the name of the metadata. - :paramtype name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2017_05_01_preview.models.LocalizableString :keyword value: the value of the metadata. :paramtype value: str """ @@ -391,7 +387,7 @@ class Metric(_serialization.Model): :vartype type: str :ivar name: the name and the display name of the metric, i.e. it is localizable string. Required. - :vartype name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2017_05_01_preview.models.LocalizableString :ivar display_description: Detailed description of this metric. :vartype display_description: str :ivar error_code: 'Success' or the error details on query failures for this metric. @@ -401,10 +397,9 @@ class Metric(_serialization.Model): :ivar unit: the unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2017_05_01_preview.models.Unit + :vartype unit: str or ~azure.mgmt.monitor.v2017_05_01_preview.models.Unit :ivar timeseries: the time series returned when a data query is performed. Required. - :vartype timeseries: - list[~$(python-base-namespace).v2017_05_01_preview.models.TimeSeriesElement] + :vartype timeseries: list[~azure.mgmt.monitor.v2017_05_01_preview.models.TimeSeriesElement] """ _validation = { @@ -446,7 +441,7 @@ def __init__( :paramtype type: str :keyword name: the name and the display name of the metric, i.e. it is localizable string. Required. - :paramtype name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2017_05_01_preview.models.LocalizableString :keyword display_description: Detailed description of this metric. :paramtype display_description: str :keyword error_code: 'Success' or the error details on query failures for this metric. @@ -456,10 +451,9 @@ def __init__( :keyword unit: the unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2017_05_01_preview.models.Unit + :paramtype unit: str or ~azure.mgmt.monitor.v2017_05_01_preview.models.Unit :keyword timeseries: the time series returned when a data query is performed. Required. - :paramtype timeseries: - list[~$(python-base-namespace).v2017_05_01_preview.models.TimeSeriesElement] + :paramtype timeseries: list[~azure.mgmt.monitor.v2017_05_01_preview.models.TimeSeriesElement] """ super().__init__(**kwargs) self.id = id @@ -517,7 +511,7 @@ class MetricDefinition(_serialization.Model): :ivar resource_id: the resource identifier of the resource that emitted the metric. :vartype resource_id: str :ivar name: the name and the display name of the metric, i.e. it is a localizable string. - :vartype name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2017_05_01_preview.models.LocalizableString :ivar display_description: Detailed description of this metric. :vartype display_description: str :ivar category: Custom category name for this metric. @@ -525,22 +519,21 @@ class MetricDefinition(_serialization.Model): :ivar unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2017_05_01_preview.models.Unit + :vartype unit: str or ~azure.mgmt.monitor.v2017_05_01_preview.models.Unit :ivar primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :vartype primary_aggregation_type: str or - ~$(python-base-namespace).v2017_05_01_preview.models.AggregationType + ~azure.mgmt.monitor.v2017_05_01_preview.models.AggregationType :ivar metric_availabilities: the collection of what aggregation intervals are available to be queried. :vartype metric_availabilities: - list[~$(python-base-namespace).v2017_05_01_preview.models.MetricAvailability] + list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricAvailability] :ivar id: the resource identifier of the metric definition. :vartype id: str :ivar dimensions: the name and the display name of the dimension, i.e. it is a localizable string. - :vartype dimensions: - list[~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString] + :vartype dimensions: list[~azure.mgmt.monitor.v2017_05_01_preview.models.LocalizableString] """ _attribute_map = { @@ -577,7 +570,7 @@ def __init__( :keyword resource_id: the resource identifier of the resource that emitted the metric. :paramtype resource_id: str :keyword name: the name and the display name of the metric, i.e. it is a localizable string. - :paramtype name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2017_05_01_preview.models.LocalizableString :keyword display_description: Detailed description of this metric. :paramtype display_description: str :keyword category: Custom category name for this metric. @@ -585,22 +578,21 @@ def __init__( :keyword unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2017_05_01_preview.models.Unit + :paramtype unit: str or ~azure.mgmt.monitor.v2017_05_01_preview.models.Unit :keyword primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :paramtype primary_aggregation_type: str or - ~$(python-base-namespace).v2017_05_01_preview.models.AggregationType + ~azure.mgmt.monitor.v2017_05_01_preview.models.AggregationType :keyword metric_availabilities: the collection of what aggregation intervals are available to be queried. :paramtype metric_availabilities: - list[~$(python-base-namespace).v2017_05_01_preview.models.MetricAvailability] + list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricAvailability] :keyword id: the resource identifier of the metric definition. :paramtype id: str :keyword dimensions: the name and the display name of the dimension, i.e. it is a localizable string. - :paramtype dimensions: - list[~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString] + :paramtype dimensions: list[~azure.mgmt.monitor.v2017_05_01_preview.models.LocalizableString] """ super().__init__(**kwargs) self.is_dimension_required = is_dimension_required @@ -621,7 +613,7 @@ class MetricDefinitionCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the values for the metric definitions. Required. - :vartype value: list[~$(python-base-namespace).v2017_05_01_preview.models.MetricDefinition] + :vartype value: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricDefinition] """ _validation = { @@ -635,7 +627,7 @@ class MetricDefinitionCollection(_serialization.Model): def __init__(self, *, value: List["_models.MetricDefinition"], **kwargs: Any) -> None: """ :keyword value: the values for the metric definitions. Required. - :paramtype value: list[~$(python-base-namespace).v2017_05_01_preview.models.MetricDefinition] + :paramtype value: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricDefinition] """ super().__init__(**kwargs) self.value = value @@ -655,7 +647,7 @@ class MetricSettings(_serialization.Model): :ivar enabled: a value indicating whether this category is enabled. Required. :vartype enabled: bool :ivar retention_policy: the retention policy for this category. - :vartype retention_policy: ~$(python-base-namespace).v2017_05_01_preview.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2017_05_01_preview.models.RetentionPolicy """ _validation = { @@ -688,8 +680,7 @@ def __init__( :keyword enabled: a value indicating whether this category is enabled. Required. :paramtype enabled: bool :keyword retention_policy: the retention policy for this category. - :paramtype retention_policy: - ~$(python-base-namespace).v2017_05_01_preview.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2017_05_01_preview.models.RetentionPolicy """ super().__init__(**kwargs) self.time_grain = time_grain @@ -782,7 +773,7 @@ class Response(_serialization.Model): present if a metadata request was made. :vartype interval: ~datetime.timedelta :ivar value: the value of the collection. Required. - :vartype value: list[~$(python-base-namespace).v2017_05_01_preview.models.Metric] + :vartype value: list[~azure.mgmt.monitor.v2017_05_01_preview.models.Metric] """ _validation = { @@ -819,7 +810,7 @@ def __init__( not present if a metadata request was made. :paramtype interval: ~datetime.timedelta :keyword value: the value of the collection. Required. - :paramtype value: list[~$(python-base-namespace).v2017_05_01_preview.models.Metric] + :paramtype value: list[~azure.mgmt.monitor.v2017_05_01_preview.models.Metric] """ super().__init__(**kwargs) self.cost = cost @@ -928,8 +919,7 @@ class SubscriptionDiagnosticSettingsResource(SubscriptionProxyOnlyResource): will be selected. :vartype event_hub_name: str :ivar logs: The list of logs settings. - :vartype logs: - list[~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionLogSettings] + :vartype logs: list[~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionLogSettings] :ivar workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -982,8 +972,7 @@ def __init__( will be selected. :paramtype event_hub_name: str :keyword logs: The list of logs settings. - :paramtype logs: - list[~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionLogSettings] + :paramtype logs: list[~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionLogSettings] :keyword workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -1003,7 +992,7 @@ class SubscriptionDiagnosticSettingsResourceCollection(_serialization.Model): :ivar value: The collection of subscription diagnostic settings resources. :vartype value: - list[~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource] """ _attribute_map = { @@ -1016,7 +1005,7 @@ def __init__( """ :keyword value: The collection of subscription diagnostic settings resources. :paramtype value: - list[~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource] """ super().__init__(**kwargs) self.value = value @@ -1060,11 +1049,10 @@ class TimeSeriesElement(_serialization.Model): """A time series result type. The discriminator value is always TimeSeries in this case. :ivar metadatavalues: the metadata values returned if $filter was specified in the call. - :vartype metadatavalues: - list[~$(python-base-namespace).v2017_05_01_preview.models.MetadataValue] + :vartype metadatavalues: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetadataValue] :ivar data: An array of data points representing the metric values. This is only returned if a result type of data is specified. - :vartype data: list[~$(python-base-namespace).v2017_05_01_preview.models.MetricValue] + :vartype data: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricValue] """ _attribute_map = { @@ -1081,11 +1069,10 @@ def __init__( ) -> None: """ :keyword metadatavalues: the metadata values returned if $filter was specified in the call. - :paramtype metadatavalues: - list[~$(python-base-namespace).v2017_05_01_preview.models.MetadataValue] + :paramtype metadatavalues: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetadataValue] :keyword data: An array of data points representing the metric values. This is only returned if a result type of data is specified. - :paramtype data: list[~$(python-base-namespace).v2017_05_01_preview.models.MetricValue] + :paramtype data: list[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricValue] """ super().__init__(**kwargs) self.metadatavalues = metadatavalues diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py index caeaaed16267..8ce4544b481d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,9 +38,7 @@ def build_get_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReques _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -70,9 +63,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -98,7 +89,7 @@ class DiagnosticSettingsCategoryOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.MonitorManagementClient`'s :attr:`diagnostic_settings_category` attribute. """ @@ -121,7 +112,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsCategoryResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsCategoryResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -135,9 +126,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResource] = kwargs.pop("cls", None) request = build_get_request( @@ -181,7 +170,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSettingsCa :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsCategoryResourceCollection or the result of cls(response) :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResourceCollection + ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsCategoryResourceCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -195,9 +184,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSettingsCa _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py index 4b072849c8f1..8b0088864477 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,9 +38,7 @@ def build_get_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReques _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -70,9 +63,7 @@ def build_create_or_update_request(resource_uri: str, name: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -100,9 +91,7 @@ def build_delete_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -127,9 +116,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -155,7 +142,7 @@ class DiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.MonitorManagementClient`'s :attr:`diagnostic_settings` attribute. """ @@ -178,7 +165,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -192,9 +179,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -246,14 +231,13 @@ def create_or_update( :param name: The name of the diagnostic setting. Required. :type name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: - ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :type parameters: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -274,7 +258,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -290,14 +274,14 @@ def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Is either a DiagnosticSettingsResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource or IO + :type parameters: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -311,9 +295,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -386,9 +368,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -427,8 +407,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSettingsRe :type resource_uri: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResourceCollection or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResourceCollection + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.DiagnosticSettingsResourceCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -442,9 +421,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> _models.DiagnosticSettingsRe _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py index 92d149f0e077..335a3a180e77 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,7 +66,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -95,15 +88,13 @@ def list(self, resource_uri: str, **kwargs: Any) -> Iterable["_models.MetricDefi :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2017_05_01_preview.models.MetricDefinition] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2017_05_01_preview.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py index 076868a65d0b..de3f7287bb16 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -56,9 +51,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -100,7 +93,7 @@ class MetricsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.MonitorManagementClient`'s :attr:`metrics` attribute. """ @@ -162,10 +155,10 @@ def list( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2017_05_01_preview.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2017_05_01_preview.models.ResultType :keyword callable cls: A custom type or function that will be passed the direct response :return: Response or the result of cls(response) - :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.Response + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.Response :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -179,9 +172,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py index e99ae1988380..c63a9c5463a6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,9 +38,7 @@ def build_get_request(name: str, subscription_id: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,9 +65,7 @@ def build_create_or_update_request(name: str, subscription_id: str, **kwargs: An _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -104,9 +95,7 @@ def build_delete_request(name: str, subscription_id: str, **kwargs: Any) -> Http _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -133,9 +122,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -161,7 +148,7 @@ class SubscriptionDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_05_01_preview.MonitorManagementClient`'s :attr:`subscription_diagnostic_settings` attribute. """ @@ -182,8 +169,7 @@ def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticSetting :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -197,9 +183,7 @@ def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticSetting _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -249,14 +233,13 @@ def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -275,8 +258,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -291,15 +273,13 @@ def create_or_update( :param parameters: Parameters supplied to the operation. Is either a SubscriptionDiagnosticSettingsResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource or - IO + ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -313,9 +293,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -386,9 +364,7 @@ def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsist _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -426,7 +402,7 @@ def list(self, **kwargs: Any) -> _models.SubscriptionDiagnosticSettingsResourceC :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResourceCollection or the result of cls(response) :rtype: - ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection + ~azure.mgmt.monitor.v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -440,9 +416,7 @@ def list(self, **kwargs: Any) -> _models.SubscriptionDiagnosticSettingsResourceC _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) request = build_list_request( 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 a8702ad90584..005178cd1407 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-12-01-preview"] = kwargs.pop("api_version", "2017-12-01-preview") + api_version: str = kwargs.pop("api_version", "2017-12-01-preview") 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/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_management_client.py index a2ba9c587be6..5bd19e332aaa 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar metric_namespaces: MetricNamespacesOperations operations :vartype metric_namespaces: - $(python-base-namespace).v2017_12_01_preview.operations.MetricNamespacesOperations + azure.mgmt.monitor.v2017_12_01_preview.operations.MetricNamespacesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 944ba3a22dbb..e54d5ce7c1ef 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2017-12-01-preview"] = kwargs.pop("api_version", "2017-12-01-preview") + api_version: str = kwargs.pop("api_version", "2017-12-01-preview") 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_management_client.py index e96eb061aa2e..498ac4155778 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar metric_namespaces: MetricNamespacesOperations operations :vartype metric_namespaces: - $(python-base-namespace).v2017_12_01_preview.aio.operations.MetricNamespacesOperations + azure.mgmt.monitor.v2017_12_01_preview.aio.operations.MetricNamespacesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py index 23a55e3f0df5..93f2ea7416a0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_namespaces_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ class MetricNamespacesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_12_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_12_01_preview.aio.MonitorManagementClient`'s :attr:`metric_namespaces` attribute. """ @@ -71,15 +66,13 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricNamespace or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2017_12_01_preview.models.MetricNamespace] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2017_12_01_preview.models.MetricNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-12-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-12-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-12-01-preview")) cls: ClsType[_models.MetricNamespaceCollection] = kwargs.pop("cls", None) error_map = { 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 b472ccea89c7..693997b7abe7 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 @@ -53,9 +53,9 @@ class MetricNamespace(_serialization.Model): :vartype name: str :ivar classification: Kind of namespace. Known values are: "Platform", "Custom", and "Qos". :vartype classification: str or - ~$(python-base-namespace).v2017_12_01_preview.models.NamespaceClassification + ~azure.mgmt.monitor.v2017_12_01_preview.models.NamespaceClassification :ivar properties: Properties which include the fully qualified namespace name. - :vartype properties: ~$(python-base-namespace).v2017_12_01_preview.models.MetricNamespaceName + :vartype properties: ~azure.mgmt.monitor.v2017_12_01_preview.models.MetricNamespaceName """ _attribute_map = { @@ -85,9 +85,9 @@ def __init__( :paramtype name: str :keyword classification: Kind of namespace. Known values are: "Platform", "Custom", and "Qos". :paramtype classification: str or - ~$(python-base-namespace).v2017_12_01_preview.models.NamespaceClassification + ~azure.mgmt.monitor.v2017_12_01_preview.models.NamespaceClassification :keyword properties: Properties which include the fully qualified namespace name. - :paramtype properties: ~$(python-base-namespace).v2017_12_01_preview.models.MetricNamespaceName + :paramtype properties: ~azure.mgmt.monitor.v2017_12_01_preview.models.MetricNamespaceName """ super().__init__(**kwargs) self.id = id @@ -103,7 +103,7 @@ class MetricNamespaceCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: The values for the metric namespaces. Required. - :vartype value: list[~$(python-base-namespace).v2017_12_01_preview.models.MetricNamespace] + :vartype value: list[~azure.mgmt.monitor.v2017_12_01_preview.models.MetricNamespace] """ _validation = { @@ -117,7 +117,7 @@ class MetricNamespaceCollection(_serialization.Model): def __init__(self, *, value: List["_models.MetricNamespace"], **kwargs: Any) -> None: """ :keyword value: The values for the metric namespaces. Required. - :paramtype value: list[~$(python-base-namespace).v2017_12_01_preview.models.MetricNamespace] + :paramtype value: list[~azure.mgmt.monitor.v2017_12_01_preview.models.MetricNamespace] """ super().__init__(**kwargs) self.value = value diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py index a6d630d78260..77c5e20d065d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_request(resource_uri: str, *, start_time: Optional[str] = None, * _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-12-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-12-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-12-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +68,7 @@ class MetricNamespacesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2017_12_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2017_12_01_preview.MonitorManagementClient`'s :attr:`metric_namespaces` attribute. """ @@ -102,15 +95,13 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricNamespace or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2017_12_01_preview.models.MetricNamespace] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2017_12_01_preview.models.MetricNamespace] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2017-12-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2017-12-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2017-12-01-preview")) cls: ClsType[_models.MetricNamespaceCollection] = kwargs.pop("cls", None) error_map = { 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 a672e9dac2c3..dad9cbbe64f2 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", "2018-01-01") + api_version: str = kwargs.pop("api_version", "2018-01-01") 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/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_management_client.py index 7fb7b12635e9..7bbaa65c81e9 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_management_client.py @@ -27,9 +27,9 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2018_01_01.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2018_01_01.operations.MetricDefinitionsOperations :ivar metrics: MetricsOperations operations - :vartype metrics: $(python-base-namespace).v2018_01_01.operations.MetricsOperations + :vartype metrics: azure.mgmt.monitor.v2018_01_01.operations.MetricsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 29b436691897..30af6193b9be 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", "2018-01-01") + api_version: str = kwargs.pop("api_version", "2018-01-01") 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_management_client.py index 921e20eb6ca0..9d4f4ccbcc59 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_management_client.py @@ -27,9 +27,9 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2018_01_01.aio.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2018_01_01.aio.operations.MetricDefinitionsOperations :ivar metrics: MetricsOperations operations - :vartype metrics: $(python-base-namespace).v2018_01_01.aio.operations.MetricsOperations + :vartype metrics: azure.mgmt.monitor.v2018_01_01.aio.operations.MetricsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py index bda566d7eb5c..26fc057e4a01 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_01_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_01_01.aio.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -71,13 +66,13 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_01_01.models.MetricDefinition] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_01_01.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py index 59fc4adf136b..5c172137628b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._metrics_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ class MetricsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_01_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_01_01.aio.MonitorManagementClient`'s :attr:`metrics` attribute. """ @@ -111,13 +106,13 @@ async def list( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2018_01_01.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2018_01_01.models.ResultType :param metricnamespace: Metric namespace to query metric definitions for. Default value is None. :type metricnamespace: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Response or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_01_01.models.Response + :rtype: ~azure.mgmt.monitor.v2018_01_01.models.Response :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -131,7 +126,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( 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 3c205263e1de..88a98ad0be9f 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 @@ -79,7 +79,7 @@ class MetadataValue(_serialization.Model): """Represents a metric metadata value. :ivar name: the name of the metadata. - :vartype name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :ivar value: the value of the metadata. :vartype value: str """ @@ -94,7 +94,7 @@ def __init__( ) -> None: """ :keyword name: the name of the metadata. - :paramtype name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :keyword value: the value of the metadata. :paramtype value: str """ @@ -114,7 +114,7 @@ class Metric(_serialization.Model): :vartype type: str :ivar name: the name and the display name of the metric, i.e. it is localizable string. Required. - :vartype name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :ivar display_description: Detailed description of this metric. :vartype display_description: str :ivar error_code: 'Success' or the error details on query failures for this metric. @@ -124,9 +124,9 @@ class Metric(_serialization.Model): :ivar unit: The unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2018_01_01.models.MetricUnit + :vartype unit: str or ~azure.mgmt.monitor.v2018_01_01.models.MetricUnit :ivar timeseries: the time series returned when a data query is performed. Required. - :vartype timeseries: list[~$(python-base-namespace).v2018_01_01.models.TimeSeriesElement] + :vartype timeseries: list[~azure.mgmt.monitor.v2018_01_01.models.TimeSeriesElement] """ _validation = { @@ -168,7 +168,7 @@ def __init__( :paramtype type: str :keyword name: the name and the display name of the metric, i.e. it is localizable string. Required. - :paramtype name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :keyword display_description: Detailed description of this metric. :paramtype display_description: str :keyword error_code: 'Success' or the error details on query failures for this metric. @@ -178,9 +178,9 @@ def __init__( :keyword unit: The unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2018_01_01.models.MetricUnit + :paramtype unit: str or ~azure.mgmt.monitor.v2018_01_01.models.MetricUnit :keyword timeseries: the time series returned when a data query is performed. Required. - :paramtype timeseries: list[~$(python-base-namespace).v2018_01_01.models.TimeSeriesElement] + :paramtype timeseries: list[~azure.mgmt.monitor.v2018_01_01.models.TimeSeriesElement] """ super().__init__(**kwargs) self.id = id @@ -240,35 +240,34 @@ class MetricDefinition(_serialization.Model): # pylint: disable=too-many-instan :ivar namespace: the namespace the metric belongs to. :vartype namespace: str :ivar name: the name and the display name of the metric, i.e. it is a localizable string. - :vartype name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :ivar display_description: Detailed description of this metric. :vartype display_description: str :ivar category: Custom category name for this metric. :vartype category: str :ivar metric_class: The class of the metric. Known values are: "Availability", "Transactions", "Errors", "Latency", and "Saturation". - :vartype metric_class: str or ~$(python-base-namespace).v2018_01_01.models.MetricClass + :vartype metric_class: str or ~azure.mgmt.monitor.v2018_01_01.models.MetricClass :ivar unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2018_01_01.models.MetricUnit + :vartype unit: str or ~azure.mgmt.monitor.v2018_01_01.models.MetricUnit :ivar primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :vartype primary_aggregation_type: str or - ~$(python-base-namespace).v2018_01_01.models.AggregationType + ~azure.mgmt.monitor.v2018_01_01.models.AggregationType :ivar supported_aggregation_types: the collection of what aggregation types are supported. :vartype supported_aggregation_types: list[str or - ~$(python-base-namespace).v2018_01_01.models.AggregationType] + ~azure.mgmt.monitor.v2018_01_01.models.AggregationType] :ivar metric_availabilities: the collection of what aggregation intervals are available to be queried. - :vartype metric_availabilities: - list[~$(python-base-namespace).v2018_01_01.models.MetricAvailability] + :vartype metric_availabilities: list[~azure.mgmt.monitor.v2018_01_01.models.MetricAvailability] :ivar id: the resource identifier of the metric definition. :vartype id: str :ivar dimensions: the name and the display name of the dimension, i.e. it is a localizable string. - :vartype dimensions: list[~$(python-base-namespace).v2018_01_01.models.LocalizableString] + :vartype dimensions: list[~azure.mgmt.monitor.v2018_01_01.models.LocalizableString] """ _attribute_map = { @@ -313,35 +312,35 @@ def __init__( :keyword namespace: the namespace the metric belongs to. :paramtype namespace: str :keyword name: the name and the display name of the metric, i.e. it is a localizable string. - :paramtype name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2018_01_01.models.LocalizableString :keyword display_description: Detailed description of this metric. :paramtype display_description: str :keyword category: Custom category name for this metric. :paramtype category: str :keyword metric_class: The class of the metric. Known values are: "Availability", "Transactions", "Errors", "Latency", and "Saturation". - :paramtype metric_class: str or ~$(python-base-namespace).v2018_01_01.models.MetricClass + :paramtype metric_class: str or ~azure.mgmt.monitor.v2018_01_01.models.MetricClass :keyword unit: The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2018_01_01.models.MetricUnit + :paramtype unit: str or ~azure.mgmt.monitor.v2018_01_01.models.MetricUnit :keyword primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :paramtype primary_aggregation_type: str or - ~$(python-base-namespace).v2018_01_01.models.AggregationType + ~azure.mgmt.monitor.v2018_01_01.models.AggregationType :keyword supported_aggregation_types: the collection of what aggregation types are supported. :paramtype supported_aggregation_types: list[str or - ~$(python-base-namespace).v2018_01_01.models.AggregationType] + ~azure.mgmt.monitor.v2018_01_01.models.AggregationType] :keyword metric_availabilities: the collection of what aggregation intervals are available to be queried. :paramtype metric_availabilities: - list[~$(python-base-namespace).v2018_01_01.models.MetricAvailability] + list[~azure.mgmt.monitor.v2018_01_01.models.MetricAvailability] :keyword id: the resource identifier of the metric definition. :paramtype id: str :keyword dimensions: the name and the display name of the dimension, i.e. it is a localizable string. - :paramtype dimensions: list[~$(python-base-namespace).v2018_01_01.models.LocalizableString] + :paramtype dimensions: list[~azure.mgmt.monitor.v2018_01_01.models.LocalizableString] """ super().__init__(**kwargs) self.is_dimension_required = is_dimension_required @@ -365,7 +364,7 @@ class MetricDefinitionCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the values for the metric definitions. Required. - :vartype value: list[~$(python-base-namespace).v2018_01_01.models.MetricDefinition] + :vartype value: list[~azure.mgmt.monitor.v2018_01_01.models.MetricDefinition] """ _validation = { @@ -379,7 +378,7 @@ class MetricDefinitionCollection(_serialization.Model): def __init__(self, *, value: List["_models.MetricDefinition"], **kwargs: Any) -> None: """ :keyword value: the values for the metric definitions. Required. - :paramtype value: list[~$(python-base-namespace).v2018_01_01.models.MetricDefinition] + :paramtype value: list[~azure.mgmt.monitor.v2018_01_01.models.MetricDefinition] """ super().__init__(**kwargs) self.value = value @@ -473,7 +472,7 @@ class Response(_serialization.Model): :ivar resourceregion: The region of the resource being queried for metrics. :vartype resourceregion: str :ivar value: the value of the collection. Required. - :vartype value: list[~$(python-base-namespace).v2018_01_01.models.Metric] + :vartype value: list[~azure.mgmt.monitor.v2018_01_01.models.Metric] """ _validation = { @@ -518,7 +517,7 @@ def __init__( :keyword resourceregion: The region of the resource being queried for metrics. :paramtype resourceregion: str :keyword value: the value of the collection. Required. - :paramtype value: list[~$(python-base-namespace).v2018_01_01.models.Metric] + :paramtype value: list[~azure.mgmt.monitor.v2018_01_01.models.Metric] """ super().__init__(**kwargs) self.cost = cost @@ -533,10 +532,10 @@ class TimeSeriesElement(_serialization.Model): """A time series result type. The discriminator value is always TimeSeries in this case. :ivar metadatavalues: the metadata values returned if $filter was specified in the call. - :vartype metadatavalues: list[~$(python-base-namespace).v2018_01_01.models.MetadataValue] + :vartype metadatavalues: list[~azure.mgmt.monitor.v2018_01_01.models.MetadataValue] :ivar data: An array of data points representing the metric values. This is only returned if a result type of data is specified. - :vartype data: list[~$(python-base-namespace).v2018_01_01.models.MetricValue] + :vartype data: list[~azure.mgmt.monitor.v2018_01_01.models.MetricValue] """ _attribute_map = { @@ -553,10 +552,10 @@ def __init__( ) -> None: """ :keyword metadatavalues: the metadata values returned if $filter was specified in the call. - :paramtype metadatavalues: list[~$(python-base-namespace).v2018_01_01.models.MetadataValue] + :paramtype metadatavalues: list[~azure.mgmt.monitor.v2018_01_01.models.MetadataValue] :keyword data: An array of data points representing the metric values. This is only returned if a result type of data is specified. - :paramtype data: list[~$(python-base-namespace).v2018_01_01.models.MetricValue] + :paramtype data: list[~azure.mgmt.monitor.v2018_01_01.models.MetricValue] """ super().__init__(**kwargs) self.metadatavalues = metadatavalues diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py index ce998aa1291c..e05031c23f5d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_request(resource_uri: str, *, metricnamespace: Optional[str] = No _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,7 +68,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_01_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_01_01.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -99,14 +94,13 @@ def list( :type metricnamespace: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_01_01.models.MetricDefinition] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_01_01.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py index a58abf0c4d35..98a050c3c00f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +52,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -101,7 +96,7 @@ class MetricsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_01_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_01_01.MonitorManagementClient`'s :attr:`metrics` attribute. """ @@ -169,13 +164,13 @@ def list( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2018_01_01.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2018_01_01.models.ResultType :param metricnamespace: Metric namespace to query metric definitions for. Default value is None. :type metricnamespace: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Response or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_01_01.models.Response + :rtype: ~azure.mgmt.monitor.v2018_01_01.models.Response :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -189,7 +184,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-01-01")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( 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 d0ee3926b584..73b44f979f35 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", "2018-03-01") + api_version: str = kwargs.pop("api_version", "2018-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index db768c905ebc..57c2ad370725 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_management_client.py @@ -26,12 +26,12 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2018_03_01.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2018_03_01.operations.ActionGroupsOperations :ivar metric_alerts: MetricAlertsOperations operations - :vartype metric_alerts: $(python-base-namespace).v2018_03_01.operations.MetricAlertsOperations + :vartype metric_alerts: azure.mgmt.monitor.v2018_03_01.operations.MetricAlertsOperations :ivar metric_alerts_status: MetricAlertsStatusOperations operations :vartype metric_alerts_status: - $(python-base-namespace).v2018_03_01.operations.MetricAlertsStatusOperations + azure.mgmt.monitor.v2018_03_01.operations.MetricAlertsStatusOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 087b4a2041c7..9b7f0bc7ffb4 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", "2018-03-01") + api_version: str = kwargs.pop("api_version", "2018-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index b6c59816c495..73cd9dbc6178 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_management_client.py @@ -26,14 +26,12 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2018_03_01.aio.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2018_03_01.aio.operations.ActionGroupsOperations :ivar metric_alerts: MetricAlertsOperations operations - :vartype metric_alerts: - $(python-base-namespace).v2018_03_01.aio.operations.MetricAlertsOperations + :vartype metric_alerts: azure.mgmt.monitor.v2018_03_01.aio.operations.MetricAlertsOperations :ivar metric_alerts_status: MetricAlertsStatusOperations operations :vartype metric_alerts_status: - $(python-base-namespace).v2018_03_01.aio.operations.MetricAlertsStatusOperations + azure.mgmt.monitor.v2018_03_01.aio.operations.MetricAlertsStatusOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py index 1886eaebdf0e..5e6c3dd5956c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_03_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_03_01.aio.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -84,13 +79,13 @@ async def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -118,7 +113,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -139,13 +134,13 @@ async def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -224,7 +219,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -355,13 +350,13 @@ async def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2018_03_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -389,7 +384,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -410,14 +405,13 @@ async def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2018_03_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -431,7 +425,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -488,13 +482,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_03_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -577,13 +571,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_03_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -674,7 +668,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2018_03_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2018_03_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -731,7 +725,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2018_03_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2018_03_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -751,7 +745,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py index 5ef5ee42bd15..3a7754a8b6fa 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class MetricAlertsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_03_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_03_01.aio.MonitorManagementClient`'s :attr:`metric_alerts` attribute. """ @@ -72,13 +67,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.MetricAl :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricAlertResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_03_01.models.MetricAlertResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -159,13 +154,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricAlertResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_03_01.models.MetricAlertResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -248,7 +243,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -262,7 +257,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -318,13 +313,13 @@ async def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :type parameters: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -352,7 +347,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -373,13 +368,13 @@ async def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a MetricAlertResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource or IO + :type parameters: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -393,7 +388,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) @@ -461,13 +456,13 @@ async def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to update. Required. - :type parameters: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResourcePatch + :type parameters: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -495,7 +490,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -516,13 +511,13 @@ async def update( :type rule_name: str :param parameters: The parameters of the rule to update. Is either a MetricAlertResourcePatch type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResourcePatch or IO + :type parameters: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -536,7 +531,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) @@ -613,7 +608,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py index 5847ee4829b2..356ee548b29c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._metric_alerts_status_operations import build_list_by_name_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class MetricAlertsStatusOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_03_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_03_01.aio.MonitorManagementClient`'s :attr:`metric_alerts_status` attribute. """ @@ -68,7 +63,7 @@ async def list( :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertStatusCollection or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertStatusCollection + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertStatusCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -82,7 +77,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertStatusCollection] = kwargs.pop("cls", None) request = build_list_request( @@ -135,7 +130,7 @@ async def list_by_name( :type status_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertStatusCollection or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertStatusCollection + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertStatusCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -149,7 +144,7 @@ async def list_by_name( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertStatusCollection] = kwargs.pop("cls", None) request = build_list_by_name_request( 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 903953be53c6..d842e635ffdd 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 @@ -28,7 +28,7 @@ class ActionGroupList(_serialization.Model): """A list of action groups. :ivar value: The list of action groups. - :vartype value: list[~$(python-base-namespace).v2018_03_01.models.ActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -47,7 +47,7 @@ def __init__( ) -> None: """ :keyword value: The list of action groups. - :paramtype value: list[~$(python-base-namespace).v2018_03_01.models.ActionGroupResource] + :paramtype value: list[~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -156,30 +156,29 @@ class ActionGroupResource(Resource): # pylint: disable=too-many-instance-attrib enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2018_03_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2018_03_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2018_03_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2018_03_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2018_03_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2018_03_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2018_03_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2018_03_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2018_03_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2018_03_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2018_03_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2018_03_01.models.AzureFunctionReceiver] """ _validation = { @@ -242,32 +241,30 @@ def __init__( enabled, then none of its receivers will receive communications. :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2018_03_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2018_03_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2018_03_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2018_03_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2018_03_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2018_03_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2018_03_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2018_03_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2018_03_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2018_03_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2018_03_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2018_03_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2018_03_01.models.AzureFunctionReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name @@ -453,7 +450,7 @@ class MultiMetricCriteria(_serialization.Model): :vartype additional_properties: dict[str, JSON] :ivar criterion_type: Specifies the type of threshold criteria. Required. Known values are: "StaticThresholdCriterion" and "DynamicThresholdCriterion". - :vartype criterion_type: str or ~$(python-base-namespace).v2018_03_01.models.CriterionType + :vartype criterion_type: str or ~azure.mgmt.monitor.v2018_03_01.models.CriterionType :ivar name: Name of the criteria. Required. :vartype name: str :ivar metric_name: Name of the metric. Required. @@ -462,10 +459,9 @@ class MultiMetricCriteria(_serialization.Model): :vartype metric_namespace: str :ivar time_aggregation: the criteria time aggregation types. Required. Known values are: "Average", "Count", "Minimum", "Maximum", and "Total". - :vartype time_aggregation: str or - ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum + :vartype time_aggregation: str or ~azure.mgmt.monitor.v2018_03_01.models.AggregationTypeEnum :ivar dimensions: List of dimension conditions. - :vartype dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension] :ivar skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. :vartype skip_metric_validation: bool @@ -520,10 +516,9 @@ def __init__( :paramtype metric_namespace: str :keyword time_aggregation: the criteria time aggregation types. Required. Known values are: "Average", "Count", "Minimum", "Maximum", and "Total". - :paramtype time_aggregation: str or - ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum + :paramtype time_aggregation: str or ~azure.mgmt.monitor.v2018_03_01.models.AggregationTypeEnum :keyword dimensions: List of dimension conditions. - :paramtype dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension] :keyword skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. :paramtype skip_metric_validation: bool @@ -549,7 +544,7 @@ class DynamicMetricCriteria(MultiMetricCriteria): # pylint: disable=too-many-in :vartype additional_properties: dict[str, JSON] :ivar criterion_type: Specifies the type of threshold criteria. Required. Known values are: "StaticThresholdCriterion" and "DynamicThresholdCriterion". - :vartype criterion_type: str or ~$(python-base-namespace).v2018_03_01.models.CriterionType + :vartype criterion_type: str or ~azure.mgmt.monitor.v2018_03_01.models.CriterionType :ivar name: Name of the criteria. Required. :vartype name: str :ivar metric_name: Name of the metric. Required. @@ -558,25 +553,23 @@ class DynamicMetricCriteria(MultiMetricCriteria): # pylint: disable=too-many-in :vartype metric_namespace: str :ivar time_aggregation: the criteria time aggregation types. Required. Known values are: "Average", "Count", "Minimum", "Maximum", and "Total". - :vartype time_aggregation: str or - ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum + :vartype time_aggregation: str or ~azure.mgmt.monitor.v2018_03_01.models.AggregationTypeEnum :ivar dimensions: List of dimension conditions. - :vartype dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension] :ivar skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. :vartype skip_metric_validation: bool :ivar operator: The operator used to compare the metric value against the threshold. Required. Known values are: "GreaterThan", "LessThan", and "GreaterOrLessThan". - :vartype operator: str or ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdOperator + :vartype operator: str or ~azure.mgmt.monitor.v2018_03_01.models.DynamicThresholdOperator :ivar alert_sensitivity: The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Required. Known values are: "Low", "Medium", and "High". :vartype alert_sensitivity: str or - ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdSensitivity + ~azure.mgmt.monitor.v2018_03_01.models.DynamicThresholdSensitivity :ivar failing_periods: The minimum number of violations required within the selected lookback time window required to raise an alert. Required. - :vartype failing_periods: - ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdFailingPeriods + :vartype failing_periods: ~azure.mgmt.monitor.v2018_03_01.models.DynamicThresholdFailingPeriods :ivar ignore_data_before: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). :vartype ignore_data_before: ~datetime.datetime @@ -635,26 +628,24 @@ def __init__( :paramtype metric_namespace: str :keyword time_aggregation: the criteria time aggregation types. Required. Known values are: "Average", "Count", "Minimum", "Maximum", and "Total". - :paramtype time_aggregation: str or - ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum + :paramtype time_aggregation: str or ~azure.mgmt.monitor.v2018_03_01.models.AggregationTypeEnum :keyword dimensions: List of dimension conditions. - :paramtype dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension] :keyword skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. :paramtype skip_metric_validation: bool :keyword operator: The operator used to compare the metric value against the threshold. Required. Known values are: "GreaterThan", "LessThan", and "GreaterOrLessThan". - :paramtype operator: str or - ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2018_03_01.models.DynamicThresholdOperator :keyword alert_sensitivity: The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Required. Known values are: "Low", "Medium", and "High". :paramtype alert_sensitivity: str or - ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdSensitivity + ~azure.mgmt.monitor.v2018_03_01.models.DynamicThresholdSensitivity :keyword failing_periods: The minimum number of violations required within the selected lookback time window required to raise an alert. Required. :paramtype failing_periods: - ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdFailingPeriods + ~azure.mgmt.monitor.v2018_03_01.models.DynamicThresholdFailingPeriods :keyword ignore_data_before: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). :paramtype ignore_data_before: ~datetime.datetime @@ -732,7 +723,7 @@ class EmailReceiver(_serialization.Model): :vartype email_address: str :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2018_03_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2018_03_01.models.ReceiverStatus """ _validation = { @@ -971,7 +962,7 @@ class MetricAlertCriteria(_serialization.Model): "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", and "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria". - :vartype odata_type: str or ~$(python-base-namespace).v2018_03_01.models.Odatatype + :vartype odata_type: str or ~azure.mgmt.monitor.v2018_03_01.models.Odatatype """ _validation = { @@ -1014,9 +1005,9 @@ class MetricAlertMultipleResourceMultipleMetricCriteria(MetricAlertCriteria): "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", and "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria". - :vartype odata_type: str or ~$(python-base-namespace).v2018_03_01.models.Odatatype + :vartype odata_type: str or ~azure.mgmt.monitor.v2018_03_01.models.Odatatype :ivar all_of: the list of multiple metric criteria for this 'all of' operation. - :vartype all_of: list[~$(python-base-namespace).v2018_03_01.models.MultiMetricCriteria] + :vartype all_of: list[~azure.mgmt.monitor.v2018_03_01.models.MultiMetricCriteria] """ _validation = { @@ -1041,7 +1032,7 @@ def __init__( collection. :paramtype additional_properties: dict[str, JSON] :keyword all_of: the list of multiple metric criteria for this 'all of' operation. - :paramtype all_of: list[~$(python-base-namespace).v2018_03_01.models.MultiMetricCriteria] + :paramtype all_of: list[~azure.mgmt.monitor.v2018_03_01.models.MultiMetricCriteria] """ super().__init__(additional_properties=additional_properties, **kwargs) self.odata_type: str = "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" @@ -1089,13 +1080,13 @@ class MetricAlertResource(Resource): # pylint: disable=too-many-instance-attrib one resource. :vartype target_resource_region: str :ivar criteria: defines the specific alert criteria information. Required. - :vartype criteria: ~$(python-base-namespace).v2018_03_01.models.MetricAlertCriteria + :vartype criteria: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertCriteria :ivar auto_mitigate: the flag that indicates whether the alert should be auto resolved or not. The default is true. :vartype auto_mitigate: bool :ivar actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype actions: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertAction] + :vartype actions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime :ivar is_migrated: the value indicating whether this alert rule is migrated. @@ -1185,13 +1176,13 @@ def __init__( one resource. :paramtype target_resource_region: str :keyword criteria: defines the specific alert criteria information. Required. - :paramtype criteria: ~$(python-base-namespace).v2018_03_01.models.MetricAlertCriteria + :paramtype criteria: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertCriteria :keyword auto_mitigate: the flag that indicates whether the alert should be auto resolved or not. The default is true. :paramtype auto_mitigate: bool :keyword actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype actions: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertAction] + :paramtype actions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertAction] """ super().__init__(location=location, tags=tags, **kwargs) self.description = description @@ -1213,7 +1204,7 @@ class MetricAlertResourceCollection(_serialization.Model): """Represents a collection of alert rule resources. :ivar value: the values for the alert rule resources. - :vartype value: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertResource] + :vartype value: list[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource] """ _attribute_map = { @@ -1223,7 +1214,7 @@ class MetricAlertResourceCollection(_serialization.Model): def __init__(self, *, value: Optional[List["_models.MetricAlertResource"]] = None, **kwargs: Any) -> None: """ :keyword value: the values for the alert rule resources. - :paramtype value: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertResource] + :paramtype value: list[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource] """ super().__init__(**kwargs) self.value = value @@ -1258,13 +1249,13 @@ class MetricAlertResourcePatch(_serialization.Model): # pylint: disable=too-man created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. :vartype target_resource_region: str :ivar criteria: defines the specific alert criteria information. - :vartype criteria: ~$(python-base-namespace).v2018_03_01.models.MetricAlertCriteria + :vartype criteria: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertCriteria :ivar auto_mitigate: the flag that indicates whether the alert should be auto resolved or not. The default is true. :vartype auto_mitigate: bool :ivar actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :vartype actions: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertAction] + :vartype actions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime :ivar is_migrated: the value indicating whether this alert rule is migrated. @@ -1335,13 +1326,13 @@ def __init__( created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. :paramtype target_resource_region: str :keyword criteria: defines the specific alert criteria information. - :paramtype criteria: ~$(python-base-namespace).v2018_03_01.models.MetricAlertCriteria + :paramtype criteria: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertCriteria :keyword auto_mitigate: the flag that indicates whether the alert should be auto resolved or not. The default is true. :paramtype auto_mitigate: bool :keyword actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. - :paramtype actions: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertAction] + :paramtype actions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertAction] """ super().__init__(**kwargs) self.tags = tags @@ -1372,9 +1363,9 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", and "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria". - :vartype odata_type: str or ~$(python-base-namespace).v2018_03_01.models.Odatatype + :vartype odata_type: str or ~azure.mgmt.monitor.v2018_03_01.models.Odatatype :ivar all_of: The list of metric criteria for this 'all of' operation. - :vartype all_of: list[~$(python-base-namespace).v2018_03_01.models.MetricCriteria] + :vartype all_of: list[~azure.mgmt.monitor.v2018_03_01.models.MetricCriteria] """ _validation = { @@ -1399,7 +1390,7 @@ def __init__( collection. :paramtype additional_properties: dict[str, JSON] :keyword all_of: The list of metric criteria for this 'all of' operation. - :paramtype all_of: list[~$(python-base-namespace).v2018_03_01.models.MetricCriteria] + :paramtype all_of: list[~azure.mgmt.monitor.v2018_03_01.models.MetricCriteria] """ super().__init__(additional_properties=additional_properties, **kwargs) self.odata_type: str = "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" @@ -1416,7 +1407,7 @@ class MetricAlertStatus(_serialization.Model): :ivar type: The extended resource type name. :vartype type: str :ivar properties: The alert status properties of the metric alert status. - :vartype properties: ~$(python-base-namespace).v2018_03_01.models.MetricAlertStatusProperties + :vartype properties: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertStatusProperties """ _attribute_map = { @@ -1443,7 +1434,7 @@ def __init__( :keyword type: The extended resource type name. :paramtype type: str :keyword properties: The alert status properties of the metric alert status. - :paramtype properties: ~$(python-base-namespace).v2018_03_01.models.MetricAlertStatusProperties + :paramtype properties: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertStatusProperties """ super().__init__(**kwargs) self.name = name @@ -1456,7 +1447,7 @@ class MetricAlertStatusCollection(_serialization.Model): """Represents a collection of alert rule resources. :ivar value: the values for the alert rule resources. - :vartype value: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertStatus] + :vartype value: list[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertStatus] """ _attribute_map = { @@ -1466,7 +1457,7 @@ class MetricAlertStatusCollection(_serialization.Model): def __init__(self, *, value: Optional[List["_models.MetricAlertStatus"]] = None, **kwargs: Any) -> None: """ :keyword value: the values for the alert rule resources. - :paramtype value: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertStatus] + :paramtype value: list[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertStatus] """ super().__init__(**kwargs) self.value = value @@ -1521,7 +1512,7 @@ class MetricCriteria(MultiMetricCriteria): :vartype additional_properties: dict[str, JSON] :ivar criterion_type: Specifies the type of threshold criteria. Required. Known values are: "StaticThresholdCriterion" and "DynamicThresholdCriterion". - :vartype criterion_type: str or ~$(python-base-namespace).v2018_03_01.models.CriterionType + :vartype criterion_type: str or ~azure.mgmt.monitor.v2018_03_01.models.CriterionType :ivar name: Name of the criteria. Required. :vartype name: str :ivar metric_name: Name of the metric. Required. @@ -1530,16 +1521,15 @@ class MetricCriteria(MultiMetricCriteria): :vartype metric_namespace: str :ivar time_aggregation: the criteria time aggregation types. Required. Known values are: "Average", "Count", "Minimum", "Maximum", and "Total". - :vartype time_aggregation: str or - ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum + :vartype time_aggregation: str or ~azure.mgmt.monitor.v2018_03_01.models.AggregationTypeEnum :ivar dimensions: List of dimension conditions. - :vartype dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension] :ivar skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. :vartype skip_metric_validation: bool :ivar operator: the criteria operator. Required. Known values are: "Equals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or ~$(python-base-namespace).v2018_03_01.models.Operator + :vartype operator: str or ~azure.mgmt.monitor.v2018_03_01.models.Operator :ivar threshold: the criteria threshold value that activates the alert. Required. :vartype threshold: float """ @@ -1592,16 +1582,15 @@ def __init__( :paramtype metric_namespace: str :keyword time_aggregation: the criteria time aggregation types. Required. Known values are: "Average", "Count", "Minimum", "Maximum", and "Total". - :paramtype time_aggregation: str or - ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum + :paramtype time_aggregation: str or ~azure.mgmt.monitor.v2018_03_01.models.AggregationTypeEnum :keyword dimensions: List of dimension conditions. - :paramtype dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2018_03_01.models.MetricDimension] :keyword skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. :paramtype skip_metric_validation: bool :keyword operator: the criteria operator. Required. Known values are: "Equals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or ~$(python-base-namespace).v2018_03_01.models.Operator + :paramtype operator: str or ~azure.mgmt.monitor.v2018_03_01.models.Operator :keyword threshold: the criteria threshold value that activates the alert. Required. :paramtype threshold: float """ @@ -1677,7 +1666,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2018_03_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2018_03_01.models.ReceiverStatus """ _validation = { @@ -1800,7 +1789,7 @@ class WebtestLocationAvailabilityCriteria(MetricAlertCriteria): "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", and "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria". - :vartype odata_type: str or ~$(python-base-namespace).v2018_03_01.models.Odatatype + :vartype odata_type: str or ~azure.mgmt.monitor.v2018_03_01.models.Odatatype :ivar web_test_id: The Application Insights web test Id. Required. :vartype web_test_id: str :ivar component_id: The Application Insights resource Id. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py index 88780bd89d41..8940343c2b86 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -275,7 +270,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_03_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_03_01.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -306,13 +301,13 @@ def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -340,7 +335,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -361,13 +356,13 @@ def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -446,7 +441,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -577,13 +572,13 @@ def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2018_03_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -611,7 +606,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -632,14 +627,13 @@ def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2018_03_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -653,7 +647,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -710,13 +704,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_03_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -799,13 +793,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_03_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_03_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -896,7 +890,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2018_03_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2018_03_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -953,7 +947,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2018_03_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2018_03_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -973,7 +967,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py index b67e5515c6c3..9e32945a64e1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -69,7 +64,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -99,7 +94,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -132,7 +127,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -166,7 +161,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -200,7 +195,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -233,7 +228,7 @@ class MetricAlertsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_03_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_03_01.MonitorManagementClient`'s :attr:`metric_alerts` attribute. """ @@ -253,13 +248,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.MetricAlertRe :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricAlertResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_03_01.models.MetricAlertResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -340,13 +335,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricAlertResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_03_01.models.MetricAlertResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -429,7 +424,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -443,7 +438,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -499,13 +494,13 @@ def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :type parameters: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -533,7 +528,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -554,13 +549,13 @@ def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a MetricAlertResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource or IO + :type parameters: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -574,7 +569,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) @@ -642,13 +637,13 @@ def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to update. Required. - :type parameters: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResourcePatch + :type parameters: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -676,7 +671,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -697,13 +692,13 @@ def update( :type rule_name: str :param parameters: The parameters of the rule to update. Is either a MetricAlertResourcePatch type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResourcePatch or IO + :type parameters: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertResource + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -717,7 +712,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.MetricAlertResource] = kwargs.pop("cls", None) @@ -794,7 +789,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py index bba700a63728..95fde4631f7c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_list_request(resource_group_name: str, rule_name: str, subscription_id _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -76,7 +71,7 @@ def build_list_by_name_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -110,7 +105,7 @@ class MetricAlertsStatusOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_03_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_03_01.MonitorManagementClient`'s :attr:`metric_alerts_status` attribute. """ @@ -134,7 +129,7 @@ def list(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _mode :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertStatusCollection or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertStatusCollection + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertStatusCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -148,7 +143,7 @@ def list(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertStatusCollection] = kwargs.pop("cls", None) request = build_list_request( @@ -201,7 +196,7 @@ def list_by_name( :type status_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: MetricAlertStatusCollection or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_03_01.models.MetricAlertStatusCollection + :rtype: ~azure.mgmt.monitor.v2018_03_01.models.MetricAlertStatusCollection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -215,7 +210,7 @@ def list_by_name( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-03-01")) cls: ClsType[_models.MetricAlertStatusCollection] = kwargs.pop("cls", None) request = build_list_by_name_request( 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 90a10fa7b275..c762f34e7a72 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", "2018-04-16") + api_version: str = kwargs.pop("api_version", "2018-04-16") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index 5fe56a70c173..c022f2b49f74 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations :vartype scheduled_query_rules: - $(python-base-namespace).v2018_04_16.operations.ScheduledQueryRulesOperations + azure.mgmt.monitor.v2018_04_16.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 01cea85a1b06..9b10881a577b 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", "2018-04-16") + api_version: str = kwargs.pop("api_version", "2018-04-16") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 5576210b135f..b8dca5d39113 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations :vartype scheduled_query_rules: - $(python-base-namespace).v2018_04_16.aio.operations.ScheduledQueryRulesOperations + azure.mgmt.monitor.v2018_04_16.aio.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py index 1502426a1f23..a57ab86c2b03 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class ScheduledQueryRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_04_16.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_04_16.aio.MonitorManagementClient`'s :attr:`scheduled_query_rules` attribute. """ @@ -83,13 +78,13 @@ async def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :type parameters: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -117,7 +112,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -138,13 +133,13 @@ async def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a LogSearchRuleResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -158,7 +153,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) @@ -223,7 +218,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -237,7 +232,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -293,13 +288,13 @@ async def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to update. Required. - :type parameters: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResourcePatch + :type parameters: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -327,7 +322,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -348,13 +343,13 @@ async def update( :type rule_name: str :param parameters: The parameters of the rule to update. Is either a LogSearchRuleResourcePatch type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResourcePatch or IO + :type parameters: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -368,7 +363,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) @@ -445,7 +440,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -492,13 +487,13 @@ def list_by_subscription( :return: An iterator like instance of either LogSearchRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -586,13 +581,13 @@ def list_by_resource_group( :return: An iterator like instance of either LogSearchRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResourceCollection] = kwargs.pop("cls", None) error_map = { 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 cb07c3096b06..df113d7354f1 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 @@ -59,13 +59,13 @@ class AlertingAction(Action): Required. :vartype odata_type: str :ivar severity: Severity of the alert. Required. Known values are: "0", "1", "2", "3", and "4". - :vartype severity: str or ~$(python-base-namespace).v2018_04_16.models.AlertSeverity + :vartype severity: str or ~azure.mgmt.monitor.v2018_04_16.models.AlertSeverity :ivar azns_action: Azure action group reference. - :vartype azns_action: ~$(python-base-namespace).v2018_04_16.models.AzNsActionGroup + :vartype azns_action: ~azure.mgmt.monitor.v2018_04_16.models.AzNsActionGroup :ivar throttling_in_min: time (in minutes) for which Alerts should be throttled or suppressed. :vartype throttling_in_min: int :ivar trigger: The trigger condition that results in the alert rule being. Required. - :vartype trigger: ~$(python-base-namespace).v2018_04_16.models.TriggerCondition + :vartype trigger: ~azure.mgmt.monitor.v2018_04_16.models.TriggerCondition """ _validation = { @@ -94,14 +94,14 @@ def __init__( """ :keyword severity: Severity of the alert. Required. Known values are: "0", "1", "2", "3", and "4". - :paramtype severity: str or ~$(python-base-namespace).v2018_04_16.models.AlertSeverity + :paramtype severity: str or ~azure.mgmt.monitor.v2018_04_16.models.AlertSeverity :keyword azns_action: Azure action group reference. - :paramtype azns_action: ~$(python-base-namespace).v2018_04_16.models.AzNsActionGroup + :paramtype azns_action: ~azure.mgmt.monitor.v2018_04_16.models.AzNsActionGroup :keyword throttling_in_min: time (in minutes) for which Alerts should be throttled or suppressed. :paramtype throttling_in_min: int :keyword trigger: The trigger condition that results in the alert rule being. Required. - :paramtype trigger: ~$(python-base-namespace).v2018_04_16.models.TriggerCondition + :paramtype trigger: ~azure.mgmt.monitor.v2018_04_16.models.TriggerCondition """ super().__init__(**kwargs) self.odata_type: str = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction" @@ -160,7 +160,7 @@ class Criteria(_serialization.Model): :ivar metric_name: Name of the metric. Required. :vartype metric_name: str :ivar dimensions: List of Dimensions for creating metric. - :vartype dimensions: list[~$(python-base-namespace).v2018_04_16.models.Dimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2018_04_16.models.Dimension] """ _validation = { @@ -179,7 +179,7 @@ def __init__( :keyword metric_name: Name of the metric. Required. :paramtype metric_name: str :keyword dimensions: List of Dimensions for creating metric. - :paramtype dimensions: list[~$(python-base-namespace).v2018_04_16.models.Dimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2018_04_16.models.Dimension] """ super().__init__(**kwargs) self.metric_name = metric_name @@ -194,7 +194,7 @@ class Dimension(_serialization.Model): :ivar name: Name of the dimension. Required. :vartype name: str :ivar operator: Operator for dimension values. Required. "Include" - :vartype operator: str or ~$(python-base-namespace).v2018_04_16.models.Operator + :vartype operator: str or ~azure.mgmt.monitor.v2018_04_16.models.Operator :ivar values: List of dimension values. Required. :vartype values: list[str] """ @@ -218,7 +218,7 @@ def __init__( :keyword name: Name of the dimension. Required. :paramtype name: str :keyword operator: Operator for dimension values. Required. "Include" - :paramtype operator: str or ~$(python-base-namespace).v2018_04_16.models.Operator + :paramtype operator: str or ~azure.mgmt.monitor.v2018_04_16.models.Operator :keyword values: List of dimension values. Required. :paramtype values: list[str] """ @@ -232,7 +232,7 @@ class ErrorContract(_serialization.Model): """Describes the format of Error response. :ivar error: The error details. - :vartype error: ~$(python-base-namespace).v2018_04_16.models.ErrorResponse + :vartype error: ~azure.mgmt.monitor.v2018_04_16.models.ErrorResponse """ _attribute_map = { @@ -242,7 +242,7 @@ class ErrorContract(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorResponse"] = None, **kwargs: Any) -> None: """ :keyword error: The error details. - :paramtype error: ~$(python-base-namespace).v2018_04_16.models.ErrorResponse + :paramtype error: ~azure.mgmt.monitor.v2018_04_16.models.ErrorResponse """ super().__init__(**kwargs) self.error = error @@ -280,14 +280,12 @@ class LogMetricTrigger(_serialization.Model): :ivar threshold_operator: Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'. Known values are: "GreaterThanOrEqual", "LessThanOrEqual", "GreaterThan", "LessThan", and "Equal". - :vartype threshold_operator: str or - ~$(python-base-namespace).v2018_04_16.models.ConditionalOperator + :vartype threshold_operator: str or ~azure.mgmt.monitor.v2018_04_16.models.ConditionalOperator :ivar threshold: The threshold of the metric trigger. :vartype threshold: float :ivar metric_trigger_type: Metric Trigger Type - 'Consecutive' or 'Total'. Known values are: "Consecutive" and "Total". - :vartype metric_trigger_type: str or - ~$(python-base-namespace).v2018_04_16.models.MetricTriggerType + :vartype metric_trigger_type: str or ~azure.mgmt.monitor.v2018_04_16.models.MetricTriggerType :ivar metric_column: Evaluation of metric on a particular column. :vartype metric_column: str """ @@ -313,13 +311,12 @@ def __init__( 'Equal'. Known values are: "GreaterThanOrEqual", "LessThanOrEqual", "GreaterThan", "LessThan", and "Equal". :paramtype threshold_operator: str or - ~$(python-base-namespace).v2018_04_16.models.ConditionalOperator + ~azure.mgmt.monitor.v2018_04_16.models.ConditionalOperator :keyword threshold: The threshold of the metric trigger. :paramtype threshold: float :keyword metric_trigger_type: Metric Trigger Type - 'Consecutive' or 'Total'. Known values are: "Consecutive" and "Total". - :paramtype metric_trigger_type: str or - ~$(python-base-namespace).v2018_04_16.models.MetricTriggerType + :paramtype metric_trigger_type: str or ~azure.mgmt.monitor.v2018_04_16.models.MetricTriggerType :keyword metric_column: Evaluation of metric on a particular column. :paramtype metric_column: str """ @@ -435,20 +432,19 @@ class LogSearchRuleResource(Resource): # pylint: disable=too-many-instance-attr :vartype auto_mitigate: bool :ivar enabled: The flag which indicates whether the Log Search rule is enabled. Value should be true or false. Known values are: "true" and "false". - :vartype enabled: str or ~$(python-base-namespace).v2018_04_16.models.Enabled + :vartype enabled: str or ~azure.mgmt.monitor.v2018_04_16.models.Enabled :ivar last_updated_time: Last time the rule was updated in IS08601 format. :vartype last_updated_time: ~datetime.datetime :ivar provisioning_state: Provisioning state of the scheduled query rule. Known values are: "Succeeded", "Deploying", "Canceled", and "Failed". - :vartype provisioning_state: str or - ~$(python-base-namespace).v2018_04_16.models.ProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.monitor.v2018_04_16.models.ProvisioningState :ivar source: Data Source against which rule will Query Data. Required. - :vartype source: ~$(python-base-namespace).v2018_04_16.models.Source + :vartype source: ~azure.mgmt.monitor.v2018_04_16.models.Source :ivar schedule: Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction. - :vartype schedule: ~$(python-base-namespace).v2018_04_16.models.Schedule + :vartype schedule: ~azure.mgmt.monitor.v2018_04_16.models.Schedule :ivar action: Action needs to be taken on rule execution. Required. - :vartype action: ~$(python-base-namespace).v2018_04_16.models.Action + :vartype action: ~azure.mgmt.monitor.v2018_04_16.models.Action """ _validation = { @@ -515,14 +511,14 @@ def __init__( :paramtype auto_mitigate: bool :keyword enabled: The flag which indicates whether the Log Search rule is enabled. Value should be true or false. Known values are: "true" and "false". - :paramtype enabled: str or ~$(python-base-namespace).v2018_04_16.models.Enabled + :paramtype enabled: str or ~azure.mgmt.monitor.v2018_04_16.models.Enabled :keyword source: Data Source against which rule will Query Data. Required. - :paramtype source: ~$(python-base-namespace).v2018_04_16.models.Source + :paramtype source: ~azure.mgmt.monitor.v2018_04_16.models.Source :keyword schedule: Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction. - :paramtype schedule: ~$(python-base-namespace).v2018_04_16.models.Schedule + :paramtype schedule: ~azure.mgmt.monitor.v2018_04_16.models.Schedule :keyword action: Action needs to be taken on rule execution. Required. - :paramtype action: ~$(python-base-namespace).v2018_04_16.models.Action + :paramtype action: ~azure.mgmt.monitor.v2018_04_16.models.Action """ super().__init__(location=location, tags=tags, **kwargs) self.created_with_api_version = None @@ -542,7 +538,7 @@ class LogSearchRuleResourceCollection(_serialization.Model): """Represents a collection of Log Search rule resources. :ivar value: The values for the Log Search Rule resources. - :vartype value: list[~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource] """ _attribute_map = { @@ -552,7 +548,7 @@ class LogSearchRuleResourceCollection(_serialization.Model): def __init__(self, *, value: Optional[List["_models.LogSearchRuleResource"]] = None, **kwargs: Any) -> None: """ :keyword value: The values for the Log Search Rule resources. - :paramtype value: list[~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource] + :paramtype value: list[~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource] """ super().__init__(**kwargs) self.value = value @@ -565,7 +561,7 @@ class LogSearchRuleResourcePatch(_serialization.Model): :vartype tags: dict[str, str] :ivar enabled: The flag which indicates whether the Log Search rule is enabled. Value should be true or false. Known values are: "true" and "false". - :vartype enabled: str or ~$(python-base-namespace).v2018_04_16.models.Enabled + :vartype enabled: str or ~azure.mgmt.monitor.v2018_04_16.models.Enabled """ _attribute_map = { @@ -585,7 +581,7 @@ def __init__( :paramtype tags: dict[str, str] :keyword enabled: The flag which indicates whether the Log Search rule is enabled. Value should be true or false. Known values are: "true" and "false". - :paramtype enabled: str or ~$(python-base-namespace).v2018_04_16.models.Enabled + :paramtype enabled: str or ~azure.mgmt.monitor.v2018_04_16.models.Enabled """ super().__init__(**kwargs) self.tags = tags @@ -601,7 +597,7 @@ class LogToMetricAction(Action): Required. :vartype odata_type: str :ivar criteria: Criteria of Metric. Required. - :vartype criteria: list[~$(python-base-namespace).v2018_04_16.models.Criteria] + :vartype criteria: list[~azure.mgmt.monitor.v2018_04_16.models.Criteria] """ _validation = { @@ -617,7 +613,7 @@ class LogToMetricAction(Action): def __init__(self, *, criteria: List["_models.Criteria"], **kwargs: Any) -> None: """ :keyword criteria: Criteria of Metric. Required. - :paramtype criteria: list[~$(python-base-namespace).v2018_04_16.models.Criteria] + :paramtype criteria: list[~azure.mgmt.monitor.v2018_04_16.models.Criteria] """ super().__init__(**kwargs) self.odata_type: str = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction" @@ -673,7 +669,7 @@ class Source(_serialization.Model): :ivar data_source_id: The resource uri over which log search query is to be run. Required. :vartype data_source_id: str :ivar query_type: Set value to 'ResultCount' . "ResultCount" - :vartype query_type: str or ~$(python-base-namespace).v2018_04_16.models.QueryType + :vartype query_type: str or ~azure.mgmt.monitor.v2018_04_16.models.QueryType """ _validation = { @@ -704,7 +700,7 @@ def __init__( :keyword data_source_id: The resource uri over which log search query is to be run. Required. :paramtype data_source_id: str :keyword query_type: Set value to 'ResultCount' . "ResultCount" - :paramtype query_type: str or ~$(python-base-namespace).v2018_04_16.models.QueryType + :paramtype query_type: str or ~azure.mgmt.monitor.v2018_04_16.models.QueryType """ super().__init__(**kwargs) self.query = query @@ -720,12 +716,11 @@ class TriggerCondition(_serialization.Model): :ivar threshold_operator: Evaluation operation for rule - 'GreaterThan' or 'LessThan. Known values are: "GreaterThanOrEqual", "LessThanOrEqual", "GreaterThan", "LessThan", and "Equal". - :vartype threshold_operator: str or - ~$(python-base-namespace).v2018_04_16.models.ConditionalOperator + :vartype threshold_operator: str or ~azure.mgmt.monitor.v2018_04_16.models.ConditionalOperator :ivar threshold: Result or count threshold based on which rule should be triggered. Required. :vartype threshold: float :ivar metric_trigger: Trigger condition for metric query rule. - :vartype metric_trigger: ~$(python-base-namespace).v2018_04_16.models.LogMetricTrigger + :vartype metric_trigger: ~azure.mgmt.monitor.v2018_04_16.models.LogMetricTrigger """ _validation = { @@ -751,12 +746,12 @@ def __init__( :keyword threshold_operator: Evaluation operation for rule - 'GreaterThan' or 'LessThan. Known values are: "GreaterThanOrEqual", "LessThanOrEqual", "GreaterThan", "LessThan", and "Equal". :paramtype threshold_operator: str or - ~$(python-base-namespace).v2018_04_16.models.ConditionalOperator + ~azure.mgmt.monitor.v2018_04_16.models.ConditionalOperator :keyword threshold: Result or count threshold based on which rule should be triggered. Required. :paramtype threshold: float :keyword metric_trigger: Trigger condition for metric query rule. - :paramtype metric_trigger: ~$(python-base-namespace).v2018_04_16.models.LogMetricTrigger + :paramtype metric_trigger: ~azure.mgmt.monitor.v2018_04_16.models.LogMetricTrigger """ super().__init__(**kwargs) self.threshold_operator = threshold_operator diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py index bf46feafb16d..6b70283f25a0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -81,7 +76,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -112,7 +107,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -146,7 +141,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -179,7 +174,7 @@ def build_list_by_subscription_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -209,7 +204,7 @@ def build_list_by_resource_group_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -243,7 +238,7 @@ class ScheduledQueryRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_04_16.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_04_16.MonitorManagementClient`'s :attr:`scheduled_query_rules` attribute. """ @@ -274,13 +269,13 @@ def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :type parameters: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -308,7 +303,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -329,13 +324,13 @@ def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a LogSearchRuleResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -349,7 +344,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) @@ -414,7 +409,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -428,7 +423,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -484,13 +479,13 @@ def update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to update. Required. - :type parameters: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResourcePatch + :type parameters: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -518,7 +513,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -539,13 +534,13 @@ def update( :type rule_name: str :param parameters: The parameters of the rule to update. Is either a LogSearchRuleResourcePatch type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResourcePatch or IO + :type parameters: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LogSearchRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource + :rtype: ~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -559,7 +554,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.LogSearchRuleResource] = kwargs.pop("cls", None) @@ -636,7 +631,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -683,13 +678,13 @@ def list_by_subscription( :return: An iterator like instance of either LogSearchRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -777,13 +772,13 @@ def list_by_resource_group( :return: An iterator like instance of either LogSearchRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_04_16.models.LogSearchRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_04_16.models.LogSearchRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-04-16"] = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-04-16")) cls: ClsType[_models.LogSearchRuleResourceCollection] = kwargs.pop("cls", None) error_map = { 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 75fb9a1e1263..31454ff2ef96 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-06-01-preview"] = kwargs.pop("api_version", "2018-06-01-preview") + api_version: str = kwargs.pop("api_version", "2018-06-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index e90209de0b95..33794da101b2 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_management_client.py @@ -28,10 +28,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar guest_diagnostics_settings_association: GuestDiagnosticsSettingsAssociationOperations operations :vartype guest_diagnostics_settings_association: - $(python-base-namespace).v2018_06_01_preview.operations.GuestDiagnosticsSettingsAssociationOperations + azure.mgmt.monitor.v2018_06_01_preview.operations.GuestDiagnosticsSettingsAssociationOperations :ivar guest_diagnostics_settings: GuestDiagnosticsSettingsOperations operations :vartype guest_diagnostics_settings: - $(python-base-namespace).v2018_06_01_preview.operations.GuestDiagnosticsSettingsOperations + azure.mgmt.monitor.v2018_06_01_preview.operations.GuestDiagnosticsSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 0b8eb8e469be..44fe163ef869 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-06-01-preview"] = kwargs.pop("api_version", "2018-06-01-preview") + api_version: str = kwargs.pop("api_version", "2018-06-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 3c3a6417f7ba..c395f083fff5 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_management_client.py @@ -28,10 +28,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar guest_diagnostics_settings_association: GuestDiagnosticsSettingsAssociationOperations operations :vartype guest_diagnostics_settings_association: - $(python-base-namespace).v2018_06_01_preview.aio.operations.GuestDiagnosticsSettingsAssociationOperations + azure.mgmt.monitor.v2018_06_01_preview.aio.operations.GuestDiagnosticsSettingsAssociationOperations :ivar guest_diagnostics_settings: GuestDiagnosticsSettingsOperations operations :vartype guest_diagnostics_settings: - $(python-base-namespace).v2018_06_01_preview.aio.operations.GuestDiagnosticsSettingsOperations + azure.mgmt.monitor.v2018_06_01_preview.aio.operations.GuestDiagnosticsSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py index d44b6980674c..26aa8584c5dd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class GuestDiagnosticsSettingsAssociationOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_06_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_06_01_preview.aio.MonitorManagementClient`'s :attr:`guest_diagnostics_settings_association` attribute. """ @@ -85,14 +80,14 @@ async def create_or_update( :param diagnostic_settings_association: The diagnostic settings association to create or update. Required. :type diagnostic_settings_association: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -122,7 +117,7 @@ async def create_or_update( :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -144,15 +139,14 @@ async def create_or_update( :param diagnostic_settings_association: The diagnostic settings association to create or update. Is either a GuestDiagnosticSettingsAssociationResource type or a IO type. Required. :type diagnostic_settings_association: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource - or IO + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -166,9 +160,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) @@ -235,7 +227,7 @@ async def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -249,9 +241,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) request = build_get_request( @@ -315,9 +305,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -370,14 +358,14 @@ async def update( :type association_name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResourcePatch + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -407,7 +395,7 @@ async def update( :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -430,7 +418,7 @@ async def update( :param parameters: Parameters supplied to the operation. Is either a GuestDiagnosticSettingsAssociationResourcePatch type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResourcePatch + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -438,7 +426,7 @@ async def update( :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -452,9 +440,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) @@ -511,15 +497,13 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.GuestDiagnosticSettingsA :return: An iterator like instance of either GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationList] = kwargs.pop("cls", None) error_map = { @@ -603,15 +587,13 @@ def list_by_resource_group( :return: An iterator like instance of either GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py index 7482cf10af51..8096714e84e2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class GuestDiagnosticsSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_06_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_06_01_preview.aio.MonitorManagementClient`'s :attr:`guest_diagnostics_settings` attribute. """ @@ -84,13 +79,13 @@ async def create_or_update( :type diagnostic_settings_name: str :param diagnostic_settings: The configuration to create or update. Required. :type diagnostic_settings: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -118,7 +113,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -140,13 +135,13 @@ async def create_or_update( :param diagnostic_settings: The configuration to create or update. Is either a GuestDiagnosticSettingsResource type or a IO type. Required. :type diagnostic_settings: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource or IO + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -160,9 +155,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -229,7 +222,7 @@ async def get( :type diagnostic_settings_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -243,9 +236,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -302,13 +293,13 @@ async def update( :type diagnostic_settings_name: str :param parameters: The configuration to patch. Required. :type parameters: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsPatchResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsPatchResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -336,7 +327,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -358,13 +349,13 @@ async def update( :param parameters: The configuration to patch. Is either a GuestDiagnosticSettingsPatchResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsPatchResource or IO + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsPatchResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -378,9 +369,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -461,9 +450,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -505,15 +492,13 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.GuestDiagnosticSettingsR :return: An iterator like instance of either GuestDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsList] = kwargs.pop("cls", None) error_map = { @@ -595,15 +580,13 @@ def list_by_resource_group( :return: An iterator like instance of either GuestDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsList] = kwargs.pop("cls", None) error_map = { 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 2df05d2b8700..afe945cc42d1 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 @@ -24,12 +24,11 @@ class DataSource(_serialization.Model): :ivar kind: Datasource kind. Required. Known values are: "PerformanceCounter", "ETWProviders", and "WindowsEventLogs". - :vartype kind: str or ~$(python-base-namespace).v2018_06_01_preview.models.DataSourceKind + :vartype kind: str or ~azure.mgmt.monitor.v2018_06_01_preview.models.DataSourceKind :ivar configuration: Required. - :vartype configuration: - ~$(python-base-namespace).v2018_06_01_preview.models.DataSourceConfiguration + :vartype configuration: ~azure.mgmt.monitor.v2018_06_01_preview.models.DataSourceConfiguration :ivar sinks: Required. - :vartype sinks: list[~$(python-base-namespace).v2018_06_01_preview.models.SinkConfiguration] + :vartype sinks: list[~azure.mgmt.monitor.v2018_06_01_preview.models.SinkConfiguration] """ _validation = { @@ -55,12 +54,12 @@ def __init__( """ :keyword kind: Datasource kind. Required. Known values are: "PerformanceCounter", "ETWProviders", and "WindowsEventLogs". - :paramtype kind: str or ~$(python-base-namespace).v2018_06_01_preview.models.DataSourceKind + :paramtype kind: str or ~azure.mgmt.monitor.v2018_06_01_preview.models.DataSourceKind :keyword configuration: Required. :paramtype configuration: - ~$(python-base-namespace).v2018_06_01_preview.models.DataSourceConfiguration + ~azure.mgmt.monitor.v2018_06_01_preview.models.DataSourceConfiguration :keyword sinks: Required. - :paramtype sinks: list[~$(python-base-namespace).v2018_06_01_preview.models.SinkConfiguration] + :paramtype sinks: list[~azure.mgmt.monitor.v2018_06_01_preview.models.SinkConfiguration] """ super().__init__(**kwargs) self.kind = kind @@ -73,13 +72,12 @@ class DataSourceConfiguration(_serialization.Model): :ivar providers: ETW providers configuration. :vartype providers: - list[~$(python-base-namespace).v2018_06_01_preview.models.EtwProviderConfiguration] + list[~azure.mgmt.monitor.v2018_06_01_preview.models.EtwProviderConfiguration] :ivar perf_counters: Performance counter configuration. :vartype perf_counters: - list[~$(python-base-namespace).v2018_06_01_preview.models.PerformanceCounterConfiguration] + list[~azure.mgmt.monitor.v2018_06_01_preview.models.PerformanceCounterConfiguration] :ivar event_logs: Windows event logs configuration. - :vartype event_logs: - list[~$(python-base-namespace).v2018_06_01_preview.models.EventLogConfiguration] + :vartype event_logs: list[~azure.mgmt.monitor.v2018_06_01_preview.models.EventLogConfiguration] """ _attribute_map = { @@ -99,13 +97,13 @@ def __init__( """ :keyword providers: ETW providers configuration. :paramtype providers: - list[~$(python-base-namespace).v2018_06_01_preview.models.EtwProviderConfiguration] + list[~azure.mgmt.monitor.v2018_06_01_preview.models.EtwProviderConfiguration] :keyword perf_counters: Performance counter configuration. :paramtype perf_counters: - list[~$(python-base-namespace).v2018_06_01_preview.models.PerformanceCounterConfiguration] + list[~azure.mgmt.monitor.v2018_06_01_preview.models.PerformanceCounterConfiguration] :keyword event_logs: Windows event logs configuration. :paramtype event_logs: - list[~$(python-base-namespace).v2018_06_01_preview.models.EventLogConfiguration] + list[~azure.mgmt.monitor.v2018_06_01_preview.models.EventLogConfiguration] """ super().__init__(**kwargs) self.providers = providers @@ -193,8 +191,7 @@ class EtwProviderConfiguration(_serialization.Model): :ivar id: Required. :vartype id: str :ivar events: Required. - :vartype events: - list[~$(python-base-namespace).v2018_06_01_preview.models.EtwEventConfiguration] + :vartype events: list[~azure.mgmt.monitor.v2018_06_01_preview.models.EtwEventConfiguration] """ _validation = { @@ -218,8 +215,7 @@ def __init__( :keyword id: Required. :paramtype id: str :keyword events: Required. - :paramtype events: - list[~$(python-base-namespace).v2018_06_01_preview.models.EtwEventConfiguration] + :paramtype events: list[~azure.mgmt.monitor.v2018_06_01_preview.models.EtwEventConfiguration] """ super().__init__(**kwargs) self.id = id @@ -265,7 +261,7 @@ class GuestDiagnosticSettingsAssociationList(_serialization.Model): :ivar value: The list of guest diagnostic settings association. :vartype value: - list[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] + list[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -285,7 +281,7 @@ def __init__( """ :keyword value: The list of guest diagnostic settings association. :paramtype value: - list[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] + list[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -438,7 +434,7 @@ class GuestDiagnosticSettingsList(_serialization.Model): :ivar value: The list of guest diagnostic settings. :vartype value: - list[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -458,7 +454,7 @@ def __init__( """ :keyword value: The list of guest diagnostic settings. :paramtype value: - list[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -475,10 +471,10 @@ class GuestDiagnosticSettingsPatchResource(_serialization.Model): :ivar os_type: Operating system type for the configuration. Known values are: "Windows" and "Linux". :vartype os_type: str or - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsOsType :ivar data_sources: the array of data source object which are configured to collect and send data. - :vartype data_sources: list[~$(python-base-namespace).v2018_06_01_preview.models.DataSource] + :vartype data_sources: list[~azure.mgmt.monitor.v2018_06_01_preview.models.DataSource] :ivar proxy_setting: :vartype proxy_setting: str """ @@ -505,10 +501,10 @@ def __init__( :keyword os_type: Operating system type for the configuration. Known values are: "Windows" and "Linux". :paramtype os_type: str or - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsOsType :keyword data_sources: the array of data source object which are configured to collect and send data. - :paramtype data_sources: list[~$(python-base-namespace).v2018_06_01_preview.models.DataSource] + :paramtype data_sources: list[~azure.mgmt.monitor.v2018_06_01_preview.models.DataSource] :keyword proxy_setting: :paramtype proxy_setting: str """ @@ -539,10 +535,10 @@ class GuestDiagnosticSettingsResource(Resource): :ivar os_type: Operating system type for the configuration. Known values are: "Windows" and "Linux". :vartype os_type: str or - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsOsType :ivar data_sources: the array of data source object which are configured to collect and send data. - :vartype data_sources: list[~$(python-base-namespace).v2018_06_01_preview.models.DataSource] + :vartype data_sources: list[~azure.mgmt.monitor.v2018_06_01_preview.models.DataSource] :ivar proxy_setting: :vartype proxy_setting: str """ @@ -583,10 +579,10 @@ def __init__( :keyword os_type: Operating system type for the configuration. Known values are: "Windows" and "Linux". :paramtype os_type: str or - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsOsType :keyword data_sources: the array of data source object which are configured to collect and send data. - :paramtype data_sources: list[~$(python-base-namespace).v2018_06_01_preview.models.DataSource] + :paramtype data_sources: list[~azure.mgmt.monitor.v2018_06_01_preview.models.DataSource] :keyword proxy_setting: :paramtype proxy_setting: str """ @@ -641,8 +637,7 @@ class SinkConfiguration(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar kind: Required. Known values are: "EventHub", "ApplicationInsights", and "LogAnalytics". - :vartype kind: str or - ~$(python-base-namespace).v2018_06_01_preview.models.SinkConfigurationKind + :vartype kind: str or ~azure.mgmt.monitor.v2018_06_01_preview.models.SinkConfigurationKind """ _validation = { @@ -657,8 +652,7 @@ def __init__(self, *, kind: Union[str, "_models.SinkConfigurationKind"], **kwarg """ :keyword kind: Required. Known values are: "EventHub", "ApplicationInsights", and "LogAnalytics". - :paramtype kind: str or - ~$(python-base-namespace).v2018_06_01_preview.models.SinkConfigurationKind + :paramtype kind: str or ~azure.mgmt.monitor.v2018_06_01_preview.models.SinkConfigurationKind """ super().__init__(**kwargs) self.kind = kind diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py index b2121d6ea0dd..ca480b1c92cd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_create_or_update_request(resource_uri: str, association_name: str, **k _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -78,9 +71,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -108,9 +99,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,9 +127,7 @@ def build_update_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -171,9 +158,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -200,9 +185,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -234,7 +217,7 @@ class GuestDiagnosticsSettingsAssociationOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_06_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_06_01_preview.MonitorManagementClient`'s :attr:`guest_diagnostics_settings_association` attribute. """ @@ -267,14 +250,14 @@ def create_or_update( :param diagnostic_settings_association: The diagnostic settings association to create or update. Required. :type diagnostic_settings_association: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -304,7 +287,7 @@ def create_or_update( :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -326,15 +309,14 @@ def create_or_update( :param diagnostic_settings_association: The diagnostic settings association to create or update. Is either a GuestDiagnosticSettingsAssociationResource type or a IO type. Required. :type diagnostic_settings_association: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource - or IO + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -348,9 +330,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) @@ -417,7 +397,7 @@ def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -431,9 +411,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) request = build_get_request( @@ -497,9 +475,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -552,14 +528,14 @@ def update( :type association_name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResourcePatch + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -589,7 +565,7 @@ def update( :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -612,7 +588,7 @@ def update( :param parameters: Parameters supplied to the operation. Is either a GuestDiagnosticSettingsAssociationResourcePatch type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResourcePatch + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -620,7 +596,7 @@ def update( :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -634,9 +610,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsAssociationResource] = kwargs.pop("cls", None) @@ -693,15 +667,13 @@ def list(self, **kwargs: Any) -> Iterable["_models.GuestDiagnosticSettingsAssoci :return: An iterator like instance of either GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationList] = kwargs.pop("cls", None) error_map = { @@ -785,15 +757,13 @@ def list_by_resource_group( :return: An iterator like instance of either GuestDiagnosticSettingsAssociationResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsAssociationList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py index 4cf54e4124c3..c27ec6eebc81 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,9 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -120,9 +111,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -158,9 +147,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -191,9 +178,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -219,9 +204,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -253,7 +236,7 @@ class GuestDiagnosticsSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_06_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_06_01_preview.MonitorManagementClient`'s :attr:`guest_diagnostics_settings` attribute. """ @@ -285,13 +268,13 @@ def create_or_update( :type diagnostic_settings_name: str :param diagnostic_settings: The configuration to create or update. Required. :type diagnostic_settings: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -319,7 +302,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -341,13 +324,13 @@ def create_or_update( :param diagnostic_settings: The configuration to create or update. Is either a GuestDiagnosticSettingsResource type or a IO type. Required. :type diagnostic_settings: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource or IO + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -361,9 +344,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -430,7 +411,7 @@ def get( :type diagnostic_settings_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -444,9 +425,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -503,13 +482,13 @@ def update( :type diagnostic_settings_name: str :param parameters: The configuration to patch. Required. :type parameters: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsPatchResource + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsPatchResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -537,7 +516,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -559,13 +538,13 @@ def update( :param parameters: The configuration to patch. Is either a GuestDiagnosticSettingsPatchResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsPatchResource or IO + ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsPatchResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestDiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -579,9 +558,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.GuestDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -662,9 +639,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -706,15 +681,13 @@ def list(self, **kwargs: Any) -> Iterable["_models.GuestDiagnosticSettingsResour :return: An iterator like instance of either GuestDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsList] = kwargs.pop("cls", None) error_map = { @@ -796,15 +769,13 @@ def list_by_resource_group( :return: An iterator like instance of either GuestDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_06_01_preview.models.GuestDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-06-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-06-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-06-01-preview")) cls: ClsType[_models.GuestDiagnosticSettingsList] = kwargs.pop("cls", None) error_map = { 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 edf7a4b51562..20fa7a982473 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", "2018-09-01") + api_version: str = kwargs.pop("api_version", "2018-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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 index 37e472f89ea2..b3a942c1f3a3 100644 --- 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 @@ -26,9 +26,9 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2018_09_01.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2018_09_01.operations.ActionGroupsOperations :ivar baselines: BaselinesOperations operations - :vartype baselines: $(python-base-namespace).v2018_09_01.operations.BaselinesOperations + :vartype baselines: azure.mgmt.monitor.v2018_09_01.operations.BaselinesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 3fc8bf276302..a71fe19692e2 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", "2018-09-01") + api_version: str = kwargs.pop("api_version", "2018-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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 index 7a9352d28081..8046bc9f7c14 100644 --- 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 @@ -26,10 +26,9 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2018_09_01.aio.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2018_09_01.aio.operations.ActionGroupsOperations :ivar baselines: BaselinesOperations operations - :vartype baselines: $(python-base-namespace).v2018_09_01.aio.operations.BaselinesOperations + :vartype baselines: azure.mgmt.monitor.v2018_09_01.aio.operations.BaselinesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py index cbfe3c88d3d3..ab1e0bae3655 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_09_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_09_01.aio.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -84,13 +79,13 @@ async def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -118,7 +113,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -139,13 +134,13 @@ async def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -224,7 +219,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -355,13 +350,13 @@ async def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2018_09_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -389,7 +384,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -410,14 +405,13 @@ async def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2018_09_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -431,7 +425,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -488,13 +482,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_09_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -577,13 +571,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_09_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -674,7 +668,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2018_09_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2018_09_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -731,7 +725,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2018_09_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2018_09_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -751,7 +745,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baselines_operations.py index 259c349bb8ea..5b11f1cba4f6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baselines_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._baselines_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ class BaselinesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_09_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_09_01.aio.MonitorManagementClient`'s :attr:`baselines` attribute. """ @@ -109,18 +104,18 @@ def list( :type filter: str :param result_type: Allows retrieving only metadata of the baseline. On data request all information is retrieved. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2018_09_01.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2018_09_01.models.ResultType :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SingleMetricBaseline or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2018_09_01.models.SingleMetricBaseline] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2018_09_01.models.SingleMetricBaseline] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.MetricBaselinesResponse] = kwargs.pop("cls", None) error_map = { 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 b2bf77ed165d..2b3dbebf8638 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 @@ -21,7 +21,7 @@ class ActionGroupList(_serialization.Model): """A list of action groups. :ivar value: The list of action groups. - :vartype value: list[~$(python-base-namespace).v2018_09_01.models.ActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -40,7 +40,7 @@ def __init__( ) -> None: """ :keyword value: The list of action groups. - :paramtype value: list[~$(python-base-namespace).v2018_09_01.models.ActionGroupResource] + :paramtype value: list[~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -149,33 +149,32 @@ class ActionGroupResource(Resource): # pylint: disable=too-many-instance-attrib enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2018_09_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2018_09_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2018_09_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2018_09_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2018_09_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2018_09_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2018_09_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2018_09_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2018_09_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2018_09_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2018_09_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2018_09_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2018_09_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.ArmRoleReceiver] """ _validation = { @@ -240,36 +239,33 @@ def __init__( enabled, then none of its receivers will receive communications. :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2018_09_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2018_09_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2018_09_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2018_09_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2018_09_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2018_09_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2018_09_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2018_09_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2018_09_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2018_09_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2018_09_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2018_09_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2018_09_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2018_09_01.models.ArmRoleReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name @@ -525,7 +521,7 @@ class EmailReceiver(_serialization.Model): :vartype email_address: str :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2018_09_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2018_09_01.models.ReceiverStatus """ _validation = { @@ -730,7 +726,7 @@ class MetricBaselinesResponse(_serialization.Model): :ivar namespace: The namespace of the metrics been queried. :vartype namespace: str :ivar value: The baseline for each time series that was queried. - :vartype value: list[~$(python-base-namespace).v2018_09_01.models.SingleMetricBaseline] + :vartype value: list[~azure.mgmt.monitor.v2018_09_01.models.SingleMetricBaseline] """ _validation = { @@ -766,7 +762,7 @@ def __init__( :keyword namespace: The namespace of the metrics been queried. :paramtype namespace: str :keyword value: The baseline for each time series that was queried. - :paramtype value: list[~$(python-base-namespace).v2018_09_01.models.SingleMetricBaseline] + :paramtype value: list[~azure.mgmt.monitor.v2018_09_01.models.SingleMetricBaseline] """ super().__init__(**kwargs) self.timespan = timespan @@ -815,7 +811,7 @@ class SingleBaseline(_serialization.Model): :ivar sensitivity: the sensitivity of the baseline. Required. Known values are: "Low", "Medium", and "High". - :vartype sensitivity: str or ~$(python-base-namespace).v2018_09_01.models.BaselineSensitivity + :vartype sensitivity: str or ~azure.mgmt.monitor.v2018_09_01.models.BaselineSensitivity :ivar low_thresholds: The low thresholds of the baseline. Required. :vartype low_thresholds: list[float] :ivar high_thresholds: The high thresholds of the baseline. Required. @@ -845,7 +841,7 @@ def __init__( """ :keyword sensitivity: the sensitivity of the baseline. Required. Known values are: "Low", "Medium", and "High". - :paramtype sensitivity: str or ~$(python-base-namespace).v2018_09_01.models.BaselineSensitivity + :paramtype sensitivity: str or ~azure.mgmt.monitor.v2018_09_01.models.BaselineSensitivity :keyword low_thresholds: The low thresholds of the baseline. Required. :paramtype low_thresholds: list[float] :keyword high_thresholds: The high thresholds of the baseline. Required. @@ -869,7 +865,7 @@ class SingleMetricBaseline(_serialization.Model): :ivar metric_name: The name of the metric for which the baselines were retrieved. Required. :vartype metric_name: str :ivar baselines: The baseline for each time series that was queried. Required. - :vartype baselines: list[~$(python-base-namespace).v2018_09_01.models.TimeSeriesBaseline] + :vartype baselines: list[~azure.mgmt.monitor.v2018_09_01.models.TimeSeriesBaseline] """ _validation = { @@ -903,7 +899,7 @@ def __init__( :keyword metric_name: The name of the metric for which the baselines were retrieved. Required. :paramtype metric_name: str :keyword baselines: The baseline for each time series that was queried. Required. - :paramtype baselines: list[~$(python-base-namespace).v2018_09_01.models.TimeSeriesBaseline] + :paramtype baselines: list[~azure.mgmt.monitor.v2018_09_01.models.TimeSeriesBaseline] """ super().__init__(**kwargs) self.id = id @@ -928,7 +924,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2018_09_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2018_09_01.models.ReceiverStatus """ _validation = { @@ -970,13 +966,13 @@ class TimeSeriesBaseline(_serialization.Model): :ivar aggregation: The aggregation type of the metric. Required. :vartype aggregation: str :ivar dimensions: The dimensions of this time series. - :vartype dimensions: list[~$(python-base-namespace).v2018_09_01.models.MetricSingleDimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2018_09_01.models.MetricSingleDimension] :ivar timestamps: The list of timestamps of the baselines. Required. :vartype timestamps: list[~datetime.datetime] :ivar data: The baseline values for each sensitivity. Required. - :vartype data: list[~$(python-base-namespace).v2018_09_01.models.SingleBaseline] + :vartype data: list[~azure.mgmt.monitor.v2018_09_01.models.SingleBaseline] :ivar metadata_values: The baseline metadata values. - :vartype metadata_values: list[~$(python-base-namespace).v2018_09_01.models.BaselineMetadata] + :vartype metadata_values: list[~azure.mgmt.monitor.v2018_09_01.models.BaselineMetadata] """ _validation = { @@ -1007,13 +1003,13 @@ def __init__( :keyword aggregation: The aggregation type of the metric. Required. :paramtype aggregation: str :keyword dimensions: The dimensions of this time series. - :paramtype dimensions: list[~$(python-base-namespace).v2018_09_01.models.MetricSingleDimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2018_09_01.models.MetricSingleDimension] :keyword timestamps: The list of timestamps of the baselines. Required. :paramtype timestamps: list[~datetime.datetime] :keyword data: The baseline values for each sensitivity. Required. - :paramtype data: list[~$(python-base-namespace).v2018_09_01.models.SingleBaseline] + :paramtype data: list[~azure.mgmt.monitor.v2018_09_01.models.SingleBaseline] :keyword metadata_values: The baseline metadata values. - :paramtype metadata_values: list[~$(python-base-namespace).v2018_09_01.models.BaselineMetadata] + :paramtype metadata_values: list[~azure.mgmt.monitor.v2018_09_01.models.BaselineMetadata] """ super().__init__(**kwargs) self.aggregation = aggregation diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py index ecb0905d938d..30b66925f7ef 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -275,7 +270,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_09_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_09_01.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -306,13 +301,13 @@ def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -340,7 +335,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -361,13 +356,13 @@ def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -446,7 +441,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -577,13 +572,13 @@ def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2018_09_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -611,7 +606,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -632,14 +627,13 @@ def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2018_09_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -653,7 +647,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -710,13 +704,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_09_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -799,13 +793,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_09_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_09_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -896,7 +890,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2018_09_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2018_09_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -953,7 +947,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2018_09_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2018_09_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -973,7 +967,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baselines_operations.py index 83ceb032c95b..ab54bcbbc1ea 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baselines_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union import urllib.parse @@ -31,10 +30,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -58,7 +53,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -100,7 +95,7 @@ class BaselinesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_09_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_09_01.MonitorManagementClient`'s :attr:`baselines` attribute. """ @@ -164,18 +159,18 @@ def list( :type filter: str :param result_type: Allows retrieving only metadata of the baseline. On data request all information is retrieved. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2018_09_01.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2018_09_01.models.ResultType :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SingleMetricBaseline or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2018_09_01.models.SingleMetricBaseline] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2018_09_01.models.SingleMetricBaseline] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-09-01")) cls: ClsType[_models.MetricBaselinesResponse] = kwargs.pop("cls", None) error_map = { 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 f6d57eb37c8c..14b202445968 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-11-27-preview"] = kwargs.pop("api_version", "2018-11-27-preview") + api_version: str = kwargs.pop("api_version", "2018-11-27-preview") 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/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_management_client.py index cb0b64080d9d..88d2d3d6ad3b 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_management_client.py @@ -26,8 +26,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar vm_insights: VMInsightsOperations operations - :vartype vm_insights: - $(python-base-namespace).v2018_11_27_preview.operations.VMInsightsOperations + :vartype vm_insights: azure.mgmt.monitor.v2018_11_27_preview.operations.VMInsightsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 f873a5ef6cdb..a36e7edf0602 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2018-11-27-preview"] = kwargs.pop("api_version", "2018-11-27-preview") + api_version: str = kwargs.pop("api_version", "2018-11-27-preview") 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_management_client.py index ce4330027835..1b4d87006e7f 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar vm_insights: VMInsightsOperations operations :vartype vm_insights: - $(python-base-namespace).v2018_11_27_preview.aio.operations.VMInsightsOperations + azure.mgmt.monitor.v2018_11_27_preview.aio.operations.VMInsightsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py index 8cbd90a61e6d..76e316d50cb4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._vm_insights_operations import build_get_onboarding_status_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class VMInsightsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_11_27_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_11_27_preview.aio.MonitorManagementClient`'s :attr:`vm_insights` attribute. """ @@ -64,7 +59,7 @@ async def get_onboarding_status(self, resource_uri: str, **kwargs: Any) -> _mode :type resource_uri: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VMInsightsOnboardingStatus or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_11_27_preview.models.VMInsightsOnboardingStatus + :rtype: ~azure.mgmt.monitor.v2018_11_27_preview.models.VMInsightsOnboardingStatus :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -78,9 +73,7 @@ async def get_onboarding_status(self, resource_uri: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-11-27-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-11-27-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-11-27-preview")) cls: ClsType[_models.VMInsightsOnboardingStatus] = kwargs.pop("cls", None) request = build_get_onboarding_status_request( 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 0fb4da2b30d1..e3eac8d03fea 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 @@ -22,7 +22,7 @@ class DataContainer(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar workspace: Log Analytics workspace information. Required. - :vartype workspace: ~$(python-base-namespace).v2018_11_27_preview.models.WorkspaceInfo + :vartype workspace: ~azure.mgmt.monitor.v2018_11_27_preview.models.WorkspaceInfo """ _validation = { @@ -36,7 +36,7 @@ class DataContainer(_serialization.Model): def __init__(self, *, workspace: "_models.WorkspaceInfo", **kwargs: Any) -> None: """ :keyword workspace: Log Analytics workspace information. Required. - :paramtype workspace: ~$(python-base-namespace).v2018_11_27_preview.models.WorkspaceInfo + :paramtype workspace: ~azure.mgmt.monitor.v2018_11_27_preview.models.WorkspaceInfo """ super().__init__(**kwargs) self.workspace = workspace @@ -113,7 +113,7 @@ class ResponseWithError(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar error: Error information. Required. - :vartype error: ~$(python-base-namespace).v2018_11_27_preview.models.Error + :vartype error: ~azure.mgmt.monitor.v2018_11_27_preview.models.Error """ _validation = { @@ -127,7 +127,7 @@ class ResponseWithError(_serialization.Model): def __init__(self, *, error: "_models.Error", **kwargs: Any) -> None: """ :keyword error: Error information. Required. - :paramtype error: ~$(python-base-namespace).v2018_11_27_preview.models.Error + :paramtype error: ~azure.mgmt.monitor.v2018_11_27_preview.models.Error """ super().__init__(**kwargs) self.error = error @@ -151,13 +151,13 @@ class VMInsightsOnboardingStatus(ProxyResource): scope, e.g., resource group or subscription, is considered onboarded if at least one resource under it is onboarded. Known values are: "onboarded", "notOnboarded", and "unknown". :vartype onboarding_status: str or - ~$(python-base-namespace).v2018_11_27_preview.models.OnboardingStatus + ~azure.mgmt.monitor.v2018_11_27_preview.models.OnboardingStatus :ivar data_status: The status of VM Insights data from the resource. When reported as ``present`` the data array will contain information about the data containers to which data for the specified resource is being routed. Known values are: "present" and "notPresent". - :vartype data_status: str or ~$(python-base-namespace).v2018_11_27_preview.models.DataStatus + :vartype data_status: str or ~azure.mgmt.monitor.v2018_11_27_preview.models.DataStatus :ivar data: Containers that currently store VM Insights data for the specified resource. - :vartype data: list[~$(python-base-namespace).v2018_11_27_preview.models.DataContainer] + :vartype data: list[~azure.mgmt.monitor.v2018_11_27_preview.models.DataContainer] """ _validation = { @@ -193,13 +193,13 @@ def __init__( scope, e.g., resource group or subscription, is considered onboarded if at least one resource under it is onboarded. Known values are: "onboarded", "notOnboarded", and "unknown". :paramtype onboarding_status: str or - ~$(python-base-namespace).v2018_11_27_preview.models.OnboardingStatus + ~azure.mgmt.monitor.v2018_11_27_preview.models.OnboardingStatus :keyword data_status: The status of VM Insights data from the resource. When reported as ``present`` the data array will contain information about the data containers to which data for the specified resource is being routed. Known values are: "present" and "notPresent". - :paramtype data_status: str or ~$(python-base-namespace).v2018_11_27_preview.models.DataStatus + :paramtype data_status: str or ~azure.mgmt.monitor.v2018_11_27_preview.models.DataStatus :keyword data: Containers that currently store VM Insights data for the specified resource. - :paramtype data: list[~$(python-base-namespace).v2018_11_27_preview.models.DataContainer] + :paramtype data: list[~azure.mgmt.monitor.v2018_11_27_preview.models.DataContainer] """ super().__init__(**kwargs) self.resource_id = resource_id diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py index 97fbdf52e545..acf14093a9bb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,9 +38,7 @@ def build_get_onboarding_status_request(resource_uri: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-11-27-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-11-27-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-11-27-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,7 +66,7 @@ class VMInsightsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2018_11_27_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2018_11_27_preview.MonitorManagementClient`'s :attr:`vm_insights` attribute. """ @@ -95,7 +88,7 @@ def get_onboarding_status(self, resource_uri: str, **kwargs: Any) -> _models.VMI :type resource_uri: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VMInsightsOnboardingStatus or the result of cls(response) - :rtype: ~$(python-base-namespace).v2018_11_27_preview.models.VMInsightsOnboardingStatus + :rtype: ~azure.mgmt.monitor.v2018_11_27_preview.models.VMInsightsOnboardingStatus :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -109,9 +102,7 @@ def get_onboarding_status(self, resource_uri: str, **kwargs: Any) -> _models.VMI _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2018-11-27-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2018-11-27-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2018-11-27-preview")) cls: ClsType[_models.VMInsightsOnboardingStatus] = kwargs.pop("cls", None) request = build_get_onboarding_status_request( 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 ed8c0533d9be..0e809d339236 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", "2019-03-01") + api_version: str = kwargs.pop("api_version", "2019-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index b059b7f5663b..f2e87fc4aa8f 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_management_client.py @@ -26,9 +26,9 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2019_03_01.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2019_03_01.operations.ActionGroupsOperations :ivar baselines: BaselinesOperations operations - :vartype baselines: $(python-base-namespace).v2019_03_01.operations.BaselinesOperations + :vartype baselines: azure.mgmt.monitor.v2019_03_01.operations.BaselinesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 22f44870cc99..62614c9a0551 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", "2019-03-01") + api_version: str = kwargs.pop("api_version", "2019-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index c887317e5143..362ffeb00568 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_management_client.py @@ -26,10 +26,9 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2019_03_01.aio.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2019_03_01.aio.operations.ActionGroupsOperations :ivar baselines: BaselinesOperations operations - :vartype baselines: $(python-base-namespace).v2019_03_01.aio.operations.BaselinesOperations + :vartype baselines: azure.mgmt.monitor.v2019_03_01.aio.operations.BaselinesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py index 7b88b5d4ac72..6ae5cced3975 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_03_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_03_01.aio.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -84,13 +79,13 @@ async def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -118,7 +113,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -139,13 +134,13 @@ async def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -224,7 +219,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -355,13 +350,13 @@ async def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2019_03_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -389,7 +384,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -410,14 +405,13 @@ async def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2019_03_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -431,7 +425,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -488,13 +482,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_03_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -577,13 +571,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_03_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -674,7 +668,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2019_03_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2019_03_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -731,7 +725,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2019_03_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2019_03_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -751,7 +745,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py index c37176004dee..abda0768b7b3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._baselines_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ class BaselinesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_03_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_03_01.aio.MonitorManagementClient`'s :attr:`baselines` attribute. """ @@ -109,18 +104,18 @@ def list( :type filter: str :param result_type: Allows retrieving only metadata of the baseline. On data request all information is retrieved. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2019_03_01.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2019_03_01.models.ResultType :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SingleMetricBaseline or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_03_01.models.SingleMetricBaseline] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_03_01.models.SingleMetricBaseline] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.MetricBaselinesResponse] = kwargs.pop("cls", None) error_map = { 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 a79714ab451a..79e3bcc35e06 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 @@ -21,7 +21,7 @@ class ActionGroupList(_serialization.Model): """A list of action groups. :ivar value: The list of action groups. - :vartype value: list[~$(python-base-namespace).v2019_03_01.models.ActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -40,7 +40,7 @@ def __init__( ) -> None: """ :keyword value: The list of action groups. - :paramtype value: list[~$(python-base-namespace).v2019_03_01.models.ActionGroupResource] + :paramtype value: list[~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -149,33 +149,32 @@ class ActionGroupResource(AzureResource): # pylint: disable=too-many-instance-a enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2019_03_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2019_03_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2019_03_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2019_03_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2019_03_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2019_03_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2019_03_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2019_03_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2019_03_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2019_03_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2019_03_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2019_03_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2019_03_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.ArmRoleReceiver] """ _validation = { @@ -240,36 +239,33 @@ def __init__( enabled, then none of its receivers will receive communications. :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2019_03_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2019_03_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2019_03_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2019_03_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2019_03_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2019_03_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2019_03_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2019_03_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2019_03_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2019_03_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2019_03_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2019_03_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2019_03_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2019_03_01.models.ArmRoleReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name @@ -553,7 +549,7 @@ class EmailReceiver(_serialization.Model): :vartype use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2019_03_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2019_03_01.models.ReceiverStatus """ _validation = { @@ -758,7 +754,7 @@ class MetricBaselinesResponse(_serialization.Model): """A list of metric baselines. :ivar value: The list of metric baselines. - :vartype value: list[~$(python-base-namespace).v2019_03_01.models.SingleMetricBaseline] + :vartype value: list[~azure.mgmt.monitor.v2019_03_01.models.SingleMetricBaseline] """ _attribute_map = { @@ -768,7 +764,7 @@ class MetricBaselinesResponse(_serialization.Model): def __init__(self, *, value: Optional[List["_models.SingleMetricBaseline"]] = None, **kwargs: Any) -> None: """ :keyword value: The list of metric baselines. - :paramtype value: list[~$(python-base-namespace).v2019_03_01.models.SingleMetricBaseline] + :paramtype value: list[~azure.mgmt.monitor.v2019_03_01.models.SingleMetricBaseline] """ super().__init__(**kwargs) self.value = value @@ -814,7 +810,7 @@ class SingleBaseline(_serialization.Model): :ivar sensitivity: the sensitivity of the baseline. Required. Known values are: "Low", "Medium", and "High". - :vartype sensitivity: str or ~$(python-base-namespace).v2019_03_01.models.BaselineSensitivity + :vartype sensitivity: str or ~azure.mgmt.monitor.v2019_03_01.models.BaselineSensitivity :ivar low_thresholds: The low thresholds of the baseline. Required. :vartype low_thresholds: list[float] :ivar high_thresholds: The high thresholds of the baseline. Required. @@ -844,7 +840,7 @@ def __init__( """ :keyword sensitivity: the sensitivity of the baseline. Required. Known values are: "Low", "Medium", and "High". - :paramtype sensitivity: str or ~$(python-base-namespace).v2019_03_01.models.BaselineSensitivity + :paramtype sensitivity: str or ~azure.mgmt.monitor.v2019_03_01.models.BaselineSensitivity :keyword low_thresholds: The low thresholds of the baseline. Required. :paramtype low_thresholds: list[float] :keyword high_thresholds: The high thresholds of the baseline. Required. @@ -878,7 +874,7 @@ class SingleMetricBaseline(_serialization.Model): :ivar namespace: The namespace of the metrics been queried. :vartype namespace: str :ivar baselines: The baseline for each time series that was queried. Required. - :vartype baselines: list[~$(python-base-namespace).v2019_03_01.models.TimeSeriesBaseline] + :vartype baselines: list[~azure.mgmt.monitor.v2019_03_01.models.TimeSeriesBaseline] """ _validation = { @@ -930,7 +926,7 @@ def __init__( :keyword namespace: The namespace of the metrics been queried. :paramtype namespace: str :keyword baselines: The baseline for each time series that was queried. Required. - :paramtype baselines: list[~$(python-base-namespace).v2019_03_01.models.TimeSeriesBaseline] + :paramtype baselines: list[~azure.mgmt.monitor.v2019_03_01.models.TimeSeriesBaseline] """ super().__init__(**kwargs) self.id = id @@ -958,7 +954,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2019_03_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2019_03_01.models.ReceiverStatus """ _validation = { @@ -1000,13 +996,13 @@ class TimeSeriesBaseline(_serialization.Model): :ivar aggregation: The aggregation type of the metric. Required. :vartype aggregation: str :ivar dimensions: The dimensions of this time series. - :vartype dimensions: list[~$(python-base-namespace).v2019_03_01.models.MetricSingleDimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2019_03_01.models.MetricSingleDimension] :ivar timestamps: The list of timestamps of the baselines. Required. :vartype timestamps: list[~datetime.datetime] :ivar data: The baseline values for each sensitivity. Required. - :vartype data: list[~$(python-base-namespace).v2019_03_01.models.SingleBaseline] + :vartype data: list[~azure.mgmt.monitor.v2019_03_01.models.SingleBaseline] :ivar metadata_values: The baseline metadata values. - :vartype metadata_values: list[~$(python-base-namespace).v2019_03_01.models.BaselineMetadata] + :vartype metadata_values: list[~azure.mgmt.monitor.v2019_03_01.models.BaselineMetadata] """ _validation = { @@ -1037,13 +1033,13 @@ def __init__( :keyword aggregation: The aggregation type of the metric. Required. :paramtype aggregation: str :keyword dimensions: The dimensions of this time series. - :paramtype dimensions: list[~$(python-base-namespace).v2019_03_01.models.MetricSingleDimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2019_03_01.models.MetricSingleDimension] :keyword timestamps: The list of timestamps of the baselines. Required. :paramtype timestamps: list[~datetime.datetime] :keyword data: The baseline values for each sensitivity. Required. - :paramtype data: list[~$(python-base-namespace).v2019_03_01.models.SingleBaseline] + :paramtype data: list[~azure.mgmt.monitor.v2019_03_01.models.SingleBaseline] :keyword metadata_values: The baseline metadata values. - :paramtype metadata_values: list[~$(python-base-namespace).v2019_03_01.models.BaselineMetadata] + :paramtype metadata_values: list[~azure.mgmt.monitor.v2019_03_01.models.BaselineMetadata] """ super().__init__(**kwargs) self.aggregation = aggregation diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py index 64f75d46da9d..1d0be57f94be 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -275,7 +270,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_03_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_03_01.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -306,13 +301,13 @@ def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -340,7 +335,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -361,13 +356,13 @@ def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -446,7 +441,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -577,13 +572,13 @@ def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2019_03_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -611,7 +606,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -632,14 +627,13 @@ def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2019_03_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_03_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -653,7 +647,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -710,13 +704,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_03_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -799,13 +793,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_03_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_03_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -896,7 +890,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2019_03_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2019_03_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -953,7 +947,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2019_03_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2019_03_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -973,7 +967,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py index 53cee4dabd37..126e2ba6d2b0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union import urllib.parse @@ -31,10 +30,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -58,7 +53,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -100,7 +95,7 @@ class BaselinesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_03_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_03_01.MonitorManagementClient`'s :attr:`baselines` attribute. """ @@ -164,18 +159,18 @@ def list( :type filter: str :param result_type: Allows retrieving only metadata of the baseline. On data request all information is retrieved. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2019_03_01.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2019_03_01.models.ResultType :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SingleMetricBaseline or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_03_01.models.SingleMetricBaseline] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_03_01.models.SingleMetricBaseline] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-03-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-03-01")) cls: ClsType[_models.MetricBaselinesResponse] = kwargs.pop("cls", None) error_map = { 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 8839954d182d..dc401fa09a71 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", "2019-06-01") + api_version: str = kwargs.pop("api_version", "2019-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index 54524172cc84..5b40269f3683 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_management_client.py @@ -26,7 +26,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2019_06_01.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2019_06_01.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 43ad73d857c9..44ead2faf77d 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", "2019-06-01") + api_version: str = kwargs.pop("api_version", "2019-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 4a10a3aa0814..9b4f78b0ba81 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_management_client.py @@ -26,8 +26,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2019_06_01.aio.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2019_06_01.aio.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py index 657f6879fc1f..b3f157b37ce1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -39,10 +38,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -53,7 +48,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_06_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_06_01.aio.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -84,13 +79,13 @@ async def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -118,7 +113,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -139,13 +134,13 @@ async def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -159,7 +154,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -224,7 +219,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -238,7 +233,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -303,7 +298,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -355,13 +350,13 @@ async def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2019_06_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -389,7 +384,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -410,14 +405,13 @@ async def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2019_06_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -431,7 +425,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -488,13 +482,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_06_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -577,13 +571,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_06_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -674,7 +668,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2019_06_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2019_06_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -731,7 +725,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2019_06_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2019_06_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -751,7 +745,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models_py3.py index 0d67186423bd..2f5b964326a2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models_py3.py @@ -20,7 +20,7 @@ class ActionGroupList(_serialization.Model): """A list of action groups. :ivar value: The list of action groups. - :vartype value: list[~$(python-base-namespace).v2019_06_01.models.ActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -39,7 +39,7 @@ def __init__( ) -> None: """ :keyword value: The list of action groups. - :paramtype value: list[~$(python-base-namespace).v2019_06_01.models.ActionGroupResource] + :paramtype value: list[~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -148,33 +148,32 @@ class ActionGroupResource(AzureResource): # pylint: disable=too-many-instance-a enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2019_06_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2019_06_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2019_06_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2019_06_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2019_06_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2019_06_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2019_06_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2019_06_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2019_06_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2019_06_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2019_06_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2019_06_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2019_06_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.ArmRoleReceiver] """ _validation = { @@ -239,36 +238,33 @@ def __init__( enabled, then none of its receivers will receive communications. :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2019_06_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2019_06_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2019_06_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2019_06_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2019_06_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2019_06_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2019_06_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2019_06_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2019_06_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2019_06_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2019_06_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2019_06_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2019_06_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2019_06_01.models.ArmRoleReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name @@ -519,7 +515,7 @@ class EmailReceiver(_serialization.Model): :vartype use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2019_06_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2019_06_01.models.ReceiverStatus """ _validation = { @@ -736,7 +732,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2019_06_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2019_06_01.models.ReceiverStatus """ _validation = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py index 1e1c4d738e9c..0fdbc97491bb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -275,7 +270,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_06_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_06_01.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -306,13 +301,13 @@ def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -340,7 +335,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -361,13 +356,13 @@ def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -381,7 +376,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -446,7 +441,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -460,7 +455,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -525,7 +520,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -577,13 +572,13 @@ def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2019_06_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -611,7 +606,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -632,14 +627,13 @@ def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2019_06_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -653,7 +647,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -710,13 +704,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_06_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -799,13 +793,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_06_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_06_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -896,7 +890,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2019_06_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2019_06_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -953,7 +947,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2019_06_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2019_06_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -973,7 +967,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) 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 629cf210dc21..7b27cbdf9da5 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-10-17-preview"] = kwargs.pop("api_version", "2019-10-17-preview") + api_version: str = kwargs.pop("api_version", "2019-10-17-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index 31175f03d218..93b667d3b1e3 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_management_client.py @@ -33,19 +33,19 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar private_link_scopes: PrivateLinkScopesOperations operations :vartype private_link_scopes: - $(python-base-namespace).v2019_10_17.operations.PrivateLinkScopesOperations + azure.mgmt.monitor.v2019_10_17.operations.PrivateLinkScopesOperations :ivar private_link_scope_operation_status: PrivateLinkScopeOperationStatusOperations operations :vartype private_link_scope_operation_status: - $(python-base-namespace).v2019_10_17.operations.PrivateLinkScopeOperationStatusOperations + azure.mgmt.monitor.v2019_10_17.operations.PrivateLinkScopeOperationStatusOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: - $(python-base-namespace).v2019_10_17.operations.PrivateLinkResourcesOperations + azure.mgmt.monitor.v2019_10_17.operations.PrivateLinkResourcesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: - $(python-base-namespace).v2019_10_17.operations.PrivateEndpointConnectionsOperations + azure.mgmt.monitor.v2019_10_17.operations.PrivateEndpointConnectionsOperations :ivar private_link_scoped_resources: PrivateLinkScopedResourcesOperations operations :vartype private_link_scoped_resources: - $(python-base-namespace).v2019_10_17.operations.PrivateLinkScopedResourcesOperations + azure.mgmt.monitor.v2019_10_17.operations.PrivateLinkScopedResourcesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 91e52467400f..fd98a3ea043d 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-10-17-preview"] = kwargs.pop("api_version", "2019-10-17-preview") + api_version: str = kwargs.pop("api_version", "2019-10-17-preview") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index cfa2b3b8bdde..22862094ca05 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_management_client.py @@ -33,19 +33,19 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar private_link_scopes: PrivateLinkScopesOperations operations :vartype private_link_scopes: - $(python-base-namespace).v2019_10_17.aio.operations.PrivateLinkScopesOperations + azure.mgmt.monitor.v2019_10_17.aio.operations.PrivateLinkScopesOperations :ivar private_link_scope_operation_status: PrivateLinkScopeOperationStatusOperations operations :vartype private_link_scope_operation_status: - $(python-base-namespace).v2019_10_17.aio.operations.PrivateLinkScopeOperationStatusOperations + azure.mgmt.monitor.v2019_10_17.aio.operations.PrivateLinkScopeOperationStatusOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: - $(python-base-namespace).v2019_10_17.aio.operations.PrivateLinkResourcesOperations + azure.mgmt.monitor.v2019_10_17.aio.operations.PrivateLinkResourcesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: - $(python-base-namespace).v2019_10_17.aio.operations.PrivateEndpointConnectionsOperations + azure.mgmt.monitor.v2019_10_17.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_scoped_resources: PrivateLinkScopedResourcesOperations operations :vartype private_link_scoped_resources: - $(python-base-namespace).v2019_10_17.aio.operations.PrivateLinkScopedResourcesOperations + azure.mgmt.monitor.v2019_10_17.aio.operations.PrivateLinkScopedResourcesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py index e414963530cd..4256bcd0373b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_private_link_scope_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class PrivateEndpointConnectionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.aio.MonitorManagementClient`'s :attr:`private_endpoint_connections` attribute. """ @@ -80,7 +75,7 @@ async def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -94,9 +89,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -153,9 +146,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -228,7 +219,7 @@ async def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Required. - :type parameters: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -243,7 +234,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -283,7 +274,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -306,7 +297,7 @@ async def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Is either a PrivateEndpointConnection type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection or IO + :type parameters: ~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -321,15 +312,13 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -389,9 +378,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -453,9 +440,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -511,15 +496,13 @@ def list_by_private_link_scope( :return: An iterator like instance of either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py index 2e89ac0060a2..a36b124e5166 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._private_link_resources_operations import build_get_request, build_list_by_private_link_scope_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ class PrivateLinkResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.aio.MonitorManagementClient`'s :attr:`private_link_resources` attribute. """ @@ -72,15 +67,13 @@ def list_by_private_link_scope( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateLinkResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_10_17.models.PrivateLinkResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_10_17.models.PrivateLinkResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -167,7 +160,7 @@ async def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.PrivateLinkResource + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -181,9 +174,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py index eb17c279dd5c..670fdc09b418 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._private_link_scope_operation_status_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class PrivateLinkScopeOperationStatusOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.aio.MonitorManagementClient`'s :attr:`private_link_scope_operation_status` attribute. """ @@ -67,7 +62,7 @@ async def get(self, async_operation_id: str, resource_group_name: str, **kwargs: :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationStatus or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.OperationStatus + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.OperationStatus :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -81,9 +76,7 @@ async def get(self, async_operation_id: str, resource_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py index 2fa35d04a468..66552cbfd75f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_private_link_scope_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class PrivateLinkScopedResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.aio.MonitorManagementClient`'s :attr:`private_link_scoped_resources` attribute. """ @@ -78,7 +73,7 @@ async def get(self, resource_group_name: str, scope_name: str, name: str, **kwar :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScopedResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.ScopedResource + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.ScopedResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -92,9 +87,7 @@ async def get(self, resource_group_name: str, scope_name: str, name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) request = build_get_request( @@ -151,9 +144,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ScopedResource]] = kwargs.pop("cls", None) @@ -229,7 +220,7 @@ async def begin_create_or_update( :param name: The name of the scoped resource object. Required. :type name: str :param parameters: Required. - :type parameters: ~$(python-base-namespace).v2019_10_17.models.ScopedResource + :type parameters: ~azure.mgmt.monitor.v2019_10_17.models.ScopedResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -244,7 +235,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either ScopedResource or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2019_10_17.models.ScopedResource] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2019_10_17.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -284,7 +275,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either ScopedResource or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2019_10_17.models.ScopedResource] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2019_10_17.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -307,7 +298,7 @@ async def begin_create_or_update( :param name: The name of the scoped resource object. Required. :type name: str :param parameters: Is either a ScopedResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2019_10_17.models.ScopedResource or IO + :type parameters: ~azure.mgmt.monitor.v2019_10_17.models.ScopedResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -322,15 +313,13 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either ScopedResource or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2019_10_17.models.ScopedResource] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2019_10_17.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -390,9 +379,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -454,9 +441,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -511,15 +496,13 @@ def list_by_private_link_scope( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ScopedResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_10_17.models.ScopedResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_10_17.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.ScopedResourceListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py index 2ccf8b87532a..019d14d72b96 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -40,10 +39,6 @@ build_update_tags_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +49,7 @@ class PrivateLinkScopesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.aio.MonitorManagementClient`'s :attr:`private_link_scopes` attribute. """ @@ -75,15 +70,13 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.AzureMonitorPrivateLinkS :return: An iterator like instance of either AzureMonitorPrivateLinkScope or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -164,15 +157,13 @@ def list_by_resource_group( :return: An iterator like instance of either AzureMonitorPrivateLinkScope or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -257,9 +248,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -316,9 +305,7 @@ async def begin_delete(self, resource_group_name: str, scope_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -371,7 +358,7 @@ async def get( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -385,9 +372,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) request = build_get_request( @@ -445,13 +430,13 @@ async def create_or_update( :param azure_monitor_private_link_scope_payload: Properties that need to be specified to create or update a Azure Monitor PrivateLinkScope. Required. :type azure_monitor_private_link_scope_payload: - ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -481,7 +466,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -505,13 +490,13 @@ async def create_or_update( or update a Azure Monitor PrivateLinkScope. Is either a AzureMonitorPrivateLinkScope type or a IO type. Required. :type azure_monitor_private_link_scope_payload: - ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope or IO + ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -525,9 +510,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) @@ -600,13 +583,13 @@ async def update_tags( :type scope_name: str :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope instance. Required. - :type private_link_scope_tags: ~$(python-base-namespace).v2019_10_17.models.TagsResource + :type private_link_scope_tags: ~azure.mgmt.monitor.v2019_10_17.models.TagsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -636,7 +619,7 @@ async def update_tags( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -658,13 +641,13 @@ async def update_tags( :type scope_name: str :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope instance. Is either a TagsResource type or a IO type. Required. - :type private_link_scope_tags: ~$(python-base-namespace).v2019_10_17.models.TagsResource or IO + :type private_link_scope_tags: ~azure.mgmt.monitor.v2019_10_17.models.TagsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -678,9 +661,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models_py3.py index f77683ee4009..22eabfbd961c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models_py3.py @@ -89,7 +89,7 @@ class AzureMonitorPrivateLinkScope(PrivateLinkScopesResource): :vartype provisioning_state: str :ivar private_endpoint_connections: List of private endpoint connections. :vartype private_endpoint_connections: - list[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + list[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] """ _validation = { @@ -132,7 +132,7 @@ class AzureMonitorPrivateLinkScopeListResult(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: List of Azure Monitor PrivateLinkScope definitions. Required. - :vartype value: list[~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope] + :vartype value: list[~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope] :ivar next_link: The URI to get the next set of Azure Monitor PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the result set. :vartype next_link: str @@ -152,8 +152,7 @@ def __init__( ) -> None: """ :keyword value: List of Azure Monitor PrivateLinkScope definitions. Required. - :paramtype value: - list[~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope] + :paramtype value: list[~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope] :keyword next_link: The URI to get the next set of Azure Monitor PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the result set. :paramtype next_link: str @@ -227,10 +226,9 @@ class ErrorResponseCommon(ErrorResponse): :ivar message: Error message indicating why the operation failed. :vartype message: str :ivar details: The error details. - :vartype details: list[~$(python-base-namespace).v2019_10_17.models.ErrorResponseCommon] + :vartype details: list[~azure.mgmt.monitor.v2019_10_17.models.ErrorResponseCommon] :ivar additional_info: The error additional info. - :vartype additional_info: - list[~$(python-base-namespace).v2019_10_17.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.monitor.v2019_10_17.models.ErrorAdditionalInfo] """ _validation = { @@ -271,7 +269,7 @@ class OperationStatus(_serialization.Model): :ivar status: The status of the operation. :vartype status: str :ivar error: The error detail of the operation if any. - :vartype error: ~$(python-base-namespace).v2019_10_17.models.ErrorResponseCommon + :vartype error: ~azure.mgmt.monitor.v2019_10_17.models.ErrorResponseCommon """ _attribute_map = { @@ -306,7 +304,7 @@ def __init__( :keyword status: The status of the operation. :paramtype status: str :keyword error: The error detail of the operation if any. - :paramtype error: ~$(python-base-namespace).v2019_10_17.models.ErrorResponseCommon + :paramtype error: ~azure.mgmt.monitor.v2019_10_17.models.ErrorResponseCommon """ super().__init__(**kwargs) self.id = id @@ -362,11 +360,11 @@ class PrivateEndpointConnection(ProxyResource): :ivar type: Azure resource type. :vartype type: str :ivar private_endpoint: Private endpoint which the connection belongs to. - :vartype private_endpoint: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointProperty + :vartype private_endpoint: ~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointProperty :ivar private_link_service_connection_state: Connection state of the private endpoint connection. :vartype private_link_service_connection_state: - ~$(python-base-namespace).v2019_10_17.models.PrivateLinkServiceConnectionStateProperty + ~azure.mgmt.monitor.v2019_10_17.models.PrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. :vartype provisioning_state: str """ @@ -399,12 +397,11 @@ def __init__( ) -> None: """ :keyword private_endpoint: Private endpoint which the connection belongs to. - :paramtype private_endpoint: - ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointProperty + :paramtype private_endpoint: ~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointProperty :keyword private_link_service_connection_state: Connection state of the private endpoint connection. :paramtype private_link_service_connection_state: - ~$(python-base-namespace).v2019_10_17.models.PrivateLinkServiceConnectionStateProperty + ~azure.mgmt.monitor.v2019_10_17.models.PrivateLinkServiceConnectionStateProperty """ super().__init__(**kwargs) self.private_endpoint = private_endpoint @@ -418,7 +415,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + :vartype value: list[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -506,7 +503,7 @@ class PrivateLinkResourceListResult(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~$(python-base-namespace).v2019_10_17.models.PrivateLinkResource] + :vartype value: list[~azure.mgmt.monitor.v2019_10_17.models.PrivateLinkResource] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -616,7 +613,7 @@ class ScopedResourceListResult(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~$(python-base-namespace).v2019_10_17.models.ScopedResource] + :vartype value: list[~azure.mgmt.monitor.v2019_10_17.models.ScopedResource] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py index da263aaf8045..12f8057c1e29 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -53,9 +48,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -95,9 +88,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -139,9 +130,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) # Construct URL _url = kwargs.pop( "template_url", @@ -172,9 +161,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +194,7 @@ class PrivateEndpointConnectionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.MonitorManagementClient`'s :attr:`private_endpoint_connections` attribute. """ @@ -235,7 +222,7 @@ def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -249,9 +236,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -308,9 +293,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -383,7 +366,7 @@ def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Required. - :type parameters: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -398,7 +381,7 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -438,7 +421,7 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -461,7 +444,7 @@ def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Is either a PrivateEndpointConnection type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection or IO + :type parameters: ~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -476,15 +459,13 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -544,9 +525,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -608,9 +587,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -666,15 +643,13 @@ def list_by_private_link_scope( :return: An iterator like instance of either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_10_17.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py index c839a54c30e0..9c81b625304a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -82,9 +75,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,7 +109,7 @@ class PrivateLinkResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.MonitorManagementClient`'s :attr:`private_link_resources` attribute. """ @@ -145,15 +136,13 @@ def list_by_private_link_scope( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PrivateLinkResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_10_17.models.PrivateLinkResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_10_17.models.PrivateLinkResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -240,7 +229,7 @@ def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.PrivateLinkResource + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -254,9 +243,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py index a6df97e5fb6b..55cc021cddeb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,7 +73,7 @@ class PrivateLinkScopeOperationStatusOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.MonitorManagementClient`'s :attr:`private_link_scope_operation_status` attribute. """ @@ -105,7 +98,7 @@ def get(self, async_operation_id: str, resource_group_name: str, **kwargs: Any) :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationStatus or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.OperationStatus + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.OperationStatus :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -119,9 +112,7 @@ def get(self, async_operation_id: str, resource_group_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py index e4f7ef252002..d7fbfff8d25d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,9 +44,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -85,9 +78,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -123,9 +114,7 @@ def build_delete_request( ) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) # Construct URL _url = kwargs.pop( "template_url", @@ -154,9 +143,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -189,7 +176,7 @@ class PrivateLinkScopedResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.MonitorManagementClient`'s :attr:`private_link_scoped_resources` attribute. """ @@ -215,7 +202,7 @@ def get(self, resource_group_name: str, scope_name: str, name: str, **kwargs: An :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScopedResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.ScopedResource + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.ScopedResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -229,9 +216,7 @@ def get(self, resource_group_name: str, scope_name: str, name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) request = build_get_request( @@ -288,9 +273,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ScopedResource]] = kwargs.pop("cls", None) @@ -366,7 +349,7 @@ def begin_create_or_update( :param name: The name of the scoped resource object. Required. :type name: str :param parameters: Required. - :type parameters: ~$(python-base-namespace).v2019_10_17.models.ScopedResource + :type parameters: ~azure.mgmt.monitor.v2019_10_17.models.ScopedResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -380,8 +363,7 @@ def begin_create_or_update( Retry-After header is present. :return: An instance of LROPoller that returns either ScopedResource or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2019_10_17.models.ScopedResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2019_10_17.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -420,8 +402,7 @@ def begin_create_or_update( Retry-After header is present. :return: An instance of LROPoller that returns either ScopedResource or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2019_10_17.models.ScopedResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2019_10_17.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -444,7 +425,7 @@ def begin_create_or_update( :param name: The name of the scoped resource object. Required. :type name: str :param parameters: Is either a ScopedResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2019_10_17.models.ScopedResource or IO + :type parameters: ~azure.mgmt.monitor.v2019_10_17.models.ScopedResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -458,16 +439,13 @@ def begin_create_or_update( Retry-After header is present. :return: An instance of LROPoller that returns either ScopedResource or the result of cls(response) - :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2019_10_17.models.ScopedResource] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2019_10_17.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -527,9 +505,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -589,9 +565,7 @@ def begin_delete(self, resource_group_name: str, scope_name: str, name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -645,16 +619,13 @@ def list_by_private_link_scope( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ScopedResource or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_10_17.models.ScopedResource] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_10_17.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.ScopedResourceListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py index c5aa3b55907f..9a177d0cc9ca 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -104,9 +95,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ def build_delete_request(resource_group_name: str, scope_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) # Construct URL _url = kwargs.pop( "template_url", @@ -132,9 +121,7 @@ def build_get_request(resource_group_name: str, scope_name: str, subscription_id _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -167,9 +154,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -205,9 +190,7 @@ def build_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -243,7 +226,7 @@ class PrivateLinkScopesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_10_17.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_10_17.MonitorManagementClient`'s :attr:`private_link_scopes` attribute. """ @@ -264,15 +247,13 @@ def list(self, **kwargs: Any) -> Iterable["_models.AzureMonitorPrivateLinkScope" :return: An iterator like instance of either AzureMonitorPrivateLinkScope or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -353,15 +334,13 @@ def list_by_resource_group( :return: An iterator like instance of either AzureMonitorPrivateLinkScope or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -446,9 +425,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -505,9 +482,7 @@ def begin_delete(self, resource_group_name: str, scope_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -558,7 +533,7 @@ def get(self, resource_group_name: str, scope_name: str, **kwargs: Any) -> _mode :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -572,9 +547,7 @@ def get(self, resource_group_name: str, scope_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) request = build_get_request( @@ -632,13 +605,13 @@ def create_or_update( :param azure_monitor_private_link_scope_payload: Properties that need to be specified to create or update a Azure Monitor PrivateLinkScope. Required. :type azure_monitor_private_link_scope_payload: - ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -668,7 +641,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -692,13 +665,13 @@ def create_or_update( or update a Azure Monitor PrivateLinkScope. Is either a AzureMonitorPrivateLinkScope type or a IO type. Required. :type azure_monitor_private_link_scope_payload: - ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope or IO + ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -712,9 +685,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) @@ -787,13 +758,13 @@ def update_tags( :type scope_name: str :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope instance. Required. - :type private_link_scope_tags: ~$(python-base-namespace).v2019_10_17.models.TagsResource + :type private_link_scope_tags: ~azure.mgmt.monitor.v2019_10_17.models.TagsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -823,7 +794,7 @@ def update_tags( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -845,13 +816,13 @@ def update_tags( :type scope_name: str :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope instance. Is either a TagsResource type or a IO type. Required. - :type private_link_scope_tags: ~$(python-base-namespace).v2019_10_17.models.TagsResource or IO + :type private_link_scope_tags: ~azure.mgmt.monitor.v2019_10_17.models.TagsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_10_17.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2019_10_17.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -865,9 +836,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-10-17-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-10-17-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-10-17-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) 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 45edbfa23014..73d471345233 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-11-01-preview"] = kwargs.pop("api_version", "2019-11-01-preview") + api_version: str = kwargs.pop("api_version", "2019-11-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index 3492e63078b6..6f276c320222 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_management_client.py @@ -27,10 +27,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations :vartype data_collection_rule_associations: - $(python-base-namespace).v2019_11_01_preview.operations.DataCollectionRuleAssociationsOperations + azure.mgmt.monitor.v2019_11_01_preview.operations.DataCollectionRuleAssociationsOperations :ivar data_collection_rules: DataCollectionRulesOperations operations :vartype data_collection_rules: - $(python-base-namespace).v2019_11_01_preview.operations.DataCollectionRulesOperations + azure.mgmt.monitor.v2019_11_01_preview.operations.DataCollectionRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 62d02e980b54..ba7d63ed5b53 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2019-11-01-preview"] = kwargs.pop("api_version", "2019-11-01-preview") + api_version: str = kwargs.pop("api_version", "2019-11-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 7b53a1daf0f1..78f9c865e6df 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_management_client.py @@ -27,10 +27,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations :vartype data_collection_rule_associations: - $(python-base-namespace).v2019_11_01_preview.aio.operations.DataCollectionRuleAssociationsOperations + azure.mgmt.monitor.v2019_11_01_preview.aio.operations.DataCollectionRuleAssociationsOperations :ivar data_collection_rules: DataCollectionRulesOperations operations :vartype data_collection_rules: - $(python-base-namespace).v2019_11_01_preview.aio.operations.DataCollectionRulesOperations + azure.mgmt.monitor.v2019_11_01_preview.aio.operations.DataCollectionRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py index 1cc83b3818dd..45961e6de505 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -37,10 +36,6 @@ build_list_by_rule_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +46,7 @@ class DataCollectionRuleAssociationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_11_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_11_01_preview.aio.MonitorManagementClient`'s :attr:`data_collection_rule_associations` attribute. """ @@ -78,15 +73,13 @@ def list_by_resource( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -175,15 +168,13 @@ def list_by_rule( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -273,7 +264,7 @@ async def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -287,9 +278,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -346,14 +335,14 @@ async def create( :type association_name: str :param body: The payload. Default value is None. :type body: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -383,7 +372,7 @@ async def create( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -406,7 +395,7 @@ async def create( :param body: The payload. Is either a DataCollectionRuleAssociationProxyOnlyResource type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -414,7 +403,7 @@ async def create( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -428,9 +417,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -514,9 +501,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py index 78f4fa0b8085..ccb81f47d079 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class DataCollectionRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_11_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_11_01_preview.aio.MonitorManagementClient`'s :attr:`data_collection_rules` attribute. """ @@ -80,15 +75,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -170,15 +163,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -265,7 +256,7 @@ async def get( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -279,9 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -340,13 +329,13 @@ async def create( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :type body: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -377,7 +366,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -401,14 +390,13 @@ async def create( :type data_collection_rule_name: str :param body: The payload. Is either a DataCollectionRuleResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource or - IO + :type body: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -422,9 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -502,13 +488,13 @@ async def update( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2019_11_01_preview.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -539,7 +525,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -563,13 +549,13 @@ async def update( :type data_collection_rule_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2019_11_01_preview.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -583,9 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -668,9 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( 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 1dc100b97f9a..5ae69c566855 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 @@ -60,16 +60,16 @@ class DataCollectionRule(_serialization.Model): This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :vartype data_sources: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. :vartype destinations: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -102,12 +102,12 @@ def __init__( This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :paramtype data_sources: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. :paramtype destinations: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataFlow] """ super().__init__(**kwargs) self.description = description @@ -131,7 +131,7 @@ class DataCollectionRuleAssociation(_serialization.Model): :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -181,7 +181,7 @@ class DataCollectionRuleAssociationProxyOnlyResource(_serialization.Model): :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -229,7 +229,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceListResult(_serialization.Mo :ivar value: A list of resources. Required. :vartype value: - list[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -253,7 +253,7 @@ def __init__( """ :keyword value: A list of resources. Required. :paramtype value: - list[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -275,7 +275,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRul :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -306,15 +306,14 @@ class DataSourcesSpec(_serialization.Model): :ivar performance_counters: The list of performance counter data source configurations. :vartype performance_counters: - list[~$(python-base-namespace).v2019_11_01_preview.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.PerfCounterDataSource] :ivar windows_event_logs: The list of Windows Event Log data source configurations. :vartype windows_event_logs: - list[~$(python-base-namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.WindowsEventLogDataSource] :ivar syslog: The list of Syslog data source configurations. - :vartype syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] + :vartype syslog: list[~azure.mgmt.monitor.v2019_11_01_preview.models.SyslogDataSource] :ivar extensions: The list of Azure VM extension data source configurations. - :vartype extensions: - list[~$(python-base-namespace).v2019_11_01_preview.models.ExtensionDataSource] + :vartype extensions: list[~azure.mgmt.monitor.v2019_11_01_preview.models.ExtensionDataSource] """ _attribute_map = { @@ -336,15 +335,14 @@ def __init__( """ :keyword performance_counters: The list of performance counter data source configurations. :paramtype performance_counters: - list[~$(python-base-namespace).v2019_11_01_preview.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.PerfCounterDataSource] :keyword windows_event_logs: The list of Windows Event Log data source configurations. :paramtype windows_event_logs: - list[~$(python-base-namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.WindowsEventLogDataSource] :keyword syslog: The list of Syslog data source configurations. - :paramtype syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] + :paramtype syslog: list[~azure.mgmt.monitor.v2019_11_01_preview.models.SyslogDataSource] :keyword extensions: The list of Azure VM extension data source configurations. - :paramtype extensions: - list[~$(python-base-namespace).v2019_11_01_preview.models.ExtensionDataSource] + :paramtype extensions: list[~azure.mgmt.monitor.v2019_11_01_preview.models.ExtensionDataSource] """ super().__init__(**kwargs) self.performance_counters = performance_counters @@ -360,15 +358,14 @@ class DataCollectionRuleDataSources(DataSourcesSpec): :ivar performance_counters: The list of performance counter data source configurations. :vartype performance_counters: - list[~$(python-base-namespace).v2019_11_01_preview.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.PerfCounterDataSource] :ivar windows_event_logs: The list of Windows Event Log data source configurations. :vartype windows_event_logs: - list[~$(python-base-namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.WindowsEventLogDataSource] :ivar syslog: The list of Syslog data source configurations. - :vartype syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] + :vartype syslog: list[~azure.mgmt.monitor.v2019_11_01_preview.models.SyslogDataSource] :ivar extensions: The list of Azure VM extension data source configurations. - :vartype extensions: - list[~$(python-base-namespace).v2019_11_01_preview.models.ExtensionDataSource] + :vartype extensions: list[~azure.mgmt.monitor.v2019_11_01_preview.models.ExtensionDataSource] """ _attribute_map = { @@ -390,15 +387,14 @@ def __init__( """ :keyword performance_counters: The list of performance counter data source configurations. :paramtype performance_counters: - list[~$(python-base-namespace).v2019_11_01_preview.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.PerfCounterDataSource] :keyword windows_event_logs: The list of Windows Event Log data source configurations. :paramtype windows_event_logs: - list[~$(python-base-namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.WindowsEventLogDataSource] :keyword syslog: The list of Syslog data source configurations. - :paramtype syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] + :paramtype syslog: list[~azure.mgmt.monitor.v2019_11_01_preview.models.SyslogDataSource] :keyword extensions: The list of Azure VM extension data source configurations. - :paramtype extensions: - list[~$(python-base-namespace).v2019_11_01_preview.models.ExtensionDataSource] + :paramtype extensions: list[~azure.mgmt.monitor.v2019_11_01_preview.models.ExtensionDataSource] """ super().__init__( performance_counters=performance_counters, @@ -414,10 +410,10 @@ class DestinationsSpec(_serialization.Model): :ivar log_analytics: List of Log Analytics destinations. :vartype log_analytics: - list[~$(python-base-namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.LogAnalyticsDestination] :ivar azure_monitor_metrics: Azure Monitor Metrics destination. :vartype azure_monitor_metrics: - ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { @@ -435,10 +431,10 @@ def __init__( """ :keyword log_analytics: List of Log Analytics destinations. :paramtype log_analytics: - list[~$(python-base-namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.LogAnalyticsDestination] :keyword azure_monitor_metrics: Azure Monitor Metrics destination. :paramtype azure_monitor_metrics: - ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics """ super().__init__(**kwargs) self.log_analytics = log_analytics @@ -450,10 +446,10 @@ class DataCollectionRuleDestinations(DestinationsSpec): :ivar log_analytics: List of Log Analytics destinations. :vartype log_analytics: - list[~$(python-base-namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.LogAnalyticsDestination] :ivar azure_monitor_metrics: Azure Monitor Metrics destination. :vartype azure_monitor_metrics: - ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { @@ -471,10 +467,10 @@ def __init__( """ :keyword log_analytics: List of Log Analytics destinations. :paramtype log_analytics: - list[~$(python-base-namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.LogAnalyticsDestination] :keyword azure_monitor_metrics: Azure Monitor Metrics destination. :paramtype azure_monitor_metrics: - ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics """ super().__init__(log_analytics=log_analytics, azure_monitor_metrics=azure_monitor_metrics, **kwargs) @@ -492,7 +488,7 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m :vartype tags: dict[str, str] :ivar kind: The kind of the resource. Known values are: "Linux" and "Windows". :vartype kind: str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleResourceKind + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataCollectionRuleResourceKind :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -509,16 +505,16 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :vartype data_sources: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. :vartype destinations: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -566,19 +562,19 @@ def __init__( :paramtype tags: dict[str, str] :keyword kind: The kind of the resource. Known values are: "Linux" and "Windows". :paramtype kind: str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleResourceKind + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataCollectionRuleResourceKind :keyword description: Description of the data collection rule. :paramtype description: str :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :paramtype data_sources: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. :paramtype destinations: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataFlow] """ super().__init__(**kwargs) self.location = location @@ -602,8 +598,7 @@ class DataCollectionRuleResourceListResult(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: A list of resources. Required. - :vartype value: - list[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -623,7 +618,7 @@ def __init__( """ :keyword value: A list of resources. Required. :paramtype value: - list[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -645,16 +640,16 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :vartype data_sources: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. :vartype destinations: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -687,12 +682,12 @@ def __init__( This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :paramtype data_sources: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. :paramtype destinations: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2019_11_01_preview.models.DataFlow] """ super().__init__( description=description, @@ -708,7 +703,7 @@ class DataFlow(_serialization.Model): :ivar streams: List of streams for this data flow. :vartype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataFlowStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataFlowStreams] :ivar destinations: List of destinations for this data flow. :vartype destinations: list[str] """ @@ -728,7 +723,7 @@ def __init__( """ :keyword streams: List of streams for this data flow. :paramtype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataFlowStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownDataFlowStreams] :keyword destinations: List of destinations for this data flow. :paramtype destinations: list[str] """ @@ -800,10 +795,10 @@ class ErrorDetail(_serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetail] + :vartype details: list[~azure.mgmt.monitor.v2019_11_01_preview.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: - list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] + list[~azure.mgmt.monitor.v2019_11_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -837,7 +832,7 @@ class ErrorResponse(_serialization.Model): operations. (This also follows the OData error response format.). :ivar error: The error object. - :vartype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetail + :vartype error: ~azure.mgmt.monitor.v2019_11_01_preview.models.ErrorDetail """ _attribute_map = { @@ -847,7 +842,7 @@ class ErrorResponse(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetail + :paramtype error: ~azure.mgmt.monitor.v2019_11_01_preview.models.ErrorDetail """ super().__init__(**kwargs) self.error = error @@ -864,7 +859,7 @@ class ExtensionDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownExtensionDataSourceStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownExtensionDataSourceStreams] :ivar extension_name: The name of the VM extension. Required. :vartype extension_name: str :ivar extension_settings: The extension settings. The format is specific for particular @@ -905,7 +900,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownExtensionDataSourceStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownExtensionDataSourceStreams] :keyword extension_name: The name of the VM extension. Required. :paramtype extension_name: str :keyword extension_settings: The extension settings. The format is specific for particular @@ -977,7 +972,7 @@ class PerfCounterDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] :ivar sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). :vartype sampling_frequency_in_seconds: int @@ -1013,7 +1008,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] :keyword sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). :paramtype sampling_frequency_in_seconds: int @@ -1062,13 +1057,13 @@ class SyslogDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownSyslogDataSourceStreams] :ivar facility_names: The list of facility names. :vartype facility_names: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] :ivar log_levels: The log levels to collect. :vartype log_levels: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] :ivar name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -1096,13 +1091,13 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownSyslogDataSourceStreams] :keyword facility_names: The list of facility names. :paramtype facility_names: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] :keyword log_levels: The log levels to collect. :paramtype log_levels: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] :keyword name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -1123,7 +1118,7 @@ class WindowsEventLogDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] :ivar x_path_queries: A list of Windows Event Log queries in XPATH format. :vartype x_path_queries: list[str] :ivar name: A friendly name for the data source. @@ -1151,7 +1146,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] + ~azure.mgmt.monitor.v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] :keyword x_path_queries: A list of Windows Event Log queries in XPATH format. :paramtype x_path_queries: list[str] :keyword name: A friendly name for the data source. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py index 572d41a6ca09..b0d7674bc0f2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -106,9 +97,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -135,9 +124,7 @@ def build_create_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -167,9 +154,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -198,7 +183,7 @@ class DataCollectionRuleAssociationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_11_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_11_01_preview.MonitorManagementClient`'s :attr:`data_collection_rule_associations` attribute. """ @@ -225,15 +210,13 @@ def list_by_resource( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -322,15 +305,13 @@ def list_by_rule( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -420,7 +401,7 @@ def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -434,9 +415,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -493,14 +472,14 @@ def create( :type association_name: str :param body: The payload. Default value is None. :type body: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -530,7 +509,7 @@ def create( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -553,7 +532,7 @@ def create( :param body: The payload. Is either a DataCollectionRuleAssociationProxyOnlyResource type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -561,7 +540,7 @@ def create( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -575,9 +554,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -661,9 +638,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py index 515ef96a8e46..9ed552110b7c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,9 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,9 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,9 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,9 +167,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -218,9 +203,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -253,7 +236,7 @@ class DataCollectionRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2019_11_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2019_11_01_preview.MonitorManagementClient`'s :attr:`data_collection_rules` attribute. """ @@ -281,15 +264,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -371,15 +352,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -466,7 +445,7 @@ def get( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -480,9 +459,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -541,13 +518,13 @@ def create( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :type body: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -578,7 +555,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -602,14 +579,13 @@ def create( :type data_collection_rule_name: str :param body: The payload. Is either a DataCollectionRuleResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource or - IO + :type body: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -623,9 +599,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -703,13 +677,13 @@ def update( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2019_11_01_preview.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -740,7 +714,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -764,13 +738,13 @@ def update( :type data_collection_rule_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2019_11_01_preview.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2019_11_01_preview.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2019_11_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -784,9 +758,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -869,9 +841,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2019-11-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2019-11-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2019-11-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( 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 a051a0ea24f5..a38a4e147869 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-01-01-preview"] = kwargs.pop("api_version", "2020-01-01-preview") + api_version: str = kwargs.pop("api_version", "2020-01-01-preview") 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/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_management_client.py index 443ada17849b..8c60f2a9d091 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_management_client.py @@ -28,7 +28,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar management_group_diagnostic_settings: ManagementGroupDiagnosticSettingsOperations operations :vartype management_group_diagnostic_settings: - $(python-base-namespace).v2020_01_01_preview.operations.ManagementGroupDiagnosticSettingsOperations + azure.mgmt.monitor.v2020_01_01_preview.operations.ManagementGroupDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 740c01dc5e21..3c41728a4113 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-01-01-preview"] = kwargs.pop("api_version", "2020-01-01-preview") + api_version: str = kwargs.pop("api_version", "2020-01-01-preview") 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_management_client.py index 9f2f58fcca5d..85b824d043e7 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_management_client.py @@ -28,7 +28,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar management_group_diagnostic_settings: ManagementGroupDiagnosticSettingsOperations operations :vartype management_group_diagnostic_settings: - $(python-base-namespace).v2020_01_01_preview.aio.operations.ManagementGroupDiagnosticSettingsOperations + azure.mgmt.monitor.v2020_01_01_preview.aio.operations.ManagementGroupDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py index da34c581c432..1bdef69a47ed 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +45,7 @@ class ManagementGroupDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2020_01_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2020_01_01_preview.aio.MonitorManagementClient`'s :attr:`management_group_diagnostic_settings` attribute. """ @@ -76,7 +71,7 @@ async def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -90,9 +85,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -147,14 +140,14 @@ async def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -182,7 +175,7 @@ async def create_or_update( :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -203,15 +196,14 @@ async def create_or_update( :param parameters: Parameters supplied to the operation. Is either a ManagementGroupDiagnosticSettingsResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource - or IO + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -225,9 +217,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -302,9 +292,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -349,15 +337,13 @@ def list( :return: An iterator like instance of either ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models_py3.py index 60b126be7bda..d87ff2c9d569 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models_py3.py @@ -107,8 +107,7 @@ class ManagementGroupDiagnosticSettingsResource(ManagementGroupProxyOnlyResource will be selected. :vartype event_hub_name: str :ivar logs: The list of logs settings. - :vartype logs: - list[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupLogSettings] + :vartype logs: list[~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupLogSettings] :ivar workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -162,7 +161,7 @@ def __init__( :paramtype event_hub_name: str :keyword logs: The list of logs settings. :paramtype logs: - list[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupLogSettings] + list[~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupLogSettings] :keyword workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -182,7 +181,7 @@ class ManagementGroupDiagnosticSettingsResourceCollection(_serialization.Model): :ivar value: The collection of management group diagnostic settings resources. :vartype value: - list[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] """ _attribute_map = { @@ -195,7 +194,7 @@ def __init__( """ :keyword value: The collection of management group diagnostic settings resources. :paramtype value: - list[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] """ super().__init__(**kwargs) self.value = value diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py index b020dfe7895f..eed4e536f9e6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(management_group_id: str, name: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,9 +68,7 @@ def build_create_or_update_request(management_group_id: str, name: str, **kwargs _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -108,9 +99,7 @@ def build_delete_request(management_group_id: str, name: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,9 +127,7 @@ def build_list_request(management_group_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -169,7 +156,7 @@ class ManagementGroupDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2020_01_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2020_01_01_preview.MonitorManagementClient`'s :attr:`management_group_diagnostic_settings` attribute. """ @@ -195,7 +182,7 @@ def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -209,9 +196,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -266,14 +251,14 @@ def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -301,7 +286,7 @@ def create_or_update( :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -322,15 +307,14 @@ def create_or_update( :param parameters: Parameters supplied to the operation. Is either a ManagementGroupDiagnosticSettingsResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource - or IO + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -344,9 +328,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -421,9 +403,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -468,15 +448,13 @@ def list( :return: An iterator like instance of either ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-01-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-01-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-01-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { 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 0c9435092a06..fe6231bcf324 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-05-01-preview"] = kwargs.pop("api_version", "2020-05-01-preview") + api_version: str = kwargs.pop("api_version", "2020-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index 015ce7586eb1..820af6112cc5 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations :vartype scheduled_query_rules: - $(python-base-namespace).v2020_05_01_preview.operations.ScheduledQueryRulesOperations + azure.mgmt.monitor.v2020_05_01_preview.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 2cb0cf71f8ae..2f135477387f 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-05-01-preview"] = kwargs.pop("api_version", "2020-05-01-preview") + api_version: str = kwargs.pop("api_version", "2020-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 5979d7c8a212..5332b493b426 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations :vartype scheduled_query_rules: - $(python-base-namespace).v2020_05_01_preview.aio.operations.ScheduledQueryRulesOperations + azure.mgmt.monitor.v2020_05_01_preview.aio.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py index b2828cac1cc8..5983bcef6803 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class ScheduledQueryRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2020_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2020_05_01_preview.aio.MonitorManagementClient`'s :attr:`scheduled_query_rules` attribute. """ @@ -73,15 +68,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Schedule :return: An iterator like instance of either ScheduledQueryRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -165,15 +158,13 @@ def list_by_resource_group( :return: An iterator like instance of either ScheduledQueryRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -256,7 +247,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -270,9 +261,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -328,14 +317,13 @@ async def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :type parameters: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -363,7 +351,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -384,14 +372,14 @@ async def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a ScheduledQueryRuleResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -405,9 +393,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -480,13 +466,13 @@ async def update( :type rule_name: str :param parameters: The parameters of the rule to update. Required. :type parameters: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResourcePatch + ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -514,7 +500,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -536,13 +522,13 @@ async def update( :param parameters: The parameters of the rule to update. Is either a ScheduledQueryRuleResourcePatch type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResourcePatch or IO + ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -556,9 +542,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -635,9 +619,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( 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 a94da047d5d1..637060da25af 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 @@ -59,24 +59,23 @@ class Condition(_serialization.Model): :ivar time_aggregation: Aggregation type. Required. Known values are: "Count", "Average", "Minimum", "Maximum", and "Total". :vartype time_aggregation: str or - ~$(python-base-namespace).v2020_05_01_preview.models.TimeAggregation + ~azure.mgmt.monitor.v2020_05_01_preview.models.TimeAggregation :ivar metric_measure_column: The column containing the metric measure number. :vartype metric_measure_column: str :ivar resource_id_column: The column containing the resource id. The content of the column must be a uri formatted as resource id. :vartype resource_id_column: str :ivar dimensions: List of Dimensions conditions. - :vartype dimensions: list[~$(python-base-namespace).v2020_05_01_preview.models.Dimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2020_05_01_preview.models.Dimension] :ivar operator: The criteria operator. Required. Known values are: "Equals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or - ~$(python-base-namespace).v2020_05_01_preview.models.ConditionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2020_05_01_preview.models.ConditionOperator :ivar threshold: the criteria threshold value that activates the alert. Required. :vartype threshold: float :ivar failing_periods: The minimum number of violations required within the selected lookback time window required to raise an alert. :vartype failing_periods: - ~$(python-base-namespace).v2020_05_01_preview.models.ConditionFailingPeriods + ~azure.mgmt.monitor.v2020_05_01_preview.models.ConditionFailingPeriods """ _validation = { @@ -115,24 +114,23 @@ def __init__( :keyword time_aggregation: Aggregation type. Required. Known values are: "Count", "Average", "Minimum", "Maximum", and "Total". :paramtype time_aggregation: str or - ~$(python-base-namespace).v2020_05_01_preview.models.TimeAggregation + ~azure.mgmt.monitor.v2020_05_01_preview.models.TimeAggregation :keyword metric_measure_column: The column containing the metric measure number. :paramtype metric_measure_column: str :keyword resource_id_column: The column containing the resource id. The content of the column must be a uri formatted as resource id. :paramtype resource_id_column: str :keyword dimensions: List of Dimensions conditions. - :paramtype dimensions: list[~$(python-base-namespace).v2020_05_01_preview.models.Dimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2020_05_01_preview.models.Dimension] :keyword operator: The criteria operator. Required. Known values are: "Equals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or - ~$(python-base-namespace).v2020_05_01_preview.models.ConditionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2020_05_01_preview.models.ConditionOperator :keyword threshold: the criteria threshold value that activates the alert. Required. :paramtype threshold: float :keyword failing_periods: The minimum number of violations required within the selected lookback time window required to raise an alert. :paramtype failing_periods: - ~$(python-base-namespace).v2020_05_01_preview.models.ConditionFailingPeriods + ~azure.mgmt.monitor.v2020_05_01_preview.models.ConditionFailingPeriods """ super().__init__(**kwargs) self.query = query @@ -189,8 +187,7 @@ class Dimension(_serialization.Model): :vartype name: str :ivar operator: Operator for dimension values. Required. Known values are: "Include" and "Exclude". - :vartype operator: str or - ~$(python-base-namespace).v2020_05_01_preview.models.DimensionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2020_05_01_preview.models.DimensionOperator :ivar values: List of dimension values. Required. :vartype values: list[str] """ @@ -215,8 +212,7 @@ def __init__( :paramtype name: str :keyword operator: Operator for dimension values. Required. Known values are: "Include" and "Exclude". - :paramtype operator: str or - ~$(python-base-namespace).v2020_05_01_preview.models.DimensionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2020_05_01_preview.models.DimensionOperator :keyword values: List of dimension values. Required. :paramtype values: list[str] """ @@ -258,7 +254,7 @@ class ErrorContract(_serialization.Model): """Describes the format of Error response. :ivar error: The error details. - :vartype error: ~$(python-base-namespace).v2020_05_01_preview.models.ErrorResponse + :vartype error: ~azure.mgmt.monitor.v2020_05_01_preview.models.ErrorResponse """ _attribute_map = { @@ -268,7 +264,7 @@ class ErrorContract(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorResponse"] = None, **kwargs: Any) -> None: """ :keyword error: The error details. - :paramtype error: ~$(python-base-namespace).v2020_05_01_preview.models.ErrorResponse + :paramtype error: ~azure.mgmt.monitor.v2020_05_01_preview.models.ErrorResponse """ super().__init__(**kwargs) self.error = error @@ -287,10 +283,10 @@ class ErrorResponse(_serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorResponse] + :vartype details: list[~azure.mgmt.monitor.v2020_05_01_preview.models.ErrorResponse] :ivar additional_info: The error additional info. :vartype additional_info: - list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorAdditionalInfo] + list[~azure.mgmt.monitor.v2020_05_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -358,7 +354,7 @@ class ScheduledQueryRuleCriteria(_serialization.Model): """The rule criteria that defines the conditions of the scheduled query rule. :ivar all_of: A list of conditions to evaluate against the specified scopes. - :vartype all_of: list[~$(python-base-namespace).v2020_05_01_preview.models.Condition] + :vartype all_of: list[~azure.mgmt.monitor.v2020_05_01_preview.models.Condition] """ _attribute_map = { @@ -368,7 +364,7 @@ class ScheduledQueryRuleCriteria(_serialization.Model): def __init__(self, *, all_of: Optional[List["_models.Condition"]] = None, **kwargs: Any) -> None: """ :keyword all_of: A list of conditions to evaluate against the specified scopes. - :paramtype all_of: list[~$(python-base-namespace).v2020_05_01_preview.models.Condition] + :paramtype all_of: list[~azure.mgmt.monitor.v2020_05_01_preview.models.Condition] """ super().__init__(**kwargs) self.all_of = all_of @@ -462,7 +458,7 @@ class ScheduledQueryRuleResource(TrackedResource): # pylint: disable=too-many-i :vartype display_name: str :ivar severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Known values are: 0, 1, 2, 3, and 4. - :vartype severity: float or ~$(python-base-namespace).v2020_05_01_preview.models.AlertSeverity + :vartype severity: float or ~azure.mgmt.monitor.v2020_05_01_preview.models.AlertSeverity :ivar enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false. :vartype enabled: bool @@ -483,13 +479,12 @@ class ScheduledQueryRuleResource(TrackedResource): # pylint: disable=too-many-i machine in the resource group which meet the alert criteria. :vartype target_resource_types: list[str] :ivar criteria: The rule criteria that defines the conditions of the scheduled query rule. - :vartype criteria: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleCriteria + :vartype criteria: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleCriteria :ivar mute_actions_duration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. :vartype mute_actions_duration: ~datetime.timedelta :ivar actions: - :vartype actions: list[~$(python-base-namespace).v2020_05_01_preview.models.Action] + :vartype actions: list[~azure.mgmt.monitor.v2020_05_01_preview.models.Action] """ _validation = { @@ -557,8 +552,7 @@ def __init__( :paramtype display_name: str :keyword severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Known values are: 0, 1, 2, 3, and 4. - :paramtype severity: float or - ~$(python-base-namespace).v2020_05_01_preview.models.AlertSeverity + :paramtype severity: float or ~azure.mgmt.monitor.v2020_05_01_preview.models.AlertSeverity :keyword enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false. :paramtype enabled: bool @@ -579,13 +573,12 @@ def __init__( machine in the resource group which meet the alert criteria. :paramtype target_resource_types: list[str] :keyword criteria: The rule criteria that defines the conditions of the scheduled query rule. - :paramtype criteria: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleCriteria + :paramtype criteria: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleCriteria :keyword mute_actions_duration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. :paramtype mute_actions_duration: ~datetime.timedelta :keyword actions: - :paramtype actions: list[~$(python-base-namespace).v2020_05_01_preview.models.Action] + :paramtype actions: list[~azure.mgmt.monitor.v2020_05_01_preview.models.Action] """ super().__init__(tags=tags, location=location, **kwargs) self.kind = None @@ -610,8 +603,7 @@ class ScheduledQueryRuleResourceCollection(_serialization.Model): """Represents a collection of scheduled query rule resources. :ivar value: The values for the scheduled query rule resources. - :vartype value: - list[~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource] """ _attribute_map = { @@ -622,7 +614,7 @@ def __init__(self, *, value: Optional[List["_models.ScheduledQueryRuleResource"] """ :keyword value: The values for the scheduled query rule resources. :paramtype value: - list[~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] + list[~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource] """ super().__init__(**kwargs) self.value = value @@ -645,7 +637,7 @@ class ScheduledQueryRuleResourcePatch(_serialization.Model): # pylint: disable= :vartype display_name: str :ivar severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Known values are: 0, 1, 2, 3, and 4. - :vartype severity: float or ~$(python-base-namespace).v2020_05_01_preview.models.AlertSeverity + :vartype severity: float or ~azure.mgmt.monitor.v2020_05_01_preview.models.AlertSeverity :ivar enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false. :vartype enabled: bool @@ -666,13 +658,12 @@ class ScheduledQueryRuleResourcePatch(_serialization.Model): # pylint: disable= machine in the resource group which meet the alert criteria. :vartype target_resource_types: list[str] :ivar criteria: The rule criteria that defines the conditions of the scheduled query rule. - :vartype criteria: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleCriteria + :vartype criteria: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleCriteria :ivar mute_actions_duration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. :vartype mute_actions_duration: ~datetime.timedelta :ivar actions: - :vartype actions: list[~$(python-base-namespace).v2020_05_01_preview.models.Action] + :vartype actions: list[~azure.mgmt.monitor.v2020_05_01_preview.models.Action] """ _validation = { @@ -725,8 +716,7 @@ def __init__( :paramtype display_name: str :keyword severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Known values are: 0, 1, 2, 3, and 4. - :paramtype severity: float or - ~$(python-base-namespace).v2020_05_01_preview.models.AlertSeverity + :paramtype severity: float or ~azure.mgmt.monitor.v2020_05_01_preview.models.AlertSeverity :keyword enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false. :paramtype enabled: bool @@ -747,13 +737,12 @@ def __init__( machine in the resource group which meet the alert criteria. :paramtype target_resource_types: list[str] :keyword criteria: The rule criteria that defines the conditions of the scheduled query rule. - :paramtype criteria: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleCriteria + :paramtype criteria: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleCriteria :keyword mute_actions_duration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. :paramtype mute_actions_duration: ~datetime.timedelta :keyword actions: - :paramtype actions: list[~$(python-base-namespace).v2020_05_01_preview.models.Action] + :paramtype actions: list[~azure.mgmt.monitor.v2020_05_01_preview.models.Action] """ super().__init__(**kwargs) self.tags = tags diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py index 9562b9ebab43..d228d7b32971 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,9 +96,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -140,9 +129,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,9 +163,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -212,9 +197,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -247,7 +230,7 @@ class ScheduledQueryRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2020_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2020_05_01_preview.MonitorManagementClient`'s :attr:`scheduled_query_rules` attribute. """ @@ -268,15 +251,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ScheduledQuer :return: An iterator like instance of either ScheduledQueryRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -360,15 +341,13 @@ def list_by_resource_group( :return: An iterator like instance of either ScheduledQueryRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -451,7 +430,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -465,9 +444,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -523,14 +500,13 @@ def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :type parameters: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -558,7 +534,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -579,14 +555,14 @@ def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a ScheduledQueryRuleResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -600,9 +576,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -675,13 +649,13 @@ def update( :type rule_name: str :param parameters: The parameters of the rule to update. Required. :type parameters: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResourcePatch + ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -709,7 +683,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -731,13 +705,13 @@ def update( :param parameters: The parameters of the rule to update. Is either a ScheduledQueryRuleResourcePatch type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResourcePatch or IO + ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2020_05_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -751,9 +725,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -830,9 +802,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2020-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( 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 925eb3a2ad0f..fddd1844a56b 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", "2020-10-01") + api_version: str = kwargs.pop("api_version", "2020-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index b74e3e0b61df..ee3137b48e31 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar activity_log_alerts: ActivityLogAlertsOperations operations :vartype activity_log_alerts: - $(python-base-namespace).v2020_10_01.operations.ActivityLogAlertsOperations + azure.mgmt.monitor.v2020_10_01.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 15ad289ba9ca..42b631fd8594 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", "2020-10-01") + api_version: str = kwargs.pop("api_version", "2020-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index ce3655d4a2f2..a39bf9bd18be 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_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar activity_log_alerts: ActivityLogAlertsOperations operations :vartype activity_log_alerts: - $(python-base-namespace).v2020_10_01.aio.operations.ActivityLogAlertsOperations + azure.mgmt.monitor.v2020_10_01.aio.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py index 7f58b5f4a74f..5fae3dda7418 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class ActivityLogAlertsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2020_10_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2020_10_01.aio.MonitorManagementClient`'s :attr:`activity_log_alerts` attribute. """ @@ -84,14 +79,13 @@ async def create_or_update( :type activity_log_alert_name: str :param activity_log_alert_rule: The Activity Log Alert rule to create or use for the update. Required. - :type activity_log_alert_rule: - ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :type activity_log_alert_rule: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -120,7 +114,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -141,14 +135,14 @@ async def create_or_update( :type activity_log_alert_name: str :param activity_log_alert_rule: The Activity Log Alert rule to create or use for the update. Is either a ActivityLogAlertResource type or a IO type. Required. - :type activity_log_alert_rule: - ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource or IO + :type activity_log_alert_rule: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource + or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -162,7 +156,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -229,7 +223,7 @@ async def get( :type activity_log_alert_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -243,7 +237,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -308,7 +302,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -363,13 +357,13 @@ async def update( :type activity_log_alert_name: str :param activity_log_alert_rule_patch: Parameters supplied to the operation. Required. :type activity_log_alert_rule_patch: - ~$(python-base-namespace).v2020_10_01.models.AlertRulePatchObject + ~azure.mgmt.monitor.v2020_10_01.models.AlertRulePatchObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -399,7 +393,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -423,13 +417,13 @@ async def update( :param activity_log_alert_rule_patch: Parameters supplied to the operation. Is either a AlertRulePatchObject type or a IO type. Required. :type activity_log_alert_rule_patch: - ~$(python-base-namespace).v2020_10_01.models.AlertRulePatchObject or IO + ~azure.mgmt.monitor.v2020_10_01.models.AlertRulePatchObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -443,7 +437,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -501,13 +495,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Activ :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.AlertRuleList] = kwargs.pop("cls", None) error_map = { @@ -591,13 +585,13 @@ def list_by_resource_group( :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.AlertRuleList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models_py3.py index b63f24d95909..c5d3588a63b5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models_py3.py @@ -58,7 +58,7 @@ class ActionList(_serialization.Model): """A list of Activity Log Alert rule actions. :ivar action_groups: The list of the Action Groups. - :vartype action_groups: list[~$(python-base-namespace).v2020_10_01.models.ActionGroup] + :vartype action_groups: list[~azure.mgmt.monitor.v2020_10_01.models.ActionGroup] """ _attribute_map = { @@ -68,7 +68,7 @@ class ActionList(_serialization.Model): def __init__(self, *, action_groups: Optional[List["_models.ActionGroup"]] = None, **kwargs: Any) -> None: """ :keyword action_groups: The list of the Action Groups. - :paramtype action_groups: list[~$(python-base-namespace).v2020_10_01.models.ActionGroup] + :paramtype action_groups: list[~azure.mgmt.monitor.v2020_10_01.models.ActionGroup] """ super().__init__(**kwargs) self.action_groups = action_groups @@ -143,9 +143,9 @@ class ActivityLogAlertResource(AzureResource): include at least one item. :vartype scopes: list[str] :ivar condition: The condition that will cause this alert to activate. - :vartype condition: ~$(python-base-namespace).v2020_10_01.models.AlertRuleAllOfCondition + :vartype condition: ~azure.mgmt.monitor.v2020_10_01.models.AlertRuleAllOfCondition :ivar actions: The actions that will activate when the condition is met. - :vartype actions: ~$(python-base-namespace).v2020_10_01.models.ActionList + :vartype actions: ~azure.mgmt.monitor.v2020_10_01.models.ActionList :ivar enabled: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated. :vartype enabled: bool @@ -195,9 +195,9 @@ def __init__( must include at least one item. :paramtype scopes: list[str] :keyword condition: The condition that will cause this alert to activate. - :paramtype condition: ~$(python-base-namespace).v2020_10_01.models.AlertRuleAllOfCondition + :paramtype condition: ~azure.mgmt.monitor.v2020_10_01.models.AlertRuleAllOfCondition :keyword actions: The actions that will activate when the condition is met. - :paramtype actions: ~$(python-base-namespace).v2020_10_01.models.ActionList + :paramtype actions: ~azure.mgmt.monitor.v2020_10_01.models.ActionList :keyword enabled: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log Alert rule is not enabled, then none of its actions will be activated. :paramtype enabled: bool @@ -218,8 +218,7 @@ class AlertRuleAllOfCondition(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar all_of: The list of Activity Log Alert rule conditions. Required. - :vartype all_of: - list[~$(python-base-namespace).v2020_10_01.models.AlertRuleAnyOfOrLeafCondition] + :vartype all_of: list[~azure.mgmt.monitor.v2020_10_01.models.AlertRuleAnyOfOrLeafCondition] """ _validation = { @@ -233,8 +232,7 @@ class AlertRuleAllOfCondition(_serialization.Model): def __init__(self, *, all_of: List["_models.AlertRuleAnyOfOrLeafCondition"], **kwargs: Any) -> None: """ :keyword all_of: The list of Activity Log Alert rule conditions. Required. - :paramtype all_of: - list[~$(python-base-namespace).v2020_10_01.models.AlertRuleAnyOfOrLeafCondition] + :paramtype all_of: list[~azure.mgmt.monitor.v2020_10_01.models.AlertRuleAnyOfOrLeafCondition] """ super().__init__(**kwargs) self.all_of = all_of @@ -318,7 +316,7 @@ class AlertRuleAnyOfOrLeafCondition(AlertRuleLeafCondition): :vartype contains_any: list[str] :ivar any_of: An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met. - :vartype any_of: list[~$(python-base-namespace).v2020_10_01.models.AlertRuleLeafCondition] + :vartype any_of: list[~azure.mgmt.monitor.v2020_10_01.models.AlertRuleLeafCondition] """ _attribute_map = { @@ -351,7 +349,7 @@ def __init__( :paramtype contains_any: list[str] :keyword any_of: An Activity Log Alert rule condition that is met when at least one of its member leaf conditions are met. - :paramtype any_of: list[~$(python-base-namespace).v2020_10_01.models.AlertRuleLeafCondition] + :paramtype any_of: list[~azure.mgmt.monitor.v2020_10_01.models.AlertRuleLeafCondition] """ super().__init__(field=field, equals=equals, contains_any=contains_any, **kwargs) self.any_of = any_of @@ -361,7 +359,7 @@ class AlertRuleList(_serialization.Model): """A list of Activity Log Alert rules. :ivar value: The list of Activity Log Alert rules. - :vartype value: list[~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource] + :vartype value: list[~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -380,7 +378,7 @@ def __init__( ) -> None: """ :keyword value: The list of Activity Log Alert rules. - :paramtype value: list[~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource] + :paramtype value: list[~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py index d6e804b59ed5..51efebd9b92d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,7 +78,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +111,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,7 +144,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -183,7 +178,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -207,7 +202,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ class ActivityLogAlertsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2020_10_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2020_10_01.MonitorManagementClient`'s :attr:`activity_log_alerts` attribute. """ @@ -271,14 +266,13 @@ def create_or_update( :type activity_log_alert_name: str :param activity_log_alert_rule: The Activity Log Alert rule to create or use for the update. Required. - :type activity_log_alert_rule: - ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :type activity_log_alert_rule: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -307,7 +301,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -328,14 +322,14 @@ def create_or_update( :type activity_log_alert_name: str :param activity_log_alert_rule: The Activity Log Alert rule to create or use for the update. Is either a ActivityLogAlertResource type or a IO type. Required. - :type activity_log_alert_rule: - ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource or IO + :type activity_log_alert_rule: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource + or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -349,7 +343,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -416,7 +410,7 @@ def get( :type activity_log_alert_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -430,7 +424,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) request = build_get_request( @@ -495,7 +489,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -550,13 +544,13 @@ def update( :type activity_log_alert_name: str :param activity_log_alert_rule_patch: Parameters supplied to the operation. Required. :type activity_log_alert_rule_patch: - ~$(python-base-namespace).v2020_10_01.models.AlertRulePatchObject + ~azure.mgmt.monitor.v2020_10_01.models.AlertRulePatchObject :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -586,7 +580,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -610,13 +604,13 @@ def update( :param activity_log_alert_rule_patch: Parameters supplied to the operation. Is either a AlertRulePatchObject type or a IO type. Required. :type activity_log_alert_rule_patch: - ~$(python-base-namespace).v2020_10_01.models.AlertRulePatchObject or IO + ~azure.mgmt.monitor.v2020_10_01.models.AlertRulePatchObject or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActivityLogAlertResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :rtype: ~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -630,7 +624,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActivityLogAlertResource] = kwargs.pop("cls", None) @@ -688,13 +682,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActivityLo :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.AlertRuleList] = kwargs.pop("cls", None) error_map = { @@ -778,13 +772,13 @@ def list_by_resource_group( :return: An iterator like instance of either ActivityLogAlertResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2020_10_01.models.ActivityLogAlertResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2020-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2020-10-01")) cls: ClsType[_models.AlertRuleList] = kwargs.pop("cls", None) error_map = { 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 adc1dbfb97de..7299d9a2317f 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", "2021-04-01") + api_version: str = kwargs.pop("api_version", "2021-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index b4d07f21f5b4..6dc1fd7840cb 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_management_client.py @@ -31,13 +31,13 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations :vartype data_collection_endpoints: - $(python-base-namespace).v2021_04_01.operations.DataCollectionEndpointsOperations + azure.mgmt.monitor.v2021_04_01.operations.DataCollectionEndpointsOperations :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations :vartype data_collection_rule_associations: - $(python-base-namespace).v2021_04_01.operations.DataCollectionRuleAssociationsOperations + azure.mgmt.monitor.v2021_04_01.operations.DataCollectionRuleAssociationsOperations :ivar data_collection_rules: DataCollectionRulesOperations operations :vartype data_collection_rules: - $(python-base-namespace).v2021_04_01.operations.DataCollectionRulesOperations + azure.mgmt.monitor.v2021_04_01.operations.DataCollectionRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 4b28acf65ca4..65ce5c443680 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", "2021-04-01") + api_version: str = kwargs.pop("api_version", "2021-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index f3b7cf2f9c1a..29882f3f0543 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_management_client.py @@ -31,13 +31,13 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations :vartype data_collection_endpoints: - $(python-base-namespace).v2021_04_01.aio.operations.DataCollectionEndpointsOperations + azure.mgmt.monitor.v2021_04_01.aio.operations.DataCollectionEndpointsOperations :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations :vartype data_collection_rule_associations: - $(python-base-namespace).v2021_04_01.aio.operations.DataCollectionRuleAssociationsOperations + azure.mgmt.monitor.v2021_04_01.aio.operations.DataCollectionRuleAssociationsOperations :ivar data_collection_rules: DataCollectionRulesOperations operations :vartype data_collection_rules: - $(python-base-namespace).v2021_04_01.aio.operations.DataCollectionRulesOperations + azure.mgmt.monitor.v2021_04_01.aio.operations.DataCollectionRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py index fa57e3973766..ecffa05e321a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class DataCollectionEndpointsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_04_01.aio.MonitorManagementClient`'s :attr:`data_collection_endpoints` attribute. """ @@ -80,13 +75,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -168,13 +163,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -261,7 +256,7 @@ async def get( :type data_collection_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -275,7 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -334,13 +329,13 @@ async def create( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :type body: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -371,7 +366,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -395,13 +390,13 @@ async def create( :type data_collection_endpoint_name: str :param body: The payload. Is either a DataCollectionEndpointResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource or IO + :type body: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -415,7 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -493,13 +488,13 @@ async def update( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2021_04_01.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -530,7 +525,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -554,13 +549,13 @@ async def update( :type data_collection_endpoint_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2021_04_01.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -574,7 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py index 2b5caca4608e..c46841eecdfe 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -37,10 +36,6 @@ build_list_by_rule_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +46,7 @@ class DataCollectionRuleAssociationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_04_01.aio.MonitorManagementClient`'s :attr:`data_collection_rule_associations` attribute. """ @@ -78,13 +73,13 @@ def list_by_resource( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -173,13 +168,13 @@ def list_by_rule( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -268,8 +263,7 @@ async def get( :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -283,7 +277,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -340,14 +334,13 @@ async def create( :type association_name: str :param body: The payload. Default value is None. :type body: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -376,8 +369,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -400,15 +392,13 @@ async def create( :param body: The payload. Is either a DataCollectionRuleAssociationProxyOnlyResource type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource or - IO + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -422,7 +412,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -506,7 +496,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py index 5882cad42ac4..45c77f5cb0c8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class DataCollectionRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_04_01.aio.MonitorManagementClient`'s :attr:`data_collection_rules` attribute. """ @@ -80,13 +75,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -168,13 +163,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -261,7 +256,7 @@ async def get( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -275,7 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -334,13 +329,13 @@ async def create( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :type body: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -371,7 +366,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -395,13 +390,13 @@ async def create( :type data_collection_rule_name: str :param body: The payload. Is either a DataCollectionRuleResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource or IO + :type body: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -415,7 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -493,13 +488,13 @@ async def update( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2021_04_01.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -530,7 +525,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -554,13 +549,13 @@ async def update( :type data_collection_rule_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2021_04_01.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -574,7 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( 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 ed6b225af053..d1e806110d5f 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 @@ -83,17 +83,16 @@ class DataCollectionEndpoint(_serialization.Model): :vartype immutable_id: str :ivar configuration_access: The endpoint used by agents to access their configuration. :vartype configuration_access: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointConfigurationAccess :ivar logs_ingestion: The endpoint used by clients to ingest logs. :vartype logs_ingestion: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointLogsIngestion :ivar network_acls: Network access control rules for the endpoints. - :vartype network_acls: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + :vartype network_acls: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointNetworkAcls :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointProvisioningState + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionEndpointProvisioningState """ _validation = { @@ -127,13 +126,13 @@ def __init__( :paramtype immutable_id: str :keyword configuration_access: The endpoint used by agents to access their configuration. :paramtype configuration_access: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointConfigurationAccess :keyword logs_ingestion: The endpoint used by clients to ingest logs. :paramtype logs_ingestion: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointLogsIngestion :keyword network_acls: Network access control rules for the endpoints. :paramtype network_acls: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointNetworkAcls """ super().__init__(**kwargs) self.description = description @@ -217,7 +216,7 @@ class NetworkRuleSet(_serialization.Model): :ivar public_network_access: The configuration to set whether network access from public internet to the endpoints are allowed. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or - ~$(python-base-namespace).v2021_04_01.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2021_04_01.models.KnownPublicNetworkAccessOptions """ _attribute_map = { @@ -234,7 +233,7 @@ def __init__( :keyword public_network_access: The configuration to set whether network access from public internet to the endpoints are allowed. Known values are: "Enabled" and "Disabled". :paramtype public_network_access: str or - ~$(python-base-namespace).v2021_04_01.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2021_04_01.models.KnownPublicNetworkAccessOptions """ super().__init__(**kwargs) self.public_network_access = public_network_access @@ -246,7 +245,7 @@ class DataCollectionEndpointNetworkAcls(NetworkRuleSet): :ivar public_network_access: The configuration to set whether network access from public internet to the endpoints are allowed. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or - ~$(python-base-namespace).v2021_04_01.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2021_04_01.models.KnownPublicNetworkAccessOptions """ _attribute_map = { @@ -263,7 +262,7 @@ def __init__( :keyword public_network_access: The configuration to set whether network access from public internet to the endpoints are allowed. Known values are: "Enabled" and "Disabled". :paramtype public_network_access: str or - ~$(python-base-namespace).v2021_04_01.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2021_04_01.models.KnownPublicNetworkAccessOptions """ super().__init__(public_network_access=public_network_access, **kwargs) @@ -281,7 +280,7 @@ class DataCollectionEndpointResource(_serialization.Model): # pylint: disable=t :vartype tags: dict[str, str] :ivar kind: The kind of the resource. Known values are: "Linux" and "Windows". :vartype kind: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointResourceKind + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionEndpointResourceKind :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -292,7 +291,7 @@ class DataCollectionEndpointResource(_serialization.Model): # pylint: disable=t :vartype etag: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResourceSystemData + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResourceSystemData :ivar description: Description of the data collection endpoint. :vartype description: str :ivar immutable_id: The immutable ID of this data collection endpoint resource. This property @@ -300,17 +299,16 @@ class DataCollectionEndpointResource(_serialization.Model): # pylint: disable=t :vartype immutable_id: str :ivar configuration_access: The endpoint used by agents to access their configuration. :vartype configuration_access: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointConfigurationAccess :ivar logs_ingestion: The endpoint used by clients to ingest logs. :vartype logs_ingestion: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointLogsIngestion :ivar network_acls: Network access control rules for the endpoints. - :vartype network_acls: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + :vartype network_acls: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointNetworkAcls :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointProvisioningState + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionEndpointProvisioningState """ _validation = { @@ -363,7 +361,7 @@ def __init__( :paramtype tags: dict[str, str] :keyword kind: The kind of the resource. Known values are: "Linux" and "Windows". :paramtype kind: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointResourceKind + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionEndpointResourceKind :keyword description: Description of the data collection endpoint. :paramtype description: str :keyword immutable_id: The immutable ID of this data collection endpoint resource. This @@ -371,13 +369,13 @@ def __init__( :paramtype immutable_id: str :keyword configuration_access: The endpoint used by agents to access their configuration. :paramtype configuration_access: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointConfigurationAccess :keyword logs_ingestion: The endpoint used by clients to ingest logs. :paramtype logs_ingestion: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointLogsIngestion :keyword network_acls: Network access control rules for the endpoints. :paramtype network_acls: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointNetworkAcls """ super().__init__(**kwargs) self.location = location @@ -402,8 +400,7 @@ class DataCollectionEndpointResourceListResult(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: A list of resources. Required. - :vartype value: - list[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource] + :vartype value: list[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -422,8 +419,7 @@ def __init__( ) -> None: """ :keyword value: A list of resources. Required. - :paramtype value: - list[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource] + :paramtype value: list[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -444,17 +440,16 @@ class DataCollectionEndpointResourceProperties(DataCollectionEndpoint): :vartype immutable_id: str :ivar configuration_access: The endpoint used by agents to access their configuration. :vartype configuration_access: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointConfigurationAccess :ivar logs_ingestion: The endpoint used by clients to ingest logs. :vartype logs_ingestion: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointLogsIngestion :ivar network_acls: Network access control rules for the endpoints. - :vartype network_acls: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + :vartype network_acls: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointNetworkAcls :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointProvisioningState + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionEndpointProvisioningState """ _validation = { @@ -488,13 +483,13 @@ def __init__( :paramtype immutable_id: str :keyword configuration_access: The endpoint used by agents to access their configuration. :paramtype configuration_access: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointConfigurationAccess :keyword logs_ingestion: The endpoint used by clients to ingest logs. :paramtype logs_ingestion: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointLogsIngestion :keyword network_acls: Network access control rules for the endpoints. :paramtype network_acls: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointNetworkAcls """ super().__init__( description=description, @@ -513,15 +508,14 @@ class SystemData(_serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -551,15 +545,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -579,15 +572,14 @@ class DataCollectionEndpointResourceSystemData(SystemData): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -617,15 +609,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -652,17 +643,15 @@ class DataCollectionRule(_serialization.Model): :ivar data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :vartype data_sources: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :vartype data_sources: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. - :vartype destinations: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :vartype destinations: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2021_04_01.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -694,13 +683,11 @@ def __init__( :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :paramtype data_sources: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :paramtype data_sources: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. - :paramtype destinations: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :paramtype destinations: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2021_04_01.models.DataFlow] """ super().__init__(**kwargs) self.description = description @@ -727,7 +714,7 @@ class DataCollectionRuleAssociation(_serialization.Model): :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -781,7 +768,7 @@ class DataCollectionRuleAssociationProxyOnlyResource(_serialization.Model): :vartype etag: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResourceSystemData + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResourceSystemData :ivar description: Description of the association. :vartype description: str :ivar data_collection_rule_id: The resource ID of the data collection rule that is to be @@ -793,7 +780,7 @@ class DataCollectionRuleAssociationProxyOnlyResource(_serialization.Model): :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -854,7 +841,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceListResult(_serialization.Mo :ivar value: A list of resources. Required. :vartype value: - list[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] + list[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -878,7 +865,7 @@ def __init__( """ :keyword value: A list of resources. Required. :paramtype value: - list[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] + list[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -903,7 +890,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRul :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -950,15 +937,14 @@ class DataCollectionRuleAssociationProxyOnlyResourceSystemData(SystemData): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -988,15 +974,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -1016,14 +1001,14 @@ class DataSourcesSpec(_serialization.Model): :ivar performance_counters: The list of performance counter data source configurations. :vartype performance_counters: - list[~$(python-base-namespace).v2021_04_01.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2021_04_01.models.PerfCounterDataSource] :ivar windows_event_logs: The list of Windows Event Log data source configurations. :vartype windows_event_logs: - list[~$(python-base-namespace).v2021_04_01.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2021_04_01.models.WindowsEventLogDataSource] :ivar syslog: The list of Syslog data source configurations. - :vartype syslog: list[~$(python-base-namespace).v2021_04_01.models.SyslogDataSource] + :vartype syslog: list[~azure.mgmt.monitor.v2021_04_01.models.SyslogDataSource] :ivar extensions: The list of Azure VM extension data source configurations. - :vartype extensions: list[~$(python-base-namespace).v2021_04_01.models.ExtensionDataSource] + :vartype extensions: list[~azure.mgmt.monitor.v2021_04_01.models.ExtensionDataSource] """ _attribute_map = { @@ -1045,14 +1030,14 @@ def __init__( """ :keyword performance_counters: The list of performance counter data source configurations. :paramtype performance_counters: - list[~$(python-base-namespace).v2021_04_01.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2021_04_01.models.PerfCounterDataSource] :keyword windows_event_logs: The list of Windows Event Log data source configurations. :paramtype windows_event_logs: - list[~$(python-base-namespace).v2021_04_01.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2021_04_01.models.WindowsEventLogDataSource] :keyword syslog: The list of Syslog data source configurations. - :paramtype syslog: list[~$(python-base-namespace).v2021_04_01.models.SyslogDataSource] + :paramtype syslog: list[~azure.mgmt.monitor.v2021_04_01.models.SyslogDataSource] :keyword extensions: The list of Azure VM extension data source configurations. - :paramtype extensions: list[~$(python-base-namespace).v2021_04_01.models.ExtensionDataSource] + :paramtype extensions: list[~azure.mgmt.monitor.v2021_04_01.models.ExtensionDataSource] """ super().__init__(**kwargs) self.performance_counters = performance_counters @@ -1068,14 +1053,14 @@ class DataCollectionRuleDataSources(DataSourcesSpec): :ivar performance_counters: The list of performance counter data source configurations. :vartype performance_counters: - list[~$(python-base-namespace).v2021_04_01.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2021_04_01.models.PerfCounterDataSource] :ivar windows_event_logs: The list of Windows Event Log data source configurations. :vartype windows_event_logs: - list[~$(python-base-namespace).v2021_04_01.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2021_04_01.models.WindowsEventLogDataSource] :ivar syslog: The list of Syslog data source configurations. - :vartype syslog: list[~$(python-base-namespace).v2021_04_01.models.SyslogDataSource] + :vartype syslog: list[~azure.mgmt.monitor.v2021_04_01.models.SyslogDataSource] :ivar extensions: The list of Azure VM extension data source configurations. - :vartype extensions: list[~$(python-base-namespace).v2021_04_01.models.ExtensionDataSource] + :vartype extensions: list[~azure.mgmt.monitor.v2021_04_01.models.ExtensionDataSource] """ _attribute_map = { @@ -1097,14 +1082,14 @@ def __init__( """ :keyword performance_counters: The list of performance counter data source configurations. :paramtype performance_counters: - list[~$(python-base-namespace).v2021_04_01.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2021_04_01.models.PerfCounterDataSource] :keyword windows_event_logs: The list of Windows Event Log data source configurations. :paramtype windows_event_logs: - list[~$(python-base-namespace).v2021_04_01.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2021_04_01.models.WindowsEventLogDataSource] :keyword syslog: The list of Syslog data source configurations. - :paramtype syslog: list[~$(python-base-namespace).v2021_04_01.models.SyslogDataSource] + :paramtype syslog: list[~azure.mgmt.monitor.v2021_04_01.models.SyslogDataSource] :keyword extensions: The list of Azure VM extension data source configurations. - :paramtype extensions: list[~$(python-base-namespace).v2021_04_01.models.ExtensionDataSource] + :paramtype extensions: list[~azure.mgmt.monitor.v2021_04_01.models.ExtensionDataSource] """ super().__init__( performance_counters=performance_counters, @@ -1119,11 +1104,10 @@ class DestinationsSpec(_serialization.Model): """Specification of destinations that can be used in data flows. :ivar log_analytics: List of Log Analytics destinations. - :vartype log_analytics: - list[~$(python-base-namespace).v2021_04_01.models.LogAnalyticsDestination] + :vartype log_analytics: list[~azure.mgmt.monitor.v2021_04_01.models.LogAnalyticsDestination] :ivar azure_monitor_metrics: Azure Monitor Metrics destination. :vartype azure_monitor_metrics: - ~$(python-base-namespace).v2021_04_01.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2021_04_01.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { @@ -1140,11 +1124,10 @@ def __init__( ) -> None: """ :keyword log_analytics: List of Log Analytics destinations. - :paramtype log_analytics: - list[~$(python-base-namespace).v2021_04_01.models.LogAnalyticsDestination] + :paramtype log_analytics: list[~azure.mgmt.monitor.v2021_04_01.models.LogAnalyticsDestination] :keyword azure_monitor_metrics: Azure Monitor Metrics destination. :paramtype azure_monitor_metrics: - ~$(python-base-namespace).v2021_04_01.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2021_04_01.models.DestinationsSpecAzureMonitorMetrics """ super().__init__(**kwargs) self.log_analytics = log_analytics @@ -1155,11 +1138,10 @@ class DataCollectionRuleDestinations(DestinationsSpec): """The specification of destinations. :ivar log_analytics: List of Log Analytics destinations. - :vartype log_analytics: - list[~$(python-base-namespace).v2021_04_01.models.LogAnalyticsDestination] + :vartype log_analytics: list[~azure.mgmt.monitor.v2021_04_01.models.LogAnalyticsDestination] :ivar azure_monitor_metrics: Azure Monitor Metrics destination. :vartype azure_monitor_metrics: - ~$(python-base-namespace).v2021_04_01.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2021_04_01.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { @@ -1176,11 +1158,10 @@ def __init__( ) -> None: """ :keyword log_analytics: List of Log Analytics destinations. - :paramtype log_analytics: - list[~$(python-base-namespace).v2021_04_01.models.LogAnalyticsDestination] + :paramtype log_analytics: list[~azure.mgmt.monitor.v2021_04_01.models.LogAnalyticsDestination] :keyword azure_monitor_metrics: Azure Monitor Metrics destination. :paramtype azure_monitor_metrics: - ~$(python-base-namespace).v2021_04_01.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2021_04_01.models.DestinationsSpecAzureMonitorMetrics """ super().__init__(log_analytics=log_analytics, azure_monitor_metrics=azure_monitor_metrics, **kwargs) @@ -1198,7 +1179,7 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m :vartype tags: dict[str, str] :ivar kind: The kind of the resource. Known values are: "Linux" and "Windows". :vartype kind: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleResourceKind + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionRuleResourceKind :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -1209,7 +1190,7 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m :vartype etag: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResourceSystemData + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResourceSystemData :ivar description: Description of the data collection rule. :vartype description: str :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. @@ -1217,17 +1198,15 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m :ivar data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :vartype data_sources: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :vartype data_sources: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. - :vartype destinations: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :vartype destinations: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2021_04_01.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -1277,19 +1256,17 @@ def __init__( :paramtype tags: dict[str, str] :keyword kind: The kind of the resource. Known values are: "Linux" and "Windows". :paramtype kind: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleResourceKind + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionRuleResourceKind :keyword description: Description of the data collection rule. :paramtype description: str :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :paramtype data_sources: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :paramtype data_sources: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. - :paramtype destinations: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :paramtype destinations: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2021_04_01.models.DataFlow] """ super().__init__(**kwargs) self.location = location @@ -1314,7 +1291,7 @@ class DataCollectionRuleResourceListResult(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: A list of resources. Required. - :vartype value: list[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -1333,7 +1310,7 @@ def __init__( ) -> None: """ :keyword value: A list of resources. Required. - :paramtype value: list[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource] + :paramtype value: list[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -1354,17 +1331,15 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): :ivar data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :vartype data_sources: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :vartype data_sources: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. - :vartype destinations: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :vartype destinations: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2021_04_01.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2021_04_01.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -1396,13 +1371,11 @@ def __init__( :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :paramtype data_sources: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :paramtype data_sources: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. - :paramtype destinations: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :paramtype destinations: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2021_04_01.models.DataFlow] """ super().__init__( description=description, @@ -1420,15 +1393,14 @@ class DataCollectionRuleResourceSystemData(SystemData): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -1458,15 +1430,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.monitor.v2021_04_01.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -1485,8 +1456,7 @@ class DataFlow(_serialization.Model): """Definition of which streams are sent to which destinations. :ivar streams: List of streams for this data flow. - :vartype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataFlowStreams] + :vartype streams: list[str or ~azure.mgmt.monitor.v2021_04_01.models.KnownDataFlowStreams] :ivar destinations: List of destinations for this data flow. :vartype destinations: list[str] """ @@ -1505,8 +1475,7 @@ def __init__( ) -> None: """ :keyword streams: List of streams for this data flow. - :paramtype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownDataFlowStreams] + :paramtype streams: list[str or ~azure.mgmt.monitor.v2021_04_01.models.KnownDataFlowStreams] :keyword destinations: List of destinations for this data flow. :paramtype destinations: list[str] """ @@ -1578,10 +1547,9 @@ class ErrorDetail(_serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~$(python-base-namespace).v2021_04_01.models.ErrorDetail] + :vartype details: list[~azure.mgmt.monitor.v2021_04_01.models.ErrorDetail] :ivar additional_info: The error additional info. - :vartype additional_info: - list[~$(python-base-namespace).v2021_04_01.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.monitor.v2021_04_01.models.ErrorAdditionalInfo] """ _validation = { @@ -1615,7 +1583,7 @@ class ErrorResponseCommonV2(_serialization.Model): operations. (This also follows the OData error response format.). :ivar error: The error object. - :vartype error: ~$(python-base-namespace).v2021_04_01.models.ErrorDetail + :vartype error: ~azure.mgmt.monitor.v2021_04_01.models.ErrorDetail """ _attribute_map = { @@ -1625,7 +1593,7 @@ class ErrorResponseCommonV2(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~$(python-base-namespace).v2021_04_01.models.ErrorDetail + :paramtype error: ~azure.mgmt.monitor.v2021_04_01.models.ErrorDetail """ super().__init__(**kwargs) self.error = error @@ -1642,7 +1610,7 @@ class ExtensionDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownExtensionDataSourceStreams] + ~azure.mgmt.monitor.v2021_04_01.models.KnownExtensionDataSourceStreams] :ivar extension_name: The name of the VM extension. Required. :vartype extension_name: str :ivar extension_settings: The extension settings. The format is specific for particular @@ -1683,7 +1651,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownExtensionDataSourceStreams] + ~azure.mgmt.monitor.v2021_04_01.models.KnownExtensionDataSourceStreams] :keyword extension_name: The name of the VM extension. Required. :paramtype extension_name: str :keyword extension_settings: The extension settings. The format is specific for particular @@ -1755,7 +1723,7 @@ class PerfCounterDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownPerfCounterDataSourceStreams] + ~azure.mgmt.monitor.v2021_04_01.models.KnownPerfCounterDataSourceStreams] :ivar sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). :vartype sampling_frequency_in_seconds: int @@ -1791,7 +1759,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownPerfCounterDataSourceStreams] + ~azure.mgmt.monitor.v2021_04_01.models.KnownPerfCounterDataSourceStreams] :keyword sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). :paramtype sampling_frequency_in_seconds: int @@ -1840,13 +1808,13 @@ class SyslogDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceStreams] + ~azure.mgmt.monitor.v2021_04_01.models.KnownSyslogDataSourceStreams] :ivar facility_names: The list of facility names. :vartype facility_names: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceFacilityNames] + ~azure.mgmt.monitor.v2021_04_01.models.KnownSyslogDataSourceFacilityNames] :ivar log_levels: The log levels to collect. :vartype log_levels: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceLogLevels] + ~azure.mgmt.monitor.v2021_04_01.models.KnownSyslogDataSourceLogLevels] :ivar name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -1874,13 +1842,13 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceStreams] + ~azure.mgmt.monitor.v2021_04_01.models.KnownSyslogDataSourceStreams] :keyword facility_names: The list of facility names. :paramtype facility_names: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceFacilityNames] + ~azure.mgmt.monitor.v2021_04_01.models.KnownSyslogDataSourceFacilityNames] :keyword log_levels: The log levels to collect. :paramtype log_levels: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceLogLevels] + ~azure.mgmt.monitor.v2021_04_01.models.KnownSyslogDataSourceLogLevels] :keyword name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -1901,7 +1869,7 @@ class WindowsEventLogDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownWindowsEventLogDataSourceStreams] + ~azure.mgmt.monitor.v2021_04_01.models.KnownWindowsEventLogDataSourceStreams] :ivar x_path_queries: A list of Windows Event Log queries in XPATH format. :vartype x_path_queries: list[str] :ivar name: A friendly name for the data source. @@ -1929,7 +1897,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2021_04_01.models.KnownWindowsEventLogDataSourceStreams] + ~azure.mgmt.monitor.v2021_04_01.models.KnownWindowsEventLogDataSourceStreams] :keyword x_path_queries: A list of Windows Event Log queries in XPATH format. :paramtype x_path_queries: list[str] :keyword name: A friendly name for the data source. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py index 45cc55333d1d..275196ff00b7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,7 +133,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,7 +171,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -214,7 +209,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -249,7 +244,7 @@ class DataCollectionEndpointsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_04_01.MonitorManagementClient`'s :attr:`data_collection_endpoints` attribute. """ @@ -277,13 +272,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -365,13 +360,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -458,7 +453,7 @@ def get( :type data_collection_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -472,7 +467,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -531,13 +526,13 @@ def create( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :type body: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -568,7 +563,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -592,13 +587,13 @@ def create( :type data_collection_endpoint_name: str :param body: The payload. Is either a DataCollectionEndpointResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource or IO + :type body: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -612,7 +607,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -690,13 +685,13 @@ def update( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2021_04_01.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -727,7 +722,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -751,13 +746,13 @@ def update( :type data_collection_endpoint_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2021_04_01.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -771,7 +766,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -854,7 +849,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py index 4929b7bb0159..325f312c5f89 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,7 +66,7 @@ def build_list_by_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -102,7 +97,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -129,7 +124,7 @@ def build_create_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -159,7 +154,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -188,7 +183,7 @@ class DataCollectionRuleAssociationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_04_01.MonitorManagementClient`'s :attr:`data_collection_rule_associations` attribute. """ @@ -215,13 +210,13 @@ def list_by_resource( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -310,13 +305,13 @@ def list_by_rule( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -405,8 +400,7 @@ def get( :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -420,7 +414,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -477,14 +471,13 @@ def create( :type association_name: str :param body: The payload. Default value is None. :type body: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -513,8 +506,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -537,15 +529,13 @@ def create( :param body: The payload. Is either a DataCollectionRuleAssociationProxyOnlyResource type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource or - IO + ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -559,7 +549,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -643,7 +633,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py index bc3d2c21a56b..0442719232c5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -136,7 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -172,7 +167,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -208,7 +203,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -241,7 +236,7 @@ class DataCollectionRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_04_01.MonitorManagementClient`'s :attr:`data_collection_rules` attribute. """ @@ -269,13 +264,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -357,13 +352,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -450,7 +445,7 @@ def get( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -464,7 +459,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -523,13 +518,13 @@ def create( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :type body: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -560,7 +555,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -584,13 +579,13 @@ def create( :type data_collection_rule_name: str :param body: The payload. Is either a DataCollectionRuleResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource or IO + :type body: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -604,7 +599,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -682,13 +677,13 @@ def update( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2021_04_01.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -719,7 +714,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -743,13 +738,13 @@ def update( :type data_collection_rule_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2021_04_01.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2021_04_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -763,7 +758,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -846,7 +841,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_configuration.py index 46364adf795c..7f084d2540de 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", "2021-05-01") + api_version: str = kwargs.pop("api_version", "2021-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_monitor_management_client.py index 67fe95a9388a..448ef59afa73 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_monitor_management_client.py @@ -26,12 +26,12 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar metrics: MetricsOperations operations - :vartype metrics: $(python-base-namespace).v2021_05_01.operations.MetricsOperations + :vartype metrics: azure.mgmt.monitor.v2021_05_01.operations.MetricsOperations :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2021_05_01.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2021_05_01.operations.MetricDefinitionsOperations :ivar operations: Operations operations - :vartype operations: $(python-base-namespace).v2021_05_01.operations.Operations + :vartype operations: azure.mgmt.monitor.v2021_05_01.operations.Operations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_configuration.py index ef321a5b69f0..f210214ef4bf 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", "2021-05-01") + api_version: str = kwargs.pop("api_version", "2021-05-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_monitor_management_client.py index 0df1e752b4a2..2a774106d536 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/_monitor_management_client.py @@ -26,12 +26,12 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar metrics: MetricsOperations operations - :vartype metrics: $(python-base-namespace).v2021_05_01.aio.operations.MetricsOperations + :vartype metrics: azure.mgmt.monitor.v2021_05_01.aio.operations.MetricsOperations :ivar metric_definitions: MetricDefinitionsOperations operations :vartype metric_definitions: - $(python-base-namespace).v2021_05_01.aio.operations.MetricDefinitionsOperations + azure.mgmt.monitor.v2021_05_01.aio.operations.MetricDefinitionsOperations :ivar operations: Operations operations - :vartype operations: $(python-base-namespace).v2021_05_01.aio.operations.Operations + :vartype operations: azure.mgmt.monitor.v2021_05_01.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metric_definitions_operations.py index 8ef08ccc8155..3979d162f2f3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._metric_definitions_operations import build_list_at_subscription_scope_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01.aio.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -72,13 +67,13 @@ def list_at_subscription_scope( :return: An iterator like instance of either SubscriptionScopeMetricDefinition or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricDefinition] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.SubscriptionScopeMetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { @@ -165,13 +160,13 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01.models.MetricDefinition] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_05_01.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metrics_operations.py index 4726fa6aabce..c91e57bd95da 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -33,10 +32,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ class MetricsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01.aio.MonitorManagementClient`'s :attr:`metrics` attribute. """ @@ -113,7 +108,7 @@ async def list_at_subscription_scope( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -128,7 +123,7 @@ async def list_at_subscription_scope( :type validate_dimensions: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionScopeMetricResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -142,7 +137,7 @@ async def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.SubscriptionScopeMetricResponse] = kwargs.pop("cls", None) request = build_list_at_subscription_scope_request( @@ -247,7 +242,7 @@ async def list_at_subscription_scope_post( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -262,13 +257,13 @@ async def list_at_subscription_scope_post( :type validate_dimensions: bool :param body: Parameters serialized in the body. Default value is None. :type body: - ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricsRequestBodyParameters + ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricsRequestBodyParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionScopeMetricResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricResponse :raises ~azure.core.exceptions.HttpResponseError: """ @@ -329,7 +324,7 @@ async def list_at_subscription_scope_post( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -349,7 +344,7 @@ async def list_at_subscription_scope_post( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionScopeMetricResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricResponse :raises ~azure.core.exceptions.HttpResponseError: """ @@ -408,7 +403,7 @@ async def list_at_subscription_scope_post( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -424,14 +419,13 @@ async def list_at_subscription_scope_post( :param body: Parameters serialized in the body. Is either a SubscriptionScopeMetricsRequestBodyParameters type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricsRequestBodyParameters or - IO + ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricsRequestBodyParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionScopeMetricResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -445,7 +439,7 @@ async def list_at_subscription_scope_post( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionScopeMetricResponse] = kwargs.pop("cls", None) @@ -561,7 +555,7 @@ async def list( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.ResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -576,7 +570,7 @@ async def list( :type validate_dimensions: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: Response or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.Response + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.Response :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -590,7 +584,7 @@ async def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_operations.py index 5a7aff5aebdd..81c47663e491 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/aio/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class Operations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01.aio.MonitorManagementClient`'s :attr:`operations` attribute. """ @@ -61,7 +56,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult: :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.OperationListResult + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.OperationListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -75,7 +70,7 @@ async def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/models/_models_py3.py index 007a1477c08f..11c8187396fc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/models/_models_py3.py @@ -86,7 +86,7 @@ class ErrorContract(_serialization.Model): operations. (This also follows the OData error response format.). :ivar error: The error object. - :vartype error: ~$(python-base-namespace).v2021_05_01.models.ErrorResponse + :vartype error: ~azure.mgmt.monitor.v2021_05_01.models.ErrorResponse """ _attribute_map = { @@ -96,7 +96,7 @@ class ErrorContract(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorResponse"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~$(python-base-namespace).v2021_05_01.models.ErrorResponse + :paramtype error: ~azure.mgmt.monitor.v2021_05_01.models.ErrorResponse """ super().__init__(**kwargs) self.error = error @@ -203,7 +203,7 @@ class MetadataValue(_serialization.Model): """Represents a metric metadata value. :ivar name: the name of the metadata. - :vartype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :ivar value: the value of the metadata. :vartype value: str """ @@ -218,7 +218,7 @@ def __init__( ) -> None: """ :keyword name: the name of the metadata. - :paramtype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :keyword value: the value of the metadata. :paramtype value: str """ @@ -238,7 +238,7 @@ class Metric(_serialization.Model): :vartype type: str :ivar name: the name and the display name of the metric, i.e. it is localizable string. Required. - :vartype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :ivar display_description: Detailed description of this metric. :vartype display_description: str :ivar error_code: 'Success' or the error details on query failures for this metric. @@ -248,9 +248,9 @@ class Metric(_serialization.Model): :ivar unit: The unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2021_05_01.models.Unit + :vartype unit: str or ~azure.mgmt.monitor.v2021_05_01.models.Unit :ivar timeseries: the time series returned when a data query is performed. Required. - :vartype timeseries: list[~$(python-base-namespace).v2021_05_01.models.TimeSeriesElement] + :vartype timeseries: list[~azure.mgmt.monitor.v2021_05_01.models.TimeSeriesElement] """ _validation = { @@ -292,7 +292,7 @@ def __init__( :paramtype type: str :keyword name: the name and the display name of the metric, i.e. it is localizable string. Required. - :paramtype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :keyword display_description: Detailed description of this metric. :paramtype display_description: str :keyword error_code: 'Success' or the error details on query failures for this metric. @@ -302,9 +302,9 @@ def __init__( :keyword unit: The unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2021_05_01.models.Unit + :paramtype unit: str or ~azure.mgmt.monitor.v2021_05_01.models.Unit :keyword timeseries: the time series returned when a data query is performed. Required. - :paramtype timeseries: list[~$(python-base-namespace).v2021_05_01.models.TimeSeriesElement] + :paramtype timeseries: list[~azure.mgmt.monitor.v2021_05_01.models.TimeSeriesElement] """ super().__init__(**kwargs) self.id = id @@ -364,35 +364,34 @@ class MetricDefinition(_serialization.Model): # pylint: disable=too-many-instan :ivar namespace: the namespace the metric belongs to. :vartype namespace: str :ivar name: the name and the display name of the metric, i.e. it is a localizable string. - :vartype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :ivar display_description: Detailed description of this metric. :vartype display_description: str :ivar category: Custom category name for this metric. :vartype category: str :ivar metric_class: The class of the metric. Known values are: "Availability", "Transactions", "Errors", "Latency", and "Saturation". - :vartype metric_class: str or ~$(python-base-namespace).v2021_05_01.models.MetricClass + :vartype metric_class: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricClass :ivar unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2021_05_01.models.MetricUnit + :vartype unit: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricUnit :ivar primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :vartype primary_aggregation_type: str or - ~$(python-base-namespace).v2021_05_01.models.AggregationType + ~azure.mgmt.monitor.v2021_05_01.models.AggregationType :ivar supported_aggregation_types: the collection of what aggregation types are supported. :vartype supported_aggregation_types: list[str or - ~$(python-base-namespace).v2021_05_01.models.AggregationType] + ~azure.mgmt.monitor.v2021_05_01.models.AggregationType] :ivar metric_availabilities: the collection of what aggregation intervals are available to be queried. - :vartype metric_availabilities: - list[~$(python-base-namespace).v2021_05_01.models.MetricAvailability] + :vartype metric_availabilities: list[~azure.mgmt.monitor.v2021_05_01.models.MetricAvailability] :ivar id: the resource identifier of the metric definition. :vartype id: str :ivar dimensions: the name and the display name of the dimension, i.e. it is a localizable string. - :vartype dimensions: list[~$(python-base-namespace).v2021_05_01.models.LocalizableString] + :vartype dimensions: list[~azure.mgmt.monitor.v2021_05_01.models.LocalizableString] """ _attribute_map = { @@ -437,35 +436,35 @@ def __init__( :keyword namespace: the namespace the metric belongs to. :paramtype namespace: str :keyword name: the name and the display name of the metric, i.e. it is a localizable string. - :paramtype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :keyword display_description: Detailed description of this metric. :paramtype display_description: str :keyword category: Custom category name for this metric. :paramtype category: str :keyword metric_class: The class of the metric. Known values are: "Availability", "Transactions", "Errors", "Latency", and "Saturation". - :paramtype metric_class: str or ~$(python-base-namespace).v2021_05_01.models.MetricClass + :paramtype metric_class: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricClass :keyword unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2021_05_01.models.MetricUnit + :paramtype unit: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricUnit :keyword primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :paramtype primary_aggregation_type: str or - ~$(python-base-namespace).v2021_05_01.models.AggregationType + ~azure.mgmt.monitor.v2021_05_01.models.AggregationType :keyword supported_aggregation_types: the collection of what aggregation types are supported. :paramtype supported_aggregation_types: list[str or - ~$(python-base-namespace).v2021_05_01.models.AggregationType] + ~azure.mgmt.monitor.v2021_05_01.models.AggregationType] :keyword metric_availabilities: the collection of what aggregation intervals are available to be queried. :paramtype metric_availabilities: - list[~$(python-base-namespace).v2021_05_01.models.MetricAvailability] + list[~azure.mgmt.monitor.v2021_05_01.models.MetricAvailability] :keyword id: the resource identifier of the metric definition. :paramtype id: str :keyword dimensions: the name and the display name of the dimension, i.e. it is a localizable string. - :paramtype dimensions: list[~$(python-base-namespace).v2021_05_01.models.LocalizableString] + :paramtype dimensions: list[~azure.mgmt.monitor.v2021_05_01.models.LocalizableString] """ super().__init__(**kwargs) self.is_dimension_required = is_dimension_required @@ -489,7 +488,7 @@ class MetricDefinitionCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the values for the metric definitions. Required. - :vartype value: list[~$(python-base-namespace).v2021_05_01.models.MetricDefinition] + :vartype value: list[~azure.mgmt.monitor.v2021_05_01.models.MetricDefinition] """ _validation = { @@ -503,7 +502,7 @@ class MetricDefinitionCollection(_serialization.Model): def __init__(self, *, value: List["_models.MetricDefinition"], **kwargs: Any) -> None: """ :keyword value: the values for the metric definitions. Required. - :paramtype value: list[~$(python-base-namespace).v2021_05_01.models.MetricDefinition] + :paramtype value: list[~azure.mgmt.monitor.v2021_05_01.models.MetricDefinition] """ super().__init__(**kwargs) self.value = value @@ -535,7 +534,7 @@ class MetricSpecification(_serialization.Model): # pylint: disable=too-many-ins :ivar category: Category or type of metric. :vartype category: str :ivar dimensions: The dimensions of metric. - :vartype dimensions: list[~$(python-base-namespace).v2021_05_01.models.DimensionProperties] + :vartype dimensions: list[~azure.mgmt.monitor.v2021_05_01.models.DimensionProperties] :ivar fill_gap_with_zero: Property to specify whether to fill empty gaps with zero. :vartype fill_gap_with_zero: bool :ivar internal_metric_name: The internal metric name. @@ -600,7 +599,7 @@ def __init__( :keyword category: Category or type of metric. :paramtype category: str :keyword dimensions: The dimensions of metric. - :paramtype dimensions: list[~$(python-base-namespace).v2021_05_01.models.DimensionProperties] + :paramtype dimensions: list[~azure.mgmt.monitor.v2021_05_01.models.DimensionProperties] :keyword fill_gap_with_zero: Property to specify whether to fill empty gaps with zero. :paramtype fill_gap_with_zero: bool :keyword internal_metric_name: The internal metric name. @@ -698,10 +697,9 @@ class Operation(_serialization.Model): :ivar is_data_action: Property to specify whether the action is a data action. :vartype is_data_action: bool :ivar display: Display metadata associated with the operation. - :vartype display: ~$(python-base-namespace).v2021_05_01.models.OperationDisplay + :vartype display: ~azure.mgmt.monitor.v2021_05_01.models.OperationDisplay :ivar service_specification: One property of operation, include metric specifications. - :vartype service_specification: - ~$(python-base-namespace).v2021_05_01.models.ServiceSpecification + :vartype service_specification: ~azure.mgmt.monitor.v2021_05_01.models.ServiceSpecification """ _attribute_map = { @@ -726,10 +724,9 @@ def __init__( :keyword is_data_action: Property to specify whether the action is a data action. :paramtype is_data_action: bool :keyword display: Display metadata associated with the operation. - :paramtype display: ~$(python-base-namespace).v2021_05_01.models.OperationDisplay + :paramtype display: ~azure.mgmt.monitor.v2021_05_01.models.OperationDisplay :keyword service_specification: One property of operation, include metric specifications. - :paramtype service_specification: - ~$(python-base-namespace).v2021_05_01.models.ServiceSpecification + :paramtype service_specification: ~azure.mgmt.monitor.v2021_05_01.models.ServiceSpecification """ super().__init__(**kwargs) self.name = name @@ -796,7 +793,7 @@ class OperationListResult(_serialization.Model): and a URL link to get the next set of results. :ivar value: List of operations supported by the Microsoft.Insights provider. - :vartype value: list[~$(python-base-namespace).v2021_05_01.models.Operation] + :vartype value: list[~azure.mgmt.monitor.v2021_05_01.models.Operation] :ivar next_link: URL to get the next set of operation list results if there are any. :vartype next_link: str """ @@ -811,7 +808,7 @@ def __init__( ) -> None: """ :keyword value: List of operations supported by the Microsoft.Insights provider. - :paramtype value: list[~$(python-base-namespace).v2021_05_01.models.Operation] + :paramtype value: list[~azure.mgmt.monitor.v2021_05_01.models.Operation] :keyword next_link: URL to get the next set of operation list results if there are any. :paramtype next_link: str """ @@ -840,7 +837,7 @@ class Response(_serialization.Model): :ivar resourceregion: The region of the resource being queried for metrics. :vartype resourceregion: str :ivar value: the value of the collection. Required. - :vartype value: list[~$(python-base-namespace).v2021_05_01.models.Metric] + :vartype value: list[~azure.mgmt.monitor.v2021_05_01.models.Metric] """ _validation = { @@ -885,7 +882,7 @@ def __init__( :keyword resourceregion: The region of the resource being queried for metrics. :paramtype resourceregion: str :keyword value: the value of the collection. Required. - :paramtype value: list[~$(python-base-namespace).v2021_05_01.models.Metric] + :paramtype value: list[~azure.mgmt.monitor.v2021_05_01.models.Metric] """ super().__init__(**kwargs) self.cost = cost @@ -900,11 +897,10 @@ class ServiceSpecification(_serialization.Model): """One property of operation, include log specifications. :ivar log_specifications: Log specifications of operation. - :vartype log_specifications: - list[~$(python-base-namespace).v2021_05_01.models.LogSpecification] + :vartype log_specifications: list[~azure.mgmt.monitor.v2021_05_01.models.LogSpecification] :ivar metric_specifications: Metric specifications of operation. :vartype metric_specifications: - list[~$(python-base-namespace).v2021_05_01.models.MetricSpecification] + list[~azure.mgmt.monitor.v2021_05_01.models.MetricSpecification] :ivar legacy_metric_specifications: Legacy Metric specifications for operation. Deprecated, do not use. :vartype legacy_metric_specifications: JSON @@ -926,11 +922,10 @@ def __init__( ) -> None: """ :keyword log_specifications: Log specifications of operation. - :paramtype log_specifications: - list[~$(python-base-namespace).v2021_05_01.models.LogSpecification] + :paramtype log_specifications: list[~azure.mgmt.monitor.v2021_05_01.models.LogSpecification] :keyword metric_specifications: Metric specifications of operation. :paramtype metric_specifications: - list[~$(python-base-namespace).v2021_05_01.models.MetricSpecification] + list[~azure.mgmt.monitor.v2021_05_01.models.MetricSpecification] :keyword legacy_metric_specifications: Legacy Metric specifications for operation. Deprecated, do not use. :paramtype legacy_metric_specifications: JSON @@ -952,7 +947,7 @@ class SubscriptionScopeMetric(_serialization.Model): :vartype type: str :ivar name: the name and the display name of the metric, i.e. it is localizable string. Required. - :vartype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :ivar display_description: Detailed description of this metric. :vartype display_description: str :ivar error_code: 'Success' or the error details on query failures for this metric. @@ -962,9 +957,9 @@ class SubscriptionScopeMetric(_serialization.Model): :ivar unit: The unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2021_05_01.models.MetricUnit + :vartype unit: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricUnit :ivar timeseries: the time series returned when a data query is performed. Required. - :vartype timeseries: list[~$(python-base-namespace).v2021_05_01.models.TimeSeriesElement] + :vartype timeseries: list[~azure.mgmt.monitor.v2021_05_01.models.TimeSeriesElement] """ _validation = { @@ -1006,7 +1001,7 @@ def __init__( :paramtype type: str :keyword name: the name and the display name of the metric, i.e. it is localizable string. Required. - :paramtype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :keyword display_description: Detailed description of this metric. :paramtype display_description: str :keyword error_code: 'Success' or the error details on query failures for this metric. @@ -1016,9 +1011,9 @@ def __init__( :keyword unit: The unit of the metric. Required. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2021_05_01.models.MetricUnit + :paramtype unit: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricUnit :keyword timeseries: the time series returned when a data query is performed. Required. - :paramtype timeseries: list[~$(python-base-namespace).v2021_05_01.models.TimeSeriesElement] + :paramtype timeseries: list[~azure.mgmt.monitor.v2021_05_01.models.TimeSeriesElement] """ super().__init__(**kwargs) self.id = id @@ -1041,35 +1036,34 @@ class SubscriptionScopeMetricDefinition(_serialization.Model): # pylint: disabl :ivar namespace: the namespace the metric belongs to. :vartype namespace: str :ivar name: the name and the display name of the metric, i.e. it is a localizable string. - :vartype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :vartype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :ivar display_description: Detailed description of this metric. :vartype display_description: str :ivar category: Custom category name for this metric. :vartype category: str :ivar metric_class: The class of the metric. Known values are: "Availability", "Transactions", "Errors", "Latency", and "Saturation". - :vartype metric_class: str or ~$(python-base-namespace).v2021_05_01.models.MetricClass + :vartype metric_class: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricClass :ivar unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :vartype unit: str or ~$(python-base-namespace).v2021_05_01.models.MetricUnit + :vartype unit: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricUnit :ivar primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :vartype primary_aggregation_type: str or - ~$(python-base-namespace).v2021_05_01.models.MetricAggregationType + ~azure.mgmt.monitor.v2021_05_01.models.MetricAggregationType :ivar supported_aggregation_types: the collection of what aggregation types are supported. :vartype supported_aggregation_types: list[str or - ~$(python-base-namespace).v2021_05_01.models.MetricAggregationType] + ~azure.mgmt.monitor.v2021_05_01.models.MetricAggregationType] :ivar metric_availabilities: the collection of what aggregation intervals are available to be queried. - :vartype metric_availabilities: - list[~$(python-base-namespace).v2021_05_01.models.MetricAvailability] + :vartype metric_availabilities: list[~azure.mgmt.monitor.v2021_05_01.models.MetricAvailability] :ivar id: the resource identifier of the metric definition. :vartype id: str :ivar dimensions: the name and the display name of the dimension, i.e. it is a localizable string. - :vartype dimensions: list[~$(python-base-namespace).v2021_05_01.models.LocalizableString] + :vartype dimensions: list[~azure.mgmt.monitor.v2021_05_01.models.LocalizableString] """ _attribute_map = { @@ -1114,35 +1108,35 @@ def __init__( :keyword namespace: the namespace the metric belongs to. :paramtype namespace: str :keyword name: the name and the display name of the metric, i.e. it is a localizable string. - :paramtype name: ~$(python-base-namespace).v2021_05_01.models.LocalizableString + :paramtype name: ~azure.mgmt.monitor.v2021_05_01.models.LocalizableString :keyword display_description: Detailed description of this metric. :paramtype display_description: str :keyword category: Custom category name for this metric. :paramtype category: str :keyword metric_class: The class of the metric. Known values are: "Availability", "Transactions", "Errors", "Latency", and "Saturation". - :paramtype metric_class: str or ~$(python-base-namespace).v2021_05_01.models.MetricClass + :paramtype metric_class: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricClass :keyword unit: the unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". - :paramtype unit: str or ~$(python-base-namespace).v2021_05_01.models.MetricUnit + :paramtype unit: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricUnit :keyword primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". :paramtype primary_aggregation_type: str or - ~$(python-base-namespace).v2021_05_01.models.MetricAggregationType + ~azure.mgmt.monitor.v2021_05_01.models.MetricAggregationType :keyword supported_aggregation_types: the collection of what aggregation types are supported. :paramtype supported_aggregation_types: list[str or - ~$(python-base-namespace).v2021_05_01.models.MetricAggregationType] + ~azure.mgmt.monitor.v2021_05_01.models.MetricAggregationType] :keyword metric_availabilities: the collection of what aggregation intervals are available to be queried. :paramtype metric_availabilities: - list[~$(python-base-namespace).v2021_05_01.models.MetricAvailability] + list[~azure.mgmt.monitor.v2021_05_01.models.MetricAvailability] :keyword id: the resource identifier of the metric definition. :paramtype id: str :keyword dimensions: the name and the display name of the dimension, i.e. it is a localizable string. - :paramtype dimensions: list[~$(python-base-namespace).v2021_05_01.models.LocalizableString] + :paramtype dimensions: list[~azure.mgmt.monitor.v2021_05_01.models.LocalizableString] """ super().__init__(**kwargs) self.is_dimension_required = is_dimension_required @@ -1166,8 +1160,7 @@ class SubscriptionScopeMetricDefinitionCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: The values for the metric definitions. Required. - :vartype value: - list[~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricDefinition] + :vartype value: list[~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricDefinition] """ _validation = { @@ -1182,7 +1175,7 @@ def __init__(self, *, value: List["_models.SubscriptionScopeMetricDefinition"], """ :keyword value: The values for the metric definitions. Required. :paramtype value: - list[~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricDefinition] + list[~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricDefinition] """ super().__init__(**kwargs) self.value = value @@ -1208,7 +1201,7 @@ class SubscriptionScopeMetricResponse(_serialization.Model): :ivar resourceregion: The region of the resource being queried for metrics. :vartype resourceregion: str :ivar value: the value of the collection. Required. - :vartype value: list[~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetric] + :vartype value: list[~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetric] """ _validation = { @@ -1253,7 +1246,7 @@ def __init__( :keyword resourceregion: The region of the resource being queried for metrics. :paramtype resourceregion: str :keyword value: the value of the collection. Required. - :paramtype value: list[~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetric] + :paramtype value: list[~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetric] """ super().__init__(**kwargs) self.cost = cost @@ -1305,7 +1298,7 @@ class SubscriptionScopeMetricsRequestBodyParameters( :ivar result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". - :vartype result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :vartype result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :ivar metric_namespace: Metric namespace where the metrics you want reside. :vartype metric_namespace: str :ivar auto_adjust_timegrain: When set to true, if the timespan passed in is not supported by @@ -1385,7 +1378,7 @@ def __init__( :keyword result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". - :paramtype result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :paramtype result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :keyword metric_namespace: Metric namespace where the metrics you want reside. :paramtype metric_namespace: str :keyword auto_adjust_timegrain: When set to true, if the timespan passed in is not supported by @@ -1416,10 +1409,10 @@ class TimeSeriesElement(_serialization.Model): """A time series result type. The discriminator value is always TimeSeries in this case. :ivar metadatavalues: the metadata values returned if $filter was specified in the call. - :vartype metadatavalues: list[~$(python-base-namespace).v2021_05_01.models.MetadataValue] + :vartype metadatavalues: list[~azure.mgmt.monitor.v2021_05_01.models.MetadataValue] :ivar data: An array of data points representing the metric values. This is only returned if a result type of data is specified. - :vartype data: list[~$(python-base-namespace).v2021_05_01.models.MetricValue] + :vartype data: list[~azure.mgmt.monitor.v2021_05_01.models.MetricValue] """ _attribute_map = { @@ -1436,10 +1429,10 @@ def __init__( ) -> None: """ :keyword metadatavalues: the metadata values returned if $filter was specified in the call. - :paramtype metadatavalues: list[~$(python-base-namespace).v2021_05_01.models.MetadataValue] + :paramtype metadatavalues: list[~azure.mgmt.monitor.v2021_05_01.models.MetadataValue] :keyword data: An array of data points representing the metric values. This is only returned if a result type of data is specified. - :paramtype data: list[~$(python-base-namespace).v2021_05_01.models.MetricValue] + :paramtype data: list[~azure.mgmt.monitor.v2021_05_01.models.MetricValue] """ super().__init__(**kwargs) self.metadatavalues = metadatavalues diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metric_definitions_operations.py index dd7bcbec64db..84e1f46e1794 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metric_definitions_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,7 +42,7 @@ def build_list_at_subscription_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,7 +69,7 @@ def build_list_request(resource_uri: str, *, metricnamespace: Optional[str] = No _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -102,7 +97,7 @@ class MetricDefinitionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01.MonitorManagementClient`'s :attr:`metric_definitions` attribute. """ @@ -130,13 +125,13 @@ def list_at_subscription_scope( :return: An iterator like instance of either SubscriptionScopeMetricDefinition or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricDefinition] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.SubscriptionScopeMetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { @@ -222,14 +217,13 @@ def list( :type metricnamespace: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either MetricDefinition or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01.models.MetricDefinition] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_05_01.models.MetricDefinition] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.MetricDefinitionCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metrics_operations.py index 399d0ad7f7a6..939cc1fa73f0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_metrics_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, overload from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -60,7 +55,7 @@ def build_list_at_subscription_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +98,7 @@ def build_list_at_subscription_scope_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_list_at_subscription_scope_post_request( +def build_list_at_subscription_scope_post_request( # pylint: disable=name-too-long subscription_id: str, *, region: str, @@ -123,7 +118,7 @@ def build_list_at_subscription_scope_post_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -188,7 +183,7 @@ def build_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -236,7 +231,7 @@ class MetricsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01.MonitorManagementClient`'s :attr:`metrics` attribute. """ @@ -302,7 +297,7 @@ def list_at_subscription_scope( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -317,7 +312,7 @@ def list_at_subscription_scope( :type validate_dimensions: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionScopeMetricResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -331,7 +326,7 @@ def list_at_subscription_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.SubscriptionScopeMetricResponse] = kwargs.pop("cls", None) request = build_list_at_subscription_scope_request( @@ -436,7 +431,7 @@ def list_at_subscription_scope_post( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -451,13 +446,13 @@ def list_at_subscription_scope_post( :type validate_dimensions: bool :param body: Parameters serialized in the body. Default value is None. :type body: - ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricsRequestBodyParameters + ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricsRequestBodyParameters :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionScopeMetricResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricResponse :raises ~azure.core.exceptions.HttpResponseError: """ @@ -518,7 +513,7 @@ def list_at_subscription_scope_post( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -538,7 +533,7 @@ def list_at_subscription_scope_post( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionScopeMetricResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricResponse :raises ~azure.core.exceptions.HttpResponseError: """ @@ -597,7 +592,7 @@ def list_at_subscription_scope_post( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.MetricResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.MetricResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -613,14 +608,13 @@ def list_at_subscription_scope_post( :param body: Parameters serialized in the body. Is either a SubscriptionScopeMetricsRequestBodyParameters type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricsRequestBodyParameters or - IO + ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricsRequestBodyParameters or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionScopeMetricResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.SubscriptionScopeMetricResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.SubscriptionScopeMetricResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -634,7 +628,7 @@ def list_at_subscription_scope_post( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionScopeMetricResponse] = kwargs.pop("cls", None) @@ -750,7 +744,7 @@ def list( :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. Known values are: "Data" and "Metadata". Default value is None. - :type result_type: str or ~$(python-base-namespace).v2021_05_01.models.ResultType + :type result_type: str or ~azure.mgmt.monitor.v2021_05_01.models.ResultType :param metricnamespace: Metric namespace where the metrics you want reside. Default value is None. :type metricnamespace: str @@ -765,7 +759,7 @@ def list( :type validate_dimensions: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: Response or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.Response + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.Response :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -779,7 +773,7 @@ def list( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.Response] = kwargs.pop("cls", None) request = build_list_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_operations.py index b399b16aa7f4..256cf97311e8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01/operations/_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -64,7 +59,7 @@ class Operations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01.MonitorManagementClient`'s :attr:`operations` attribute. """ @@ -83,7 +78,7 @@ def list(self, **kwargs: Any) -> _models.OperationListResult: :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationListResult or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01.models.OperationListResult + :rtype: ~azure.mgmt.monitor.v2021_05_01.models.OperationListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -97,7 +92,7 @@ def list(self, **kwargs: Any) -> _models.OperationListResult: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) request = build_list_request( 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 bdecfe75101a..225ab1692079 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-05-01-preview"] = kwargs.pop("api_version", "2021-05-01-preview") + api_version: str = kwargs.pop("api_version", "2021-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index d38458f2e8bf..4330b407ed8c 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_management_client.py @@ -34,23 +34,23 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar autoscale_settings: AutoscaleSettingsOperations operations :vartype autoscale_settings: - $(python-base-namespace).v2021_05_01_preview.operations.AutoscaleSettingsOperations + azure.mgmt.monitor.v2021_05_01_preview.operations.AutoscaleSettingsOperations :ivar predictive_metric: PredictiveMetricOperations operations :vartype predictive_metric: - $(python-base-namespace).v2021_05_01_preview.operations.PredictiveMetricOperations + azure.mgmt.monitor.v2021_05_01_preview.operations.PredictiveMetricOperations :ivar diagnostic_settings: DiagnosticSettingsOperations operations :vartype diagnostic_settings: - $(python-base-namespace).v2021_05_01_preview.operations.DiagnosticSettingsOperations + azure.mgmt.monitor.v2021_05_01_preview.operations.DiagnosticSettingsOperations :ivar diagnostic_settings_category: DiagnosticSettingsCategoryOperations operations :vartype diagnostic_settings_category: - $(python-base-namespace).v2021_05_01_preview.operations.DiagnosticSettingsCategoryOperations + azure.mgmt.monitor.v2021_05_01_preview.operations.DiagnosticSettingsCategoryOperations :ivar management_group_diagnostic_settings: ManagementGroupDiagnosticSettingsOperations operations :vartype management_group_diagnostic_settings: - $(python-base-namespace).v2021_05_01_preview.operations.ManagementGroupDiagnosticSettingsOperations + azure.mgmt.monitor.v2021_05_01_preview.operations.ManagementGroupDiagnosticSettingsOperations :ivar subscription_diagnostic_settings: SubscriptionDiagnosticSettingsOperations operations :vartype subscription_diagnostic_settings: - $(python-base-namespace).v2021_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations + azure.mgmt.monitor.v2021_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 9dbd2d527251..06c4726413bf 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-05-01-preview"] = kwargs.pop("api_version", "2021-05-01-preview") + api_version: str = kwargs.pop("api_version", "2021-05-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 416ab135e24a..13974f530e37 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_management_client.py @@ -34,23 +34,23 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar autoscale_settings: AutoscaleSettingsOperations operations :vartype autoscale_settings: - $(python-base-namespace).v2021_05_01_preview.aio.operations.AutoscaleSettingsOperations + azure.mgmt.monitor.v2021_05_01_preview.aio.operations.AutoscaleSettingsOperations :ivar predictive_metric: PredictiveMetricOperations operations :vartype predictive_metric: - $(python-base-namespace).v2021_05_01_preview.aio.operations.PredictiveMetricOperations + azure.mgmt.monitor.v2021_05_01_preview.aio.operations.PredictiveMetricOperations :ivar diagnostic_settings: DiagnosticSettingsOperations operations :vartype diagnostic_settings: - $(python-base-namespace).v2021_05_01_preview.aio.operations.DiagnosticSettingsOperations + azure.mgmt.monitor.v2021_05_01_preview.aio.operations.DiagnosticSettingsOperations :ivar diagnostic_settings_category: DiagnosticSettingsCategoryOperations operations :vartype diagnostic_settings_category: - $(python-base-namespace).v2021_05_01_preview.aio.operations.DiagnosticSettingsCategoryOperations + azure.mgmt.monitor.v2021_05_01_preview.aio.operations.DiagnosticSettingsCategoryOperations :ivar management_group_diagnostic_settings: ManagementGroupDiagnosticSettingsOperations operations :vartype management_group_diagnostic_settings: - $(python-base-namespace).v2021_05_01_preview.aio.operations.ManagementGroupDiagnosticSettingsOperations + azure.mgmt.monitor.v2021_05_01_preview.aio.operations.ManagementGroupDiagnosticSettingsOperations :ivar subscription_diagnostic_settings: SubscriptionDiagnosticSettingsOperations operations :vartype subscription_diagnostic_settings: - $(python-base-namespace).v2021_05_01_preview.aio.operations.SubscriptionDiagnosticSettingsOperations + azure.mgmt.monitor.v2021_05_01_preview.aio.operations.SubscriptionDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py index 7fcf49d01c72..2a8bd6ff5093 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class AutoscaleSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.aio.MonitorManagementClient`'s :attr:`autoscale_settings` attribute. """ @@ -78,15 +73,13 @@ def list_by_resource_group( :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -176,13 +169,13 @@ async def create_or_update( :param autoscale_setting_name: The autoscale setting name. Required. :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :type parameters: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -210,7 +203,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -231,14 +224,13 @@ async def create_or_update( :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Is either a AutoscaleSettingResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource - or IO + :type parameters: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -252,9 +244,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -335,9 +325,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -384,7 +372,7 @@ async def get( :type autoscale_setting_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -398,9 +386,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -458,13 +444,13 @@ async def update( :type autoscale_setting_name: str :param autoscale_setting_resource: Parameters supplied to the operation. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourcePatch + ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -493,7 +479,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -516,13 +502,13 @@ async def update( :param autoscale_setting_resource: Parameters supplied to the operation. Is either a AutoscaleSettingResourcePatch type or a IO type. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourcePatch or IO + ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -536,9 +522,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -596,15 +580,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Autoscal :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py index 4430389799cd..87ee26a26935 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -31,10 +30,6 @@ from ..._vendor import _convert_request from ...operations._diagnostic_settings_category_operations import build_get_request, build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ class DiagnosticSettingsCategoryOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.aio.MonitorManagementClient`'s :attr:`diagnostic_settings_category` attribute. """ @@ -68,7 +63,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsCategoryResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsCategoryResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -82,9 +77,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResource] = kwargs.pop("cls", None) request = build_get_request( @@ -129,15 +122,13 @@ def list(self, resource_uri: str, **kwargs: Any) -> AsyncIterable["_models.Diagn :return: An iterator like instance of either DiagnosticSettingsCategoryResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py index 21dbf92a349b..10924aeb4781 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +45,7 @@ class DiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.aio.MonitorManagementClient`'s :attr:`diagnostic_settings` attribute. """ @@ -73,7 +68,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -87,9 +82,7 @@ async def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diag _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -141,14 +134,13 @@ async def create_or_update( :param name: The name of the diagnostic setting. Required. :type name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :type parameters: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -169,7 +161,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -185,14 +177,14 @@ async def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Is either a DiagnosticSettingsResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource or IO + :type parameters: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -206,9 +198,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -281,9 +271,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -324,15 +312,13 @@ def list(self, resource_uri: str, **kwargs: Any) -> AsyncIterable["_models.Diagn :return: An iterator like instance of either DiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py index 834a6b4ad15d..51c02a4408ca 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +45,7 @@ class ManagementGroupDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.aio.MonitorManagementClient`'s :attr:`management_group_diagnostic_settings` attribute. """ @@ -76,7 +71,7 @@ async def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -90,9 +85,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -147,14 +140,14 @@ async def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -182,7 +175,7 @@ async def create_or_update( :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -203,15 +196,14 @@ async def create_or_update( :param parameters: Parameters supplied to the operation. Is either a ManagementGroupDiagnosticSettingsResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource - or IO + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -225,9 +217,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -302,9 +292,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -349,15 +337,13 @@ def list( :return: An iterator like instance of either ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py index 430dc1186051..7907cef27da3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._predictive_metric_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ class PredictiveMetricOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.aio.MonitorManagementClient`'s :attr:`predictive_metric` attribute. """ @@ -90,7 +85,7 @@ async def get( :type aggregation: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PredictiveResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -104,9 +99,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.PredictiveResponse] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py index 157c5a472e04..f79a002ba422 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -36,10 +35,6 @@ build_list_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -50,7 +45,7 @@ class SubscriptionDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.aio.MonitorManagementClient`'s :attr:`subscription_diagnostic_settings` attribute. """ @@ -71,8 +66,7 @@ async def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticS :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -86,9 +80,7 @@ async def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticS _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -138,14 +130,13 @@ async def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -164,8 +155,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -180,15 +170,13 @@ async def create_or_update( :param parameters: Parameters supplied to the operation. Is either a SubscriptionDiagnosticSettingsResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource or - IO + ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -202,9 +190,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -275,9 +261,7 @@ async def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inc _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -316,15 +300,13 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.SubscriptionDiagnosticSe :return: An iterator like instance of either SubscriptionDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { 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 fce69f391cb6..3ab1eeb67299 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 @@ -23,10 +23,9 @@ class AutoscaleErrorResponse(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar error: The error object. - :vartype error: - ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleErrorResponseError + :vartype error: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleErrorResponseError :ivar system_data: The system metadata related to the response. - :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_05_01_preview.models.SystemData """ _validation = { @@ -41,8 +40,7 @@ class AutoscaleErrorResponse(_serialization.Model): def __init__(self, *, error: Optional["_models.AutoscaleErrorResponseError"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: - ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleErrorResponseError + :paramtype error: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleErrorResponseError """ super().__init__(**kwargs) self.error = error @@ -106,10 +104,9 @@ class AutoscaleNotification(_serialization.Model): Required. Default value is "Scale". :vartype operation: str :ivar email: the email notification. - :vartype email: ~$(python-base-namespace).v2021_05_01_preview.models.EmailNotification + :vartype email: ~azure.mgmt.monitor.v2021_05_01_preview.models.EmailNotification :ivar webhooks: the collection of webhook notifications. - :vartype webhooks: - list[~$(python-base-namespace).v2021_05_01_preview.models.WebhookNotification] + :vartype webhooks: list[~azure.mgmt.monitor.v2021_05_01_preview.models.WebhookNotification] """ _validation = { @@ -133,10 +130,9 @@ def __init__( ) -> None: """ :keyword email: the email notification. - :paramtype email: ~$(python-base-namespace).v2021_05_01_preview.models.EmailNotification + :paramtype email: ~azure.mgmt.monitor.v2021_05_01_preview.models.EmailNotification :keyword webhooks: the collection of webhook notifications. - :paramtype webhooks: - list[~$(python-base-namespace).v2021_05_01_preview.models.WebhookNotification] + :paramtype webhooks: list[~azure.mgmt.monitor.v2021_05_01_preview.models.WebhookNotification] """ super().__init__(**kwargs) self.email = email @@ -151,16 +147,16 @@ class AutoscaleProfile(_serialization.Model): :ivar name: the name of the profile. Required. :vartype name: str :ivar capacity: the number of instances that can be used during this profile. Required. - :vartype capacity: ~$(python-base-namespace).v2021_05_01_preview.models.ScaleCapacity + :vartype capacity: ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleCapacity :ivar rules: the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. Required. - :vartype rules: list[~$(python-base-namespace).v2021_05_01_preview.models.ScaleRule] + :vartype rules: list[~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleRule] :ivar fixed_date: the specific date-time for the profile. This element is not used if the Recurrence element is used. - :vartype fixed_date: ~$(python-base-namespace).v2021_05_01_preview.models.TimeWindow + :vartype fixed_date: ~azure.mgmt.monitor.v2021_05_01_preview.models.TimeWindow :ivar recurrence: the repeating times at which this profile begins. This element is not used if the FixedDate element is used. - :vartype recurrence: ~$(python-base-namespace).v2021_05_01_preview.models.Recurrence + :vartype recurrence: ~azure.mgmt.monitor.v2021_05_01_preview.models.Recurrence """ _validation = { @@ -191,16 +187,16 @@ def __init__( :keyword name: the name of the profile. Required. :paramtype name: str :keyword capacity: the number of instances that can be used during this profile. Required. - :paramtype capacity: ~$(python-base-namespace).v2021_05_01_preview.models.ScaleCapacity + :paramtype capacity: ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleCapacity :keyword rules: the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. Required. - :paramtype rules: list[~$(python-base-namespace).v2021_05_01_preview.models.ScaleRule] + :paramtype rules: list[~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleRule] :keyword fixed_date: the specific date-time for the profile. This element is not used if the Recurrence element is used. - :paramtype fixed_date: ~$(python-base-namespace).v2021_05_01_preview.models.TimeWindow + :paramtype fixed_date: ~azure.mgmt.monitor.v2021_05_01_preview.models.TimeWindow :keyword recurrence: the repeating times at which this profile begins. This element is not used if the FixedDate element is used. - :paramtype recurrence: ~$(python-base-namespace).v2021_05_01_preview.models.Recurrence + :paramtype recurrence: ~azure.mgmt.monitor.v2021_05_01_preview.models.Recurrence """ super().__init__(**kwargs) self.name = name @@ -231,19 +227,19 @@ class AutoscaleSettingResource(_serialization.Model): # pylint: disable=too-man characters and a value no greater in length than 256 characters. :vartype tags: dict[str, str] :ivar system_data: The system metadata related to the response. - :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_05_01_preview.models.SystemData :ivar profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Required. - :vartype profiles: list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleProfile] + :vartype profiles: list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleProfile] :ivar notifications: the collection of notifications. :vartype notifications: - list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleNotification] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleNotification] :ivar enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :vartype enabled: bool :ivar predictive_autoscale_policy: the predictive autoscale policy mode. :vartype predictive_autoscale_policy: - ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicy + ~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveAutoscalePolicy :ivar name_properties_name: the name of the autoscale setting. :vartype name_properties_name: str :ivar target_resource_uri: the resource identifier of the resource that the autoscale setting @@ -306,17 +302,16 @@ def __init__( :paramtype tags: dict[str, str] :keyword profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Required. - :paramtype profiles: - list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleProfile] + :paramtype profiles: list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleProfile] :keyword notifications: the collection of notifications. :paramtype notifications: - list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleNotification] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleNotification] :keyword enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :paramtype enabled: bool :keyword predictive_autoscale_policy: the predictive autoscale policy mode. :paramtype predictive_autoscale_policy: - ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicy + ~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveAutoscalePolicy :keyword name_properties_name: the name of the autoscale setting. :paramtype name_properties_name: str :keyword target_resource_uri: the resource identifier of the resource that the autoscale @@ -348,8 +343,7 @@ class AutoscaleSettingResourceCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the values for the autoscale setting resources. Required. - :vartype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource] + :vartype value: list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource] :ivar next_link: URL to get the next set of results. :vartype next_link: str """ @@ -368,8 +362,7 @@ def __init__( ) -> None: """ :keyword value: the values for the autoscale setting resources. Required. - :paramtype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource] + :paramtype value: list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource] :keyword next_link: URL to get the next set of results. :paramtype next_link: str """ @@ -385,16 +378,16 @@ class AutoscaleSettingResourcePatch(_serialization.Model): :vartype tags: dict[str, str] :ivar profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. - :vartype profiles: list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleProfile] + :vartype profiles: list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleProfile] :ivar notifications: the collection of notifications. :vartype notifications: - list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleNotification] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleNotification] :ivar enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :vartype enabled: bool :ivar predictive_autoscale_policy: the predictive autoscale policy mode. :vartype predictive_autoscale_policy: - ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicy + ~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveAutoscalePolicy :ivar name: the name of the autoscale setting. :vartype name: str :ivar target_resource_uri: the resource identifier of the resource that the autoscale setting @@ -441,17 +434,16 @@ def __init__( :paramtype tags: dict[str, str] :keyword profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. - :paramtype profiles: - list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleProfile] + :paramtype profiles: list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleProfile] :keyword notifications: the collection of notifications. :paramtype notifications: - list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleNotification] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleNotification] :keyword enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :paramtype enabled: bool :keyword predictive_autoscale_policy: the predictive autoscale policy mode. :paramtype predictive_autoscale_policy: - ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicy + ~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveAutoscalePolicy :keyword name: the name of the autoscale setting. :paramtype name: str :keyword target_resource_uri: the resource identifier of the resource that the autoscale @@ -521,11 +513,10 @@ class DiagnosticSettingsCategoryResource(Resource): "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system metadata related to this resource. - :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_05_01_preview.models.SystemData :ivar category_type: The type of the diagnostic settings category. Known values are: "Metrics" and "Logs". - :vartype category_type: str or - ~$(python-base-namespace).v2021_05_01_preview.models.CategoryType + :vartype category_type: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.CategoryType :ivar category_groups: the collection of what category groups are supported. :vartype category_groups: list[str] """ @@ -556,8 +547,7 @@ def __init__( """ :keyword category_type: The type of the diagnostic settings category. Known values are: "Metrics" and "Logs". - :paramtype category_type: str or - ~$(python-base-namespace).v2021_05_01_preview.models.CategoryType + :paramtype category_type: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.CategoryType :keyword category_groups: the collection of what category groups are supported. :paramtype category_groups: list[str] """ @@ -572,7 +562,7 @@ class DiagnosticSettingsCategoryResourceCollection(_serialization.Model): :ivar value: The collection of diagnostic settings category resources. :vartype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] """ _attribute_map = { @@ -585,7 +575,7 @@ def __init__( """ :keyword value: The collection of diagnostic settings category resources. :paramtype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] """ super().__init__(**kwargs) self.value = value @@ -605,7 +595,7 @@ class DiagnosticSettingsResource(Resource): # pylint: disable=too-many-instance "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system metadata related to this resource. - :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_05_01_preview.models.SystemData :ivar storage_account_id: The resource ID of the storage account to which you would like to send Diagnostic Logs. :vartype storage_account_id: str @@ -618,9 +608,9 @@ class DiagnosticSettingsResource(Resource): # pylint: disable=too-many-instance will be selected. :vartype event_hub_name: str :ivar metrics: The list of metric settings. - :vartype metrics: list[~$(python-base-namespace).v2021_05_01_preview.models.MetricSettings] + :vartype metrics: list[~azure.mgmt.monitor.v2021_05_01_preview.models.MetricSettings] :ivar logs: The list of logs settings. - :vartype logs: list[~$(python-base-namespace).v2021_05_01_preview.models.LogSettings] + :vartype logs: list[~azure.mgmt.monitor.v2021_05_01_preview.models.LogSettings] :ivar workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -685,9 +675,9 @@ def __init__( will be selected. :paramtype event_hub_name: str :keyword metrics: The list of metric settings. - :paramtype metrics: list[~$(python-base-namespace).v2021_05_01_preview.models.MetricSettings] + :paramtype metrics: list[~azure.mgmt.monitor.v2021_05_01_preview.models.MetricSettings] :keyword logs: The list of logs settings. - :paramtype logs: list[~$(python-base-namespace).v2021_05_01_preview.models.LogSettings] + :paramtype logs: list[~azure.mgmt.monitor.v2021_05_01_preview.models.LogSettings] :keyword workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -718,8 +708,7 @@ class DiagnosticSettingsResourceCollection(_serialization.Model): """Represents a collection of alert rule resources. :ivar value: The collection of diagnostic settings resources;. - :vartype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource] + :vartype value: list[~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource] """ _attribute_map = { @@ -730,7 +719,7 @@ def __init__(self, *, value: Optional[List["_models.DiagnosticSettingsResource"] """ :keyword value: The collection of diagnostic settings resources;. :paramtype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource] """ super().__init__(**kwargs) self.value = value @@ -823,7 +812,7 @@ class LogSettings(_serialization.Model): :ivar enabled: a value indicating whether this log is enabled. Required. :vartype enabled: bool :ivar retention_policy: the retention policy for this log. - :vartype retention_policy: ~$(python-base-namespace).v2021_05_01_preview.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2021_05_01_preview.models.RetentionPolicy """ _validation = { @@ -858,8 +847,7 @@ def __init__( :keyword enabled: a value indicating whether this log is enabled. Required. :paramtype enabled: bool :keyword retention_policy: the retention policy for this log. - :paramtype retention_policy: - ~$(python-base-namespace).v2021_05_01_preview.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2021_05_01_preview.models.RetentionPolicy """ super().__init__(**kwargs) self.category = category @@ -882,7 +870,7 @@ class ManagementGroupDiagnosticSettingsResource(Resource): # pylint: disable=to "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system metadata related to this resource. - :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_05_01_preview.models.SystemData :ivar storage_account_id: The resource ID of the storage account to which you would like to send Diagnostic Logs. :vartype storage_account_id: str @@ -895,8 +883,7 @@ class ManagementGroupDiagnosticSettingsResource(Resource): # pylint: disable=to will be selected. :vartype event_hub_name: str :ivar logs: The list of logs settings. - :vartype logs: - list[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupLogSettings] + :vartype logs: list[~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupLogSettings] :ivar workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -953,7 +940,7 @@ def __init__( :paramtype event_hub_name: str :keyword logs: The list of logs settings. :paramtype logs: - list[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupLogSettings] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupLogSettings] :keyword workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -978,7 +965,7 @@ class ManagementGroupDiagnosticSettingsResourceCollection(_serialization.Model): :ivar value: The collection of management group diagnostic settings resources. :vartype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] """ _attribute_map = { @@ -991,7 +978,7 @@ def __init__( """ :keyword value: The collection of management group diagnostic settings resources. :paramtype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] """ super().__init__(**kwargs) self.value = value @@ -1055,7 +1042,7 @@ class MetricSettings(_serialization.Model): :ivar enabled: a value indicating whether this category is enabled. Required. :vartype enabled: bool :ivar retention_policy: the retention policy for this category. - :vartype retention_policy: ~$(python-base-namespace).v2021_05_01_preview.models.RetentionPolicy + :vartype retention_policy: ~azure.mgmt.monitor.v2021_05_01_preview.models.RetentionPolicy """ _validation = { @@ -1088,8 +1075,7 @@ def __init__( :keyword enabled: a value indicating whether this category is enabled. Required. :paramtype enabled: bool :keyword retention_policy: the retention policy for this category. - :paramtype retention_policy: - ~$(python-base-namespace).v2021_05_01_preview.models.RetentionPolicy + :paramtype retention_policy: ~azure.mgmt.monitor.v2021_05_01_preview.models.RetentionPolicy """ super().__init__(**kwargs) self.time_grain = time_grain @@ -1117,8 +1103,7 @@ class MetricTrigger(_serialization.Model): # pylint: disable=too-many-instance- :vartype time_grain: ~datetime.timedelta :ivar statistic: the metric statistic type. How the metrics from multiple instances are combined. Required. Known values are: "Average", "Min", "Max", "Sum", and "Count". - :vartype statistic: str or - ~$(python-base-namespace).v2021_05_01_preview.models.MetricStatisticType + :vartype statistic: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.MetricStatisticType :ivar time_window: the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. Required. @@ -1127,18 +1112,18 @@ class MetricTrigger(_serialization.Model): # pylint: disable=too-many-instance- combined over time. The default value is Average. Required. Known values are: "Average", "Minimum", "Maximum", "Total", "Count", and "Last". :vartype time_aggregation: str or - ~$(python-base-namespace).v2021_05_01_preview.models.TimeAggregationType + ~azure.mgmt.monitor.v2021_05_01_preview.models.TimeAggregationType :ivar operator: the operator that is used to compare the metric data and the threshold. Required. Known values are: "Equals", "NotEquals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". :vartype operator: str or - ~$(python-base-namespace).v2021_05_01_preview.models.ComparisonOperationType + ~azure.mgmt.monitor.v2021_05_01_preview.models.ComparisonOperationType :ivar threshold: the threshold of the metric that triggers the scale action. Required. :vartype threshold: float :ivar dimensions: List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. :vartype dimensions: - list[~$(python-base-namespace).v2021_05_01_preview.models.ScaleRuleMetricDimension] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleRuleMetricDimension] :ivar divide_per_instance: a value indicating whether metric should divide per instance. :vartype divide_per_instance: bool """ @@ -1202,8 +1187,7 @@ def __init__( :paramtype time_grain: ~datetime.timedelta :keyword statistic: the metric statistic type. How the metrics from multiple instances are combined. Required. Known values are: "Average", "Min", "Max", "Sum", and "Count". - :paramtype statistic: str or - ~$(python-base-namespace).v2021_05_01_preview.models.MetricStatisticType + :paramtype statistic: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.MetricStatisticType :keyword time_window: the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. Required. @@ -1212,18 +1196,18 @@ def __init__( combined over time. The default value is Average. Required. Known values are: "Average", "Minimum", "Maximum", "Total", "Count", and "Last". :paramtype time_aggregation: str or - ~$(python-base-namespace).v2021_05_01_preview.models.TimeAggregationType + ~azure.mgmt.monitor.v2021_05_01_preview.models.TimeAggregationType :keyword operator: the operator that is used to compare the metric data and the threshold. Required. Known values are: "Equals", "NotEquals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". :paramtype operator: str or - ~$(python-base-namespace).v2021_05_01_preview.models.ComparisonOperationType + ~azure.mgmt.monitor.v2021_05_01_preview.models.ComparisonOperationType :keyword threshold: the threshold of the metric that triggers the scale action. Required. :paramtype threshold: float :keyword dimensions: List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. :paramtype dimensions: - list[~$(python-base-namespace).v2021_05_01_preview.models.ScaleRuleMetricDimension] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleRuleMetricDimension] :keyword divide_per_instance: a value indicating whether metric should divide per instance. :paramtype divide_per_instance: bool """ @@ -1250,7 +1234,7 @@ class PredictiveAutoscalePolicy(_serialization.Model): :ivar scale_mode: the predictive autoscale mode. Required. Known values are: "Disabled", "ForecastOnly", and "Enabled". :vartype scale_mode: str or - ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicyScaleMode + ~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveAutoscalePolicyScaleMode :ivar scale_look_ahead_time: the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format. :vartype scale_look_ahead_time: ~datetime.timedelta @@ -1276,7 +1260,7 @@ def __init__( :keyword scale_mode: the predictive autoscale mode. Required. Known values are: "Disabled", "ForecastOnly", and "Enabled". :paramtype scale_mode: str or - ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicyScaleMode + ~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveAutoscalePolicyScaleMode :keyword scale_look_ahead_time: the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format. :paramtype scale_look_ahead_time: ~datetime.timedelta @@ -1302,7 +1286,7 @@ class PredictiveResponse(_serialization.Model): :ivar target_resource_id: resource of the predictive metric. :vartype target_resource_id: str :ivar data: the value of the collection. - :vartype data: list[~$(python-base-namespace).v2021_05_01_preview.models.PredictiveValue] + :vartype data: list[~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveValue] """ _attribute_map = { @@ -1337,7 +1321,7 @@ def __init__( :keyword target_resource_id: resource of the predictive metric. :paramtype target_resource_id: str :keyword data: the value of the collection. - :paramtype data: list[~$(python-base-namespace).v2021_05_01_preview.models.PredictiveValue] + :paramtype data: list[~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveValue] """ super().__init__(**kwargs) self.timespan = timespan @@ -1391,10 +1375,9 @@ class Recurrence(_serialization.Model): set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. Required. Known values are: "None", "Second", "Minute", "Hour", "Day", "Week", "Month", and "Year". - :vartype frequency: str or - ~$(python-base-namespace).v2021_05_01_preview.models.RecurrenceFrequency + :vartype frequency: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.RecurrenceFrequency :ivar schedule: the scheduling constraints for when the profile begins. Required. - :vartype schedule: ~$(python-base-namespace).v2021_05_01_preview.models.RecurrentSchedule + :vartype schedule: ~azure.mgmt.monitor.v2021_05_01_preview.models.RecurrentSchedule """ _validation = { @@ -1420,10 +1403,9 @@ def __init__( example, to set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. Required. Known values are: "None", "Second", "Minute", "Hour", "Day", "Week", "Month", and "Year". - :paramtype frequency: str or - ~$(python-base-namespace).v2021_05_01_preview.models.RecurrenceFrequency + :paramtype frequency: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.RecurrenceFrequency :keyword schedule: the scheduling constraints for when the profile begins. Required. - :paramtype schedule: ~$(python-base-namespace).v2021_05_01_preview.models.RecurrentSchedule + :paramtype schedule: ~azure.mgmt.monitor.v2021_05_01_preview.models.RecurrentSchedule """ super().__init__(**kwargs) self.frequency = frequency @@ -1581,10 +1563,10 @@ class ScaleAction(_serialization.Model): :ivar direction: the scale direction. Whether the scaling action increases or decreases the number of instances. Required. Known values are: "None", "Increase", and "Decrease". - :vartype direction: str or ~$(python-base-namespace).v2021_05_01_preview.models.ScaleDirection + :vartype direction: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleDirection :ivar type: the type of action that should occur when the scale rule fires. Required. Known values are: "ChangeCount", "PercentChangeCount", "ExactCount", and "ServiceAllowedNextValue". - :vartype type: str or ~$(python-base-namespace).v2021_05_01_preview.models.ScaleType + :vartype type: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleType :ivar value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. :vartype value: str @@ -1618,11 +1600,10 @@ def __init__( """ :keyword direction: the scale direction. Whether the scaling action increases or decreases the number of instances. Required. Known values are: "None", "Increase", and "Decrease". - :paramtype direction: str or - ~$(python-base-namespace).v2021_05_01_preview.models.ScaleDirection + :paramtype direction: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleDirection :keyword type: the type of action that should occur when the scale rule fires. Required. Known values are: "ChangeCount", "PercentChangeCount", "ExactCount", and "ServiceAllowedNextValue". - :paramtype type: str or ~$(python-base-namespace).v2021_05_01_preview.models.ScaleType + :paramtype type: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleType :keyword value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. :paramtype value: str @@ -1689,9 +1670,9 @@ class ScaleRule(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar metric_trigger: the trigger that results in a scaling action. Required. - :vartype metric_trigger: ~$(python-base-namespace).v2021_05_01_preview.models.MetricTrigger + :vartype metric_trigger: ~azure.mgmt.monitor.v2021_05_01_preview.models.MetricTrigger :ivar scale_action: the parameters for the scaling action. Required. - :vartype scale_action: ~$(python-base-namespace).v2021_05_01_preview.models.ScaleAction + :vartype scale_action: ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleAction """ _validation = { @@ -1709,9 +1690,9 @@ def __init__( ) -> None: """ :keyword metric_trigger: the trigger that results in a scaling action. Required. - :paramtype metric_trigger: ~$(python-base-namespace).v2021_05_01_preview.models.MetricTrigger + :paramtype metric_trigger: ~azure.mgmt.monitor.v2021_05_01_preview.models.MetricTrigger :keyword scale_action: the parameters for the scaling action. Required. - :paramtype scale_action: ~$(python-base-namespace).v2021_05_01_preview.models.ScaleAction + :paramtype scale_action: ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleAction """ super().__init__(**kwargs) self.metric_trigger = metric_trigger @@ -1729,7 +1710,7 @@ class ScaleRuleMetricDimension(_serialization.Model): being equal to any of the values. 'NotEquals' being not equal to all of the values. Required. Known values are: "Equals" and "NotEquals". :vartype operator: str or - ~$(python-base-namespace).v2021_05_01_preview.models.ScaleRuleMetricDimensionOperationType + ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleRuleMetricDimensionOperationType :ivar values: list of dimension values. For example: ["App1","App2"]. Required. :vartype values: list[str] """ @@ -1761,7 +1742,7 @@ def __init__( 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. Required. Known values are: "Equals" and "NotEquals". :paramtype operator: str or - ~$(python-base-namespace).v2021_05_01_preview.models.ScaleRuleMetricDimensionOperationType + ~azure.mgmt.monitor.v2021_05_01_preview.models.ScaleRuleMetricDimensionOperationType :keyword values: list of dimension values. For example: ["App1","App2"]. Required. :paramtype values: list[str] """ @@ -1785,7 +1766,7 @@ class SubscriptionDiagnosticSettingsResource(Resource): # pylint: disable=too-m "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system metadata related to this resource. - :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_05_01_preview.models.SystemData :ivar storage_account_id: The resource ID of the storage account to which you would like to send Diagnostic Logs. :vartype storage_account_id: str @@ -1798,8 +1779,7 @@ class SubscriptionDiagnosticSettingsResource(Resource): # pylint: disable=too-m will be selected. :vartype event_hub_name: str :ivar logs: The list of logs settings. - :vartype logs: - list[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionLogSettings] + :vartype logs: list[~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionLogSettings] :ivar workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -1855,8 +1835,7 @@ def __init__( will be selected. :paramtype event_hub_name: str :keyword logs: The list of logs settings. - :paramtype logs: - list[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionLogSettings] + :paramtype logs: list[~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionLogSettings] :keyword workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. @@ -1881,7 +1860,7 @@ class SubscriptionDiagnosticSettingsResourceCollection(_serialization.Model): :ivar value: The collection of subscription diagnostic settings resources. :vartype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] """ _attribute_map = { @@ -1894,7 +1873,7 @@ def __init__( """ :keyword value: The collection of subscription diagnostic settings resources. :paramtype value: - list[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + list[~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] """ super().__init__(**kwargs) self.value = value @@ -1951,8 +1930,7 @@ class SystemData(_serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or - ~$(python-base-namespace).v2021_05_01_preview.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. @@ -1960,7 +1938,7 @@ class SystemData(_serialization.Model): :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2021_05_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2021_05_01_preview.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -1990,8 +1968,7 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or - ~$(python-base-namespace).v2021_05_01_preview.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2021_05_01_preview.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. @@ -1999,7 +1976,7 @@ def __init__( :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2021_05_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2021_05_01_preview.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py index 97e308d7f268..58b7c033d782 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -79,9 +72,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -117,9 +108,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -152,9 +141,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -187,9 +174,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -223,9 +208,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -251,7 +234,7 @@ class AutoscaleSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.MonitorManagementClient`'s :attr:`autoscale_settings` attribute. """ @@ -277,15 +260,13 @@ def list_by_resource_group( :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -375,13 +356,13 @@ def create_or_update( :param autoscale_setting_name: The autoscale setting name. Required. :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :type parameters: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -409,7 +390,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -430,14 +411,13 @@ def create_or_update( :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Is either a AutoscaleSettingResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource - or IO + :type parameters: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -451,9 +431,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -534,9 +512,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -583,7 +559,7 @@ def get( :type autoscale_setting_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -597,9 +573,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -657,13 +631,13 @@ def update( :type autoscale_setting_name: str :param autoscale_setting_resource: Parameters supplied to the operation. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourcePatch + ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -692,7 +666,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -715,13 +689,13 @@ def update( :param autoscale_setting_resource: Parameters supplied to the operation. Is either a AutoscaleSettingResourcePatch type or a IO type. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourcePatch or IO + ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -735,9 +709,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -795,15 +767,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AutoscaleSett :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py index f2d77742a621..f2b7d0147522 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReques _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,9 +65,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -100,7 +91,7 @@ class DiagnosticSettingsCategoryOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.MonitorManagementClient`'s :attr:`diagnostic_settings_category` attribute. """ @@ -123,7 +114,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsCategoryResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsCategoryResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -137,9 +128,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResource] = kwargs.pop("cls", None) request = build_get_request( @@ -184,15 +173,13 @@ def list(self, resource_uri: str, **kwargs: Any) -> Iterable["_models.Diagnostic :return: An iterator like instance of either DiagnosticSettingsCategoryResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsCategoryResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py index bdffe1ecb522..c7e8b738b8fd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReques _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -72,9 +65,7 @@ def build_create_or_update_request(resource_uri: str, name: str, **kwargs: Any) _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -102,9 +93,7 @@ def build_delete_request(resource_uri: str, name: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -129,9 +118,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -157,7 +144,7 @@ class DiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.MonitorManagementClient`'s :attr:`diagnostic_settings` attribute. """ @@ -180,7 +167,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -194,9 +181,7 @@ def get(self, resource_uri: str, name: str, **kwargs: Any) -> _models.Diagnostic _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -248,14 +233,13 @@ def create_or_update( :param name: The name of the diagnostic setting. Required. :type name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :type parameters: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -276,7 +260,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -292,14 +276,14 @@ def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Is either a DiagnosticSettingsResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource or IO + :type parameters: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DiagnosticSettingsResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -313,9 +297,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -388,9 +370,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -431,15 +411,13 @@ def list(self, resource_uri: str, **kwargs: Any) -> Iterable["_models.Diagnostic :return: An iterator like instance of either DiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.DiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.DiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py index 3bc0b635c06e..339da6755347 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(management_group_id: str, name: str, **kwargs: Any) -> Htt _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,9 +68,7 @@ def build_create_or_update_request(management_group_id: str, name: str, **kwargs _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -108,9 +99,7 @@ def build_delete_request(management_group_id: str, name: str, **kwargs: Any) -> _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,9 +127,7 @@ def build_list_request(management_group_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -169,7 +156,7 @@ class ManagementGroupDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.MonitorManagementClient`'s :attr:`management_group_diagnostic_settings` attribute. """ @@ -195,7 +182,7 @@ def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -209,9 +196,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -266,14 +251,14 @@ def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -301,7 +286,7 @@ def create_or_update( :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -322,15 +307,14 @@ def create_or_update( :param parameters: Parameters supplied to the operation. Is either a ManagementGroupDiagnosticSettingsResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource - or IO + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -344,9 +328,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -421,9 +403,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -468,15 +448,13 @@ def list( :return: An iterator like instance of either ManagementGroupDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.ManagementGroupDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py index 3685a2268e84..a3f0a967046d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,9 +50,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -95,7 +88,7 @@ class PredictiveMetricOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.MonitorManagementClient`'s :attr:`predictive_metric` attribute. """ @@ -142,7 +135,7 @@ def get( :type aggregation: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PredictiveResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveResponse + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.PredictiveResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -156,9 +149,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.PredictiveResponse] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py index edffb491ac88..64d625a3b2f1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request(name: str, subscription_id: str, **kwargs: Any) -> HttpReq _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,9 +67,7 @@ def build_create_or_update_request(name: str, subscription_id: str, **kwargs: An _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -106,9 +97,7 @@ def build_delete_request(name: str, subscription_id: str, **kwargs: Any) -> Http _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -135,9 +124,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -163,7 +150,7 @@ class SubscriptionDiagnosticSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_05_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_05_01_preview.MonitorManagementClient`'s :attr:`subscription_diagnostic_settings` attribute. """ @@ -184,8 +171,7 @@ def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticSetting :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -199,9 +185,7 @@ def get(self, name: str, **kwargs: Any) -> _models.SubscriptionDiagnosticSetting _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) request = build_get_request( @@ -251,14 +235,13 @@ def create_or_update( :type name: str :param parameters: Parameters supplied to the operation. Required. :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -277,8 +260,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -293,15 +275,13 @@ def create_or_update( :param parameters: Parameters supplied to the operation. Is either a SubscriptionDiagnosticSettingsResource type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource or - IO + ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :rtype: ~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -315,9 +295,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.SubscriptionDiagnosticSettingsResource] = kwargs.pop("cls", None) @@ -388,9 +366,7 @@ def delete(self, name: str, **kwargs: Any) -> None: # pylint: disable=inconsist _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -429,15 +405,13 @@ def list(self, **kwargs: Any) -> Iterable["_models.SubscriptionDiagnosticSetting :return: An iterator like instance of either SubscriptionDiagnosticSettingsResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-05-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-05-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-05-01-preview")) cls: ClsType[_models.SubscriptionDiagnosticSettingsResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_configuration.py index 1e0362343949..31e53c133145 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-06-03-preview"] = kwargs.pop("api_version", "2021-06-03-preview") + api_version: str = kwargs.pop("api_version", "2021-06-03-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_monitor_management_client.py index eaed3062c051..609fd0d55392 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_monitor_management_client.py @@ -27,10 +27,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar azure_monitor_workspaces: AzureMonitorWorkspacesOperations operations :vartype azure_monitor_workspaces: - $(python-base-namespace).v2021_06_03_preview.operations.AzureMonitorWorkspacesOperations + azure.mgmt.monitor.v2021_06_03_preview.operations.AzureMonitorWorkspacesOperations :ivar monitor_operations: MonitorOperationsOperations operations :vartype monitor_operations: - $(python-base-namespace).v2021_06_03_preview.operations.MonitorOperationsOperations + azure.mgmt.monitor.v2021_06_03_preview.operations.MonitorOperationsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_configuration.py index 2694a28b0951..798865c55f15 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-06-03-preview"] = kwargs.pop("api_version", "2021-06-03-preview") + api_version: str = kwargs.pop("api_version", "2021-06-03-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_monitor_management_client.py index ee0128623496..d510d97f581b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/_monitor_management_client.py @@ -27,10 +27,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar azure_monitor_workspaces: AzureMonitorWorkspacesOperations operations :vartype azure_monitor_workspaces: - $(python-base-namespace).v2021_06_03_preview.aio.operations.AzureMonitorWorkspacesOperations + azure.mgmt.monitor.v2021_06_03_preview.aio.operations.AzureMonitorWorkspacesOperations :ivar monitor_operations: MonitorOperationsOperations operations :vartype monitor_operations: - $(python-base-namespace).v2021_06_03_preview.aio.operations.MonitorOperationsOperations + azure.mgmt.monitor.v2021_06_03_preview.aio.operations.MonitorOperationsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_azure_monitor_workspaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_azure_monitor_workspaces_operations.py index 8b8b615ef2be..5fe2ed9588a8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_azure_monitor_workspaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_azure_monitor_workspaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class AzureMonitorWorkspacesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_06_03_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_06_03_preview.aio.MonitorManagementClient`'s :attr:`azure_monitor_workspaces` attribute. """ @@ -78,15 +73,13 @@ def list_by_resource_group( :return: An iterator like instance of either AzureMonitorWorkspaceResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -166,15 +159,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.AzureMon :return: An iterator like instance of either AzureMonitorWorkspaceResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -257,7 +248,7 @@ async def get( :type azure_monitor_workspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -271,9 +262,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) request = build_get_request( @@ -332,13 +321,13 @@ async def create( :param azure_monitor_workspace_properties: Properties that need to be specified to create a new workspace. Required. :type azure_monitor_workspace_properties: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -368,7 +357,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -391,13 +380,13 @@ async def create( :param azure_monitor_workspace_properties: Properties that need to be specified to create a new workspace. Is either a AzureMonitorWorkspaceResource type or a IO type. Required. :type azure_monitor_workspace_properties: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource or IO + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -411,9 +400,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) @@ -487,13 +474,13 @@ async def update( :type azure_monitor_workspace_name: str :param azure_monitor_workspace_properties: The payload. Default value is None. :type azure_monitor_workspace_properties: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResourceForUpdate + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -522,7 +509,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -545,14 +532,13 @@ async def update( :param azure_monitor_workspace_properties: The payload. Is either a AzureMonitorWorkspaceResourceForUpdate type or a IO type. Default value is None. :type azure_monitor_workspace_properties: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResourceForUpdate or - IO + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -566,9 +552,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) @@ -651,9 +635,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_monitor_operations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_monitor_operations_operations.py index a60ad651589b..03014bb531be 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_monitor_operations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/aio/operations/_monitor_operations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._vendor import _convert_request from ...operations._monitor_operations_operations import build_list_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -44,7 +39,7 @@ class MonitorOperationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_06_03_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_06_03_preview.aio.MonitorManagementClient`'s :attr:`monitor_operations` attribute. """ @@ -64,15 +59,13 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Operation or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_06_03_preview.models.Operation] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_06_03_preview.models.Operation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/models/_models_py3.py index dc4bc6127f5c..8edc0aec3f9e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/models/_models_py3.py @@ -25,17 +25,16 @@ class AzureMonitorWorkspace(_serialization.Model): :ivar account_id: The immutable ID of the Azure Monitor workspace. This property is read-only. :vartype account_id: str :ivar metrics: Information about metrics for the Azure Monitor workspace. - :vartype metrics: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceMetrics + :vartype metrics: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceMetrics :ivar provisioning_state: The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. Known values are: "Creating", "Succeeded", "Deleting", "Failed", and "Canceled". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_06_03_preview.models.ProvisioningState + ~azure.mgmt.monitor.v2021_06_03_preview.models.ProvisioningState :ivar default_ingestion_settings: The Data Collection Rule and Endpoint used for ingestion by default. :vartype default_ingestion_settings: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceDefaultIngestionSettings + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceDefaultIngestionSettings """ _validation = { @@ -193,7 +192,7 @@ class Resource(_serialization.Model): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~$(python-base-namespace).v2021_06_03_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_06_03_preview.models.SystemData """ _validation = { @@ -237,7 +236,7 @@ class TrackedResource(Resource): :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~$(python-base-namespace).v2021_06_03_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_06_03_preview.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. @@ -290,7 +289,7 @@ class AzureMonitorWorkspaceResource(TrackedResource): # pylint: disable=too-man :vartype type: str :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy information. - :vartype system_data: ~$(python-base-namespace).v2021_06_03_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_06_03_preview.models.SystemData :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. @@ -300,17 +299,16 @@ class AzureMonitorWorkspaceResource(TrackedResource): # pylint: disable=too-man :ivar account_id: The immutable ID of the Azure Monitor workspace. This property is read-only. :vartype account_id: str :ivar metrics: Information about metrics for the Azure Monitor workspace. - :vartype metrics: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceMetrics + :vartype metrics: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceMetrics :ivar provisioning_state: The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. Known values are: "Creating", "Succeeded", "Deleting", "Failed", and "Canceled". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_06_03_preview.models.ProvisioningState + ~azure.mgmt.monitor.v2021_06_03_preview.models.ProvisioningState :ivar default_ingestion_settings: The Data Collection Rule and Endpoint used for ingestion by default. :vartype default_ingestion_settings: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceDefaultIngestionSettings + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceDefaultIngestionSettings """ _validation = { @@ -385,7 +383,7 @@ class AzureMonitorWorkspaceResourceListResult(_serialization.Model): :ivar value: A list of resources. Required. :vartype value: - list[~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource] + list[~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -405,7 +403,7 @@ def __init__( """ :keyword value: A list of resources. Required. :paramtype value: - list[~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource] + list[~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -422,17 +420,16 @@ class AzureMonitorWorkspaceResourceProperties(AzureMonitorWorkspace): :ivar account_id: The immutable ID of the Azure Monitor workspace. This property is read-only. :vartype account_id: str :ivar metrics: Information about metrics for the Azure Monitor workspace. - :vartype metrics: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceMetrics + :vartype metrics: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceMetrics :ivar provisioning_state: The provisioning state of the Azure Monitor workspace. Set to Succeeded if everything is healthy. Known values are: "Creating", "Succeeded", "Deleting", "Failed", and "Canceled". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_06_03_preview.models.ProvisioningState + ~azure.mgmt.monitor.v2021_06_03_preview.models.ProvisioningState :ivar default_ingestion_settings: The Data Collection Rule and Endpoint used for ingestion by default. :vartype default_ingestion_settings: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceDefaultIngestionSettings + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceDefaultIngestionSettings """ _validation = { @@ -497,10 +494,10 @@ class ErrorDetail(_serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~$(python-base-namespace).v2021_06_03_preview.models.ErrorDetail] + :vartype details: list[~azure.mgmt.monitor.v2021_06_03_preview.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: - list[~$(python-base-namespace).v2021_06_03_preview.models.ErrorAdditionalInfo] + list[~azure.mgmt.monitor.v2021_06_03_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -534,7 +531,7 @@ class ErrorResponse(_serialization.Model): operations. (This also follows the OData error response format.). :ivar error: The error object. - :vartype error: ~$(python-base-namespace).v2021_06_03_preview.models.ErrorDetail + :vartype error: ~azure.mgmt.monitor.v2021_06_03_preview.models.ErrorDetail """ _attribute_map = { @@ -544,7 +541,7 @@ class ErrorResponse(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~$(python-base-namespace).v2021_06_03_preview.models.ErrorDetail + :paramtype error: ~azure.mgmt.monitor.v2021_06_03_preview.models.ErrorDetail """ super().__init__(**kwargs) self.error = error @@ -562,14 +559,14 @@ class Operation(_serialization.Model): data-plane operations and "false" for ARM/control-plane operations. :vartype is_data_action: bool :ivar display: Localized display information for this particular operation. - :vartype display: ~$(python-base-namespace).v2021_06_03_preview.models.OperationDisplay + :vartype display: ~azure.mgmt.monitor.v2021_06_03_preview.models.OperationDisplay :ivar origin: The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system". Known values are: "user", "system", and "user,system". - :vartype origin: str or ~$(python-base-namespace).v2021_06_03_preview.models.Origin + :vartype origin: str or ~azure.mgmt.monitor.v2021_06_03_preview.models.Origin :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. "Internal" - :vartype action_type: str or ~$(python-base-namespace).v2021_06_03_preview.models.ActionType + :vartype action_type: str or ~azure.mgmt.monitor.v2021_06_03_preview.models.ActionType """ _validation = { @@ -590,7 +587,7 @@ class Operation(_serialization.Model): def __init__(self, *, display: Optional["_models.OperationDisplay"] = None, **kwargs: Any) -> None: """ :keyword display: Localized display information for this particular operation. - :paramtype display: ~$(python-base-namespace).v2021_06_03_preview.models.OperationDisplay + :paramtype display: ~azure.mgmt.monitor.v2021_06_03_preview.models.OperationDisplay """ super().__init__(**kwargs) self.name = None @@ -649,7 +646,7 @@ class OperationListResult(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: List of operations supported by the resource provider. - :vartype value: list[~$(python-base-namespace).v2021_06_03_preview.models.Operation] + :vartype value: list[~azure.mgmt.monitor.v2021_06_03_preview.models.Operation] :ivar next_link: URL to get the next set of operation list results (if there are any). :vartype next_link: str """ @@ -678,8 +675,7 @@ class SystemData(_serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or - ~$(python-base-namespace).v2021_06_03_preview.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2021_06_03_preview.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. @@ -687,7 +683,7 @@ class SystemData(_serialization.Model): :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2021_06_03_preview.models.CreatedByType + ~azure.mgmt.monitor.v2021_06_03_preview.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -717,8 +713,7 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or - ~$(python-base-namespace).v2021_06_03_preview.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2021_06_03_preview.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. @@ -726,7 +721,7 @@ def __init__( :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2021_06_03_preview.models.CreatedByType + ~azure.mgmt.monitor.v2021_06_03_preview.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_azure_monitor_workspaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_azure_monitor_workspaces_operations.py index 2fc738879ac6..945e7e38b668 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_azure_monitor_workspaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_azure_monitor_workspaces_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,9 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,9 +96,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,9 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -182,9 +169,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -222,9 +207,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -259,7 +242,7 @@ class AzureMonitorWorkspacesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_06_03_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_06_03_preview.MonitorManagementClient`'s :attr:`azure_monitor_workspaces` attribute. """ @@ -285,15 +268,13 @@ def list_by_resource_group( :return: An iterator like instance of either AzureMonitorWorkspaceResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -373,15 +354,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AzureMonitorW :return: An iterator like instance of either AzureMonitorWorkspaceResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -464,7 +443,7 @@ def get( :type azure_monitor_workspace_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -478,9 +457,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) request = build_get_request( @@ -539,13 +516,13 @@ def create( :param azure_monitor_workspace_properties: Properties that need to be specified to create a new workspace. Required. :type azure_monitor_workspace_properties: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -575,7 +552,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -598,13 +575,13 @@ def create( :param azure_monitor_workspace_properties: Properties that need to be specified to create a new workspace. Is either a AzureMonitorWorkspaceResource type or a IO type. Required. :type azure_monitor_workspace_properties: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource or IO + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -618,9 +595,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) @@ -694,13 +669,13 @@ def update( :type azure_monitor_workspace_name: str :param azure_monitor_workspace_properties: The payload. Default value is None. :type azure_monitor_workspace_properties: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResourceForUpdate + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -729,7 +704,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -752,14 +727,13 @@ def update( :param azure_monitor_workspace_properties: The payload. Is either a AzureMonitorWorkspaceResourceForUpdate type or a IO type. Default value is None. :type azure_monitor_workspace_properties: - ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResourceForUpdate or - IO + ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorWorkspaceResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_06_03_preview.models.AzureMonitorWorkspaceResource + :rtype: ~azure.mgmt.monitor.v2021_06_03_preview.models.AzureMonitorWorkspaceResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -773,9 +747,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorWorkspaceResource] = kwargs.pop("cls", None) @@ -858,9 +830,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_monitor_operations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_monitor_operations_operations.py index ea64efc67130..f91fec9a1f9e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_monitor_operations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_06_03_preview/operations/_monitor_operations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Iterable, Optional, TypeVar import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -68,7 +61,7 @@ class MonitorOperationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_06_03_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_06_03_preview.MonitorManagementClient`'s :attr:`monitor_operations` attribute. """ @@ -87,16 +80,13 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either Operation or the result of cls(response) - :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_06_03_preview.models.Operation] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_06_03_preview.models.Operation] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-06-03-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-06-03-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-06-03-preview")) cls: ClsType[_models.OperationListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_configuration.py index 8518f4b7ff2a..746cd69c06e9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-07-01-preview"] = kwargs.pop("api_version", "2021-07-01-preview") + api_version: str = kwargs.pop("api_version", "2021-07-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_monitor_management_client.py index 51cc4493ed67..e443fc8f494f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_monitor_management_client.py @@ -33,19 +33,19 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar private_link_scopes: PrivateLinkScopesOperations operations :vartype private_link_scopes: - $(python-base-namespace).v2021_07_01_preview.operations.PrivateLinkScopesOperations + azure.mgmt.monitor.v2021_07_01_preview.operations.PrivateLinkScopesOperations :ivar private_link_scope_operation_status: PrivateLinkScopeOperationStatusOperations operations :vartype private_link_scope_operation_status: - $(python-base-namespace).v2021_07_01_preview.operations.PrivateLinkScopeOperationStatusOperations + azure.mgmt.monitor.v2021_07_01_preview.operations.PrivateLinkScopeOperationStatusOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: - $(python-base-namespace).v2021_07_01_preview.operations.PrivateLinkResourcesOperations + azure.mgmt.monitor.v2021_07_01_preview.operations.PrivateLinkResourcesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: - $(python-base-namespace).v2021_07_01_preview.operations.PrivateEndpointConnectionsOperations + azure.mgmt.monitor.v2021_07_01_preview.operations.PrivateEndpointConnectionsOperations :ivar private_link_scoped_resources: PrivateLinkScopedResourcesOperations operations :vartype private_link_scoped_resources: - $(python-base-namespace).v2021_07_01_preview.operations.PrivateLinkScopedResourcesOperations + azure.mgmt.monitor.v2021_07_01_preview.operations.PrivateLinkScopedResourcesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_configuration.py index 87fb122e7741..e8bedc02dd43 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-07-01-preview"] = kwargs.pop("api_version", "2021-07-01-preview") + api_version: str = kwargs.pop("api_version", "2021-07-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_monitor_management_client.py index 60db938cb810..6480f4066fba 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/_monitor_management_client.py @@ -33,19 +33,19 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar private_link_scopes: PrivateLinkScopesOperations operations :vartype private_link_scopes: - $(python-base-namespace).v2021_07_01_preview.aio.operations.PrivateLinkScopesOperations + azure.mgmt.monitor.v2021_07_01_preview.aio.operations.PrivateLinkScopesOperations :ivar private_link_scope_operation_status: PrivateLinkScopeOperationStatusOperations operations :vartype private_link_scope_operation_status: - $(python-base-namespace).v2021_07_01_preview.aio.operations.PrivateLinkScopeOperationStatusOperations + azure.mgmt.monitor.v2021_07_01_preview.aio.operations.PrivateLinkScopeOperationStatusOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: - $(python-base-namespace).v2021_07_01_preview.aio.operations.PrivateLinkResourcesOperations + azure.mgmt.monitor.v2021_07_01_preview.aio.operations.PrivateLinkResourcesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: - $(python-base-namespace).v2021_07_01_preview.aio.operations.PrivateEndpointConnectionsOperations + azure.mgmt.monitor.v2021_07_01_preview.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_scoped_resources: PrivateLinkScopedResourcesOperations operations :vartype private_link_scoped_resources: - $(python-base-namespace).v2021_07_01_preview.aio.operations.PrivateLinkScopedResourcesOperations + azure.mgmt.monitor.v2021_07_01_preview.aio.operations.PrivateLinkScopedResourcesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_endpoint_connections_operations.py index 7b10a907e2d2..6e2eb36a258f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -35,10 +34,6 @@ build_list_by_private_link_scope_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ class PrivateEndpointConnectionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.aio.MonitorManagementClient`'s :attr:`private_endpoint_connections` attribute. """ @@ -77,7 +72,7 @@ async def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -91,9 +86,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -151,9 +144,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -227,8 +218,7 @@ async def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Required. - :type parameters: - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -243,7 +233,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -283,7 +273,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -306,8 +296,8 @@ async def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Is either a PrivateEndpointConnection type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection or IO + :type parameters: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -322,15 +312,13 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -390,9 +378,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -455,9 +441,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -511,8 +495,7 @@ async def list_by_private_link_scope( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnectionListResult + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnectionListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -526,9 +509,7 @@ async def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) request = build_list_by_private_link_scope_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_resources_operations.py index cd0b9d9f7125..a5d13a354e31 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._private_link_resources_operations import build_get_request, build_list_by_private_link_scope_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class PrivateLinkResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.aio.MonitorManagementClient`'s :attr:`private_link_resources` attribute. """ @@ -68,7 +63,7 @@ async def list_by_private_link_scope( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.PrivateLinkResourceListResult + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -82,9 +77,7 @@ async def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) request = build_list_by_private_link_scope_request( @@ -137,7 +130,7 @@ async def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.PrivateLinkResource + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -151,9 +144,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scope_operation_status_operations.py index 6373278c3ba2..6c09e972797f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scope_operation_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._vendor import _convert_request from ...operations._private_link_scope_operation_status_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -42,7 +37,7 @@ class PrivateLinkScopeOperationStatusOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.aio.MonitorManagementClient`'s :attr:`private_link_scope_operation_status` attribute. """ @@ -67,7 +62,7 @@ async def get(self, async_operation_id: str, resource_group_name: str, **kwargs: :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationStatus or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.OperationStatus + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.OperationStatus :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -81,9 +76,7 @@ async def get(self, async_operation_id: str, resource_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scoped_resources_operations.py index d62cdc57d4e7..12fe7bf5c75c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scoped_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_private_link_scope_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class PrivateLinkScopedResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.aio.MonitorManagementClient`'s :attr:`private_link_scoped_resources` attribute. """ @@ -78,7 +73,7 @@ async def get(self, resource_group_name: str, scope_name: str, name: str, **kwar :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScopedResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -92,9 +87,7 @@ async def get(self, resource_group_name: str, scope_name: str, name: str, **kwar _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) request = build_get_request( @@ -152,9 +145,7 @@ async def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ScopedResource]] = kwargs.pop("cls", None) @@ -231,7 +222,7 @@ async def begin_create_or_update( :param name: The name of the scoped resource object. Required. :type name: str :param parameters: Required. - :type parameters: ~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource + :type parameters: ~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -246,7 +237,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either ScopedResource or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -286,7 +277,7 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either ScopedResource or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -309,7 +300,7 @@ async def begin_create_or_update( :param name: The name of the scoped resource object. Required. :type name: str :param parameters: Is either a ScopedResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource or IO + :type parameters: ~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -324,15 +315,13 @@ async def begin_create_or_update( :return: An instance of AsyncLROPoller that returns either ScopedResource or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -392,9 +381,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -457,9 +444,7 @@ async def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -514,15 +499,13 @@ def list_by_private_link_scope( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ScopedResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.ScopedResourceListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scopes_operations.py index e1532d99a223..298dbf7c95d7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/aio/operations/_private_link_scopes_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -40,10 +39,6 @@ build_update_tags_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -54,7 +49,7 @@ class PrivateLinkScopesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.aio.MonitorManagementClient`'s :attr:`private_link_scopes` attribute. """ @@ -75,15 +70,13 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.AzureMonitorPrivateLinkS :return: An iterator like instance of either AzureMonitorPrivateLinkScope or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -165,15 +158,13 @@ def list_by_resource_group( :return: An iterator like instance of either AzureMonitorPrivateLinkScope or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -259,9 +250,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -319,9 +308,7 @@ async def begin_delete(self, resource_group_name: str, scope_name: str, **kwargs _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -374,7 +361,7 @@ async def get( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -388,9 +375,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) request = build_get_request( @@ -449,13 +434,13 @@ async def create_or_update( :param azure_monitor_private_link_scope_payload: Properties that need to be specified to create or update a Azure Monitor PrivateLinkScope. Required. :type azure_monitor_private_link_scope_payload: - ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -485,7 +470,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -509,13 +494,13 @@ async def create_or_update( or update a Azure Monitor PrivateLinkScope. Is either a AzureMonitorPrivateLinkScope type or a IO type. Required. :type azure_monitor_private_link_scope_payload: - ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope or IO + ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -529,9 +514,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) @@ -605,14 +588,13 @@ async def update_tags( :type scope_name: str :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope instance. Required. - :type private_link_scope_tags: - ~$(python-base-namespace).v2021_07_01_preview.models.TagsResource + :type private_link_scope_tags: ~azure.mgmt.monitor.v2021_07_01_preview.models.TagsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -642,7 +624,7 @@ async def update_tags( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -664,14 +646,14 @@ async def update_tags( :type scope_name: str :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope instance. Is either a TagsResource type or a IO type. Required. - :type private_link_scope_tags: - ~$(python-base-namespace).v2021_07_01_preview.models.TagsResource or IO + :type private_link_scope_tags: ~azure.mgmt.monitor.v2021_07_01_preview.models.TagsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -685,9 +667,7 @@ async def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/models/_models_py3.py index 61c89db9f1ef..9ab87ce13af6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/models/_models_py3.py @@ -26,18 +26,17 @@ class AccessModeSettings(_serialization.Model): private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. Required. Known values are: "Open" and "PrivateOnly". - :vartype query_access_mode: str or - ~$(python-base-namespace).v2021_07_01_preview.models.AccessMode + :vartype query_access_mode: str or ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessMode :ivar ingestion_access_mode: Specifies the default access mode of ingestion through associated private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. Required. Known values are: "Open" and "PrivateOnly". :vartype ingestion_access_mode: str or - ~$(python-base-namespace).v2021_07_01_preview.models.AccessMode + ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessMode :ivar exclusions: List of exclusions that override the default access mode settings for specific private endpoint connections. :vartype exclusions: - list[~$(python-base-namespace).v2021_07_01_preview.models.AccessModeSettingsExclusion] + list[~azure.mgmt.monitor.v2021_07_01_preview.models.AccessModeSettingsExclusion] """ _validation = { @@ -64,18 +63,17 @@ def __init__( private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. Required. Known values are: "Open" and "PrivateOnly". - :paramtype query_access_mode: str or - ~$(python-base-namespace).v2021_07_01_preview.models.AccessMode + :paramtype query_access_mode: str or ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessMode :keyword ingestion_access_mode: Specifies the default access mode of ingestion through associated private endpoints in scope. If not specified default value is 'Open'. You can override this default setting for a specific private endpoint connection by adding an exclusion in the 'exclusions' array. Required. Known values are: "Open" and "PrivateOnly". :paramtype ingestion_access_mode: str or - ~$(python-base-namespace).v2021_07_01_preview.models.AccessMode + ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessMode :keyword exclusions: List of exclusions that override the default access mode settings for specific private endpoint connections. :paramtype exclusions: - list[~$(python-base-namespace).v2021_07_01_preview.models.AccessModeSettingsExclusion] + list[~azure.mgmt.monitor.v2021_07_01_preview.models.AccessModeSettingsExclusion] """ super().__init__(**kwargs) self.query_access_mode = query_access_mode @@ -93,12 +91,11 @@ class AccessModeSettingsExclusion(_serialization.Model): :vartype private_endpoint_connection_name: str :ivar query_access_mode: Specifies the access mode of queries through the specified private endpoint connection in the exclusion. Known values are: "Open" and "PrivateOnly". - :vartype query_access_mode: str or - ~$(python-base-namespace).v2021_07_01_preview.models.AccessMode + :vartype query_access_mode: str or ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessMode :ivar ingestion_access_mode: Specifies the access mode of ingestion through the specified private endpoint connection in the exclusion. Known values are: "Open" and "PrivateOnly". :vartype ingestion_access_mode: str or - ~$(python-base-namespace).v2021_07_01_preview.models.AccessMode + ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessMode """ _attribute_map = { @@ -121,12 +118,11 @@ def __init__( :paramtype private_endpoint_connection_name: str :keyword query_access_mode: Specifies the access mode of queries through the specified private endpoint connection in the exclusion. Known values are: "Open" and "PrivateOnly". - :paramtype query_access_mode: str or - ~$(python-base-namespace).v2021_07_01_preview.models.AccessMode + :paramtype query_access_mode: str or ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessMode :keyword ingestion_access_mode: Specifies the access mode of ingestion through the specified private endpoint connection in the exclusion. Known values are: "Open" and "PrivateOnly". :paramtype ingestion_access_mode: str or - ~$(python-base-namespace).v2021_07_01_preview.models.AccessMode + ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessMode """ super().__init__(**kwargs) self.private_endpoint_connection_name = private_endpoint_connection_name @@ -238,17 +234,17 @@ class AzureMonitorPrivateLinkScope(TrackedResource): :ivar location: The geo-location where the resource lives. Required. :vartype location: str :ivar system_data: System data. - :vartype system_data: ~$(python-base-namespace).v2021_07_01_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_07_01_preview.models.SystemData :ivar provisioning_state: Current state of this PrivateLinkScope: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. :vartype provisioning_state: str :ivar private_endpoint_connections: List of private endpoint connections. :vartype private_endpoint_connections: - list[~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection] + list[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection] :ivar access_mode_settings: Access mode settings. Required. :vartype access_mode_settings: - ~$(python-base-namespace).v2021_07_01_preview.models.AccessModeSettings + ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessModeSettings """ _validation = { @@ -292,7 +288,7 @@ def __init__( :paramtype location: str :keyword access_mode_settings: Access mode settings. Required. :paramtype access_mode_settings: - ~$(python-base-namespace).v2021_07_01_preview.models.AccessModeSettings + ~azure.mgmt.monitor.v2021_07_01_preview.models.AccessModeSettings """ super().__init__(tags=tags, location=location, **kwargs) self.system_data = None @@ -308,7 +304,7 @@ class AzureMonitorPrivateLinkScopeListResult(_serialization.Model): :ivar value: List of Azure Monitor PrivateLinkScope definitions. Required. :vartype value: - list[~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] + list[~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] :ivar next_link: The URI to get the next set of Azure Monitor PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the result set. :vartype next_link: str @@ -329,7 +325,7 @@ def __init__( """ :keyword value: List of Azure Monitor PrivateLinkScope definitions. Required. :paramtype value: - list[~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] + list[~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] :keyword next_link: The URI to get the next set of Azure Monitor PrivateLinkScope definitions if too many PrivateLinkScopes where returned in the result set. :paramtype next_link: str @@ -344,7 +340,7 @@ class DefaultErrorResponse(_serialization.Model): operations. (This also follows the OData error response format.). :ivar error: The error object. - :vartype error: ~$(python-base-namespace).v2021_07_01_preview.models.ErrorDetail + :vartype error: ~azure.mgmt.monitor.v2021_07_01_preview.models.ErrorDetail """ _attribute_map = { @@ -354,7 +350,7 @@ class DefaultErrorResponse(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~$(python-base-namespace).v2021_07_01_preview.models.ErrorDetail + :paramtype error: ~azure.mgmt.monitor.v2021_07_01_preview.models.ErrorDetail """ super().__init__(**kwargs) self.error = error @@ -400,10 +396,10 @@ class ErrorDetail(_serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~$(python-base-namespace).v2021_07_01_preview.models.ErrorDetail] + :vartype details: list[~azure.mgmt.monitor.v2021_07_01_preview.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: - list[~$(python-base-namespace).v2021_07_01_preview.models.ErrorAdditionalInfo] + list[~azure.mgmt.monitor.v2021_07_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -446,7 +442,7 @@ class OperationStatus(_serialization.Model): :ivar status: The status of the operation. :vartype status: str :ivar error: The error detail of the operation if any. - :vartype error: ~$(python-base-namespace).v2021_07_01_preview.models.ErrorDetail + :vartype error: ~azure.mgmt.monitor.v2021_07_01_preview.models.ErrorDetail """ _attribute_map = { @@ -481,7 +477,7 @@ def __init__( :keyword status: The status of the operation. :paramtype status: str :keyword error: The error detail of the operation if any. - :paramtype error: ~$(python-base-namespace).v2021_07_01_preview.models.ErrorDetail + :paramtype error: ~azure.mgmt.monitor.v2021_07_01_preview.models.ErrorDetail """ super().__init__(**kwargs) self.id = id @@ -529,15 +525,15 @@ class PrivateEndpointConnection(Resource): "Microsoft.Storage/storageAccounts". :vartype type: str :ivar private_endpoint: The resource of private end point. - :vartype private_endpoint: ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpoint + :vartype private_endpoint: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpoint :ivar private_link_service_connection_state: A collection of information about the state of the connection between service consumer and provider. :vartype private_link_service_connection_state: - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateLinkServiceConnectionState + ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateLinkServiceConnectionState :ivar provisioning_state: The provisioning state of the private endpoint connection resource. Known values are: "Succeeded", "Creating", "Deleting", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnectionProvisioningState + ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnectionProvisioningState """ _validation = { @@ -568,12 +564,11 @@ def __init__( ) -> None: """ :keyword private_endpoint: The resource of private end point. - :paramtype private_endpoint: - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpoint + :paramtype private_endpoint: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpoint :keyword private_link_service_connection_state: A collection of information about the state of the connection between service consumer and provider. :paramtype private_link_service_connection_state: - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateLinkServiceConnectionState + ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateLinkServiceConnectionState """ super().__init__(**kwargs) self.private_endpoint = private_endpoint @@ -585,8 +580,7 @@ class PrivateEndpointConnectionListResult(_serialization.Model): """List of private endpoint connection associated with the specified storage account. :ivar value: Array of private endpoint connections. - :vartype value: - list[~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection] + :vartype value: list[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection] """ _attribute_map = { @@ -597,7 +591,7 @@ def __init__(self, *, value: Optional[List["_models.PrivateEndpointConnection"]] """ :keyword value: Array of private endpoint connections. :paramtype value: - list[~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection] + list[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection] """ super().__init__(**kwargs) self.value = value @@ -656,7 +650,7 @@ class PrivateLinkResourceListResult(_serialization.Model): """A list of private link resources. :ivar value: Array of private link resources. - :vartype value: list[~$(python-base-namespace).v2021_07_01_preview.models.PrivateLinkResource] + :vartype value: list[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateLinkResource] """ _attribute_map = { @@ -666,8 +660,7 @@ class PrivateLinkResourceListResult(_serialization.Model): def __init__(self, *, value: Optional[List["_models.PrivateLinkResource"]] = None, **kwargs: Any) -> None: """ :keyword value: Array of private link resources. - :paramtype value: - list[~$(python-base-namespace).v2021_07_01_preview.models.PrivateLinkResource] + :paramtype value: list[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateLinkResource] """ super().__init__(**kwargs) self.value = value @@ -680,7 +673,7 @@ class PrivateLinkServiceConnectionState(_serialization.Model): :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Known values are: "Pending", "Approved", and "Rejected". :vartype status: str or - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointServiceConnectionStatus + ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointServiceConnectionStatus :ivar description: The reason for approval/rejection of the connection. :vartype description: str :ivar actions_required: A message indicating if changes on the service provider require any @@ -706,7 +699,7 @@ def __init__( :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Known values are: "Pending", "Approved", and "Rejected". :paramtype status: str or - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointServiceConnectionStatus + ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointServiceConnectionStatus :keyword description: The reason for approval/rejection of the connection. :paramtype description: str :keyword actions_required: A message indicating if changes on the service provider require any @@ -766,7 +759,7 @@ class ScopedResource(ProxyResource): "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: System data. - :vartype system_data: ~$(python-base-namespace).v2021_07_01_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2021_07_01_preview.models.SystemData :ivar linked_resource_id: The resource id of the scoped Azure monitor resource. :vartype linked_resource_id: str :ivar provisioning_state: State of the private endpoint connection. @@ -807,7 +800,7 @@ class ScopedResourceListResult(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: Array of results. - :vartype value: list[~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource] + :vartype value: list[~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource] :ivar next_link: Link to retrieve next page of results. :vartype next_link: str """ @@ -836,8 +829,7 @@ class SystemData(_serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or - ~$(python-base-namespace).v2021_07_01_preview.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2021_07_01_preview.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. @@ -845,7 +837,7 @@ class SystemData(_serialization.Model): :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2021_07_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2021_07_01_preview.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -875,8 +867,7 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or - ~$(python-base-namespace).v2021_07_01_preview.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2021_07_01_preview.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. @@ -884,7 +875,7 @@ def __init__( :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2021_07_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2021_07_01_preview.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_endpoint_connections_operations.py index 6151944736f0..bf43481d3794 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload from azure.core.exceptions import ( @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -51,9 +46,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,9 +86,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -138,9 +129,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -176,9 +165,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -211,7 +198,7 @@ class PrivateEndpointConnectionsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.MonitorManagementClient`'s :attr:`private_endpoint_connections` attribute. """ @@ -239,7 +226,7 @@ def get( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnection or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -253,9 +240,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) request = build_get_request( @@ -313,9 +298,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.PrivateEndpointConnection]] = kwargs.pop("cls", None) @@ -389,8 +372,7 @@ def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Required. - :type parameters: - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection + :type parameters: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -405,7 +387,7 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -445,7 +427,7 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -468,8 +450,8 @@ def begin_create_or_update( :param private_endpoint_connection_name: The name of the private endpoint connection. Required. :type private_endpoint_connection_name: str :param parameters: Is either a PrivateEndpointConnection type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection or IO + :type parameters: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -484,15 +466,13 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnection] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -552,9 +532,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -617,9 +595,7 @@ def begin_delete( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -673,8 +649,7 @@ def list_by_private_link_scope( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateEndpointConnectionListResult or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2021_07_01_preview.models.PrivateEndpointConnectionListResult + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateEndpointConnectionListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -688,9 +663,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateEndpointConnectionListResult] = kwargs.pop("cls", None) request = build_list_by_private_link_scope_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_resources_operations.py index c2d4f89bcca9..834b2647e84c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,9 +73,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,7 +107,7 @@ class PrivateLinkResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.MonitorManagementClient`'s :attr:`private_link_resources` attribute. """ @@ -142,7 +133,7 @@ def list_by_private_link_scope( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResourceListResult or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.PrivateLinkResourceListResult + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateLinkResourceListResult :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -156,9 +147,7 @@ def list_by_private_link_scope( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateLinkResourceListResult] = kwargs.pop("cls", None) request = build_list_by_private_link_scope_request( @@ -211,7 +200,7 @@ def get( :type group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PrivateLinkResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.PrivateLinkResource + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.PrivateLinkResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -225,9 +214,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.PrivateLinkResource] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scope_operation_status_operations.py index f8f129ea0317..8954342765be 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scope_operation_status_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -28,10 +27,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -80,7 +73,7 @@ class PrivateLinkScopeOperationStatusOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.MonitorManagementClient`'s :attr:`private_link_scope_operation_status` attribute. """ @@ -105,7 +98,7 @@ def get(self, async_operation_id: str, resource_group_name: str, **kwargs: Any) :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: OperationStatus or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.OperationStatus + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.OperationStatus :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -119,9 +112,7 @@ def get(self, async_operation_id: str, resource_group_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.OperationStatus] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scoped_resources_operations.py index 65b92219a7b3..f970d2f14190 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scoped_resources_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,9 +44,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -85,9 +78,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -124,9 +115,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -160,9 +149,7 @@ def build_list_by_private_link_scope_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -195,7 +182,7 @@ class PrivateLinkScopedResourcesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.MonitorManagementClient`'s :attr:`private_link_scoped_resources` attribute. """ @@ -221,7 +208,7 @@ def get(self, resource_group_name: str, scope_name: str, name: str, **kwargs: An :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScopedResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -235,9 +222,7 @@ def get(self, resource_group_name: str, scope_name: str, name: str, **kwargs: An _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) request = build_get_request( @@ -295,9 +280,7 @@ def _create_or_update_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.ScopedResource]] = kwargs.pop("cls", None) @@ -374,7 +357,7 @@ def begin_create_or_update( :param name: The name of the scoped resource object. Required. :type name: str :param parameters: Required. - :type parameters: ~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource + :type parameters: ~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -389,7 +372,7 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either ScopedResource or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -429,7 +412,7 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either ScopedResource or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -452,7 +435,7 @@ def begin_create_or_update( :param name: The name of the scoped resource object. Required. :type name: str :param parameters: Is either a ScopedResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource or IO + :type parameters: ~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -467,15 +450,13 @@ def begin_create_or_update( :return: An instance of LROPoller that returns either ScopedResource or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScopedResource] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -535,9 +516,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -598,9 +577,7 @@ def begin_delete(self, resource_group_name: str, scope_name: str, name: str, **k _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -655,15 +632,13 @@ def list_by_private_link_scope( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ScopedResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_07_01_preview.models.ScopedResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_07_01_preview.models.ScopedResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.ScopedResourceListResult] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scopes_operations.py index eff49d506559..04fb65892d85 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_07_01_preview/operations/_private_link_scopes_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_list_request(subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,9 +96,7 @@ def build_delete_request(resource_group_name: str, scope_name: str, subscription _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,9 +127,7 @@ def build_get_request(resource_group_name: str, scope_name: str, subscription_id _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -173,9 +160,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -211,9 +196,7 @@ def build_update_tags_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -249,7 +232,7 @@ class PrivateLinkScopesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_07_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_07_01_preview.MonitorManagementClient`'s :attr:`private_link_scopes` attribute. """ @@ -270,15 +253,13 @@ def list(self, **kwargs: Any) -> Iterable["_models.AzureMonitorPrivateLinkScope" :return: An iterator like instance of either AzureMonitorPrivateLinkScope or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -360,15 +341,13 @@ def list_by_resource_group( :return: An iterator like instance of either AzureMonitorPrivateLinkScope or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScopeListResult] = kwargs.pop("cls", None) error_map = { @@ -454,9 +433,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -514,9 +491,7 @@ def begin_delete(self, resource_group_name: str, scope_name: str, **kwargs: Any) _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -567,7 +542,7 @@ def get(self, resource_group_name: str, scope_name: str, **kwargs: Any) -> _mode :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -581,9 +556,7 @@ def get(self, resource_group_name: str, scope_name: str, **kwargs: Any) -> _mode _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) request = build_get_request( @@ -642,13 +615,13 @@ def create_or_update( :param azure_monitor_private_link_scope_payload: Properties that need to be specified to create or update a Azure Monitor PrivateLinkScope. Required. :type azure_monitor_private_link_scope_payload: - ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -678,7 +651,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -702,13 +675,13 @@ def create_or_update( or update a Azure Monitor PrivateLinkScope. Is either a AzureMonitorPrivateLinkScope type or a IO type. Required. :type azure_monitor_private_link_scope_payload: - ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope or IO + ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -722,9 +695,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) @@ -798,14 +769,13 @@ def update_tags( :type scope_name: str :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope instance. Required. - :type private_link_scope_tags: - ~$(python-base-namespace).v2021_07_01_preview.models.TagsResource + :type private_link_scope_tags: ~azure.mgmt.monitor.v2021_07_01_preview.models.TagsResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -835,7 +805,7 @@ def update_tags( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ @@ -857,14 +827,14 @@ def update_tags( :type scope_name: str :param private_link_scope_tags: Updated tag information to set into the PrivateLinkScope instance. Is either a TagsResource type or a IO type. Required. - :type private_link_scope_tags: - ~$(python-base-namespace).v2021_07_01_preview.models.TagsResource or IO + :type private_link_scope_tags: ~azure.mgmt.monitor.v2021_07_01_preview.models.TagsResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AzureMonitorPrivateLinkScope or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_07_01_preview.models.AzureMonitorPrivateLinkScope + :rtype: ~azure.mgmt.monitor.v2021_07_01_preview.models.AzureMonitorPrivateLinkScope :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -878,9 +848,7 @@ def update_tags( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-07-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-07-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-07-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AzureMonitorPrivateLinkScope] = kwargs.pop("cls", None) 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 7a6d3c839c73..cacdad67be60 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", "2021-09-01") + api_version: str = kwargs.pop("api_version", "2021-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index ddc082f9f4c7..2ef72036c28a 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_management_client.py @@ -26,7 +26,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2021_09_01.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2021_09_01.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 0416c819bcb8..cbebb0cdaa7c 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", "2021-09-01") + api_version: str = kwargs.pop("api_version", "2021-09-01") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 4446f06be6ca..91cba56ea223 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_management_client.py @@ -26,8 +26,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2021_09_01.aio.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2021_09_01.aio.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py index 9a367e67151f..a25f3a940aeb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -47,10 +46,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +56,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_09_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_09_01.aio.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -92,13 +87,13 @@ async def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -126,7 +121,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -147,13 +142,13 @@ async def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -167,7 +162,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -232,7 +227,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -246,7 +241,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -311,7 +306,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -363,13 +358,13 @@ async def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2021_09_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -397,7 +392,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -418,14 +413,13 @@ async def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2021_09_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -439,7 +433,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -503,7 +497,7 @@ async def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -569,8 +563,7 @@ async def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -585,7 +578,7 @@ async def begin_post_test_notifications( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -612,7 +605,7 @@ async def begin_post_test_notifications( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -624,8 +617,8 @@ async def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -640,13 +633,13 @@ async def begin_post_test_notifications( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -691,7 +684,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications" } - async def _create_notifications_at_resource_group_level_initial( + async def _create_notifications_at_resource_group_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> Optional[_models.TestNotificationDetailsResponse]: error_map = { @@ -705,7 +698,7 @@ async def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -761,7 +754,7 @@ async def _create_notifications_at_resource_group_level_initial( } @overload - async def begin_create_notifications_at_resource_group_level( + async def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: _models.NotificationRequestBody, @@ -776,8 +769,7 @@ async def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -792,12 +784,12 @@ async def begin_create_notifications_at_resource_group_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_notifications_at_resource_group_level( + async def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: IO, @@ -827,12 +819,12 @@ async def begin_create_notifications_at_resource_group_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_notifications_at_resource_group_level( + async def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> AsyncLROPoller[_models.TestNotificationDetailsResponse]: """Send test notifications to a set of provided receivers. @@ -842,8 +834,8 @@ async def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -858,13 +850,13 @@ async def begin_create_notifications_at_resource_group_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -910,7 +902,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/createNotifications" } - async def _create_notifications_at_action_group_resource_level_initial( + async def _create_notifications_at_action_group_resource_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -928,7 +920,7 @@ async def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -985,7 +977,7 @@ async def _create_notifications_at_action_group_resource_level_initial( } @overload - async def begin_create_notifications_at_action_group_resource_level( + async def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1003,8 +995,7 @@ async def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1019,12 +1010,12 @@ async def begin_create_notifications_at_action_group_resource_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_notifications_at_action_group_resource_level( + async def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1057,12 +1048,12 @@ async def begin_create_notifications_at_action_group_resource_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_notifications_at_action_group_resource_level( + async def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1078,8 +1069,8 @@ async def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1094,13 +1085,13 @@ async def begin_create_notifications_at_action_group_resource_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1157,7 +1148,7 @@ async def get_test_notifications( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1171,7 +1162,7 @@ async def get_test_notifications( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1209,7 +1200,7 @@ async def get_test_notifications( } @distributed_trace_async - async def get_test_notifications_at_resource_group_level( + async def get_test_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1221,7 +1212,7 @@ async def get_test_notifications_at_resource_group_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1235,7 +1226,7 @@ async def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1274,7 +1265,7 @@ async def get_test_notifications_at_resource_group_level( } @distributed_trace_async - async def get_test_notifications_at_action_group_resource_level( + async def get_test_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1288,7 +1279,7 @@ async def get_test_notifications_at_action_group_resource_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1302,7 +1293,7 @@ async def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1348,13 +1339,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_09_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1437,13 +1428,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_09_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1534,7 +1525,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2021_09_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2021_09_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1591,7 +1582,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2021_09_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2021_09_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1611,7 +1602,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models_py3.py index 8efe0a3b6148..3894b56cc389 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models_py3.py @@ -80,7 +80,7 @@ class ActionGroupList(_serialization.Model): """A list of action groups. :ivar value: The list of action groups. - :vartype value: list[~$(python-base-namespace).v2021_09_01.models.ActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -99,7 +99,7 @@ def __init__( ) -> None: """ :keyword value: The list of action groups. - :paramtype value: list[~$(python-base-namespace).v2021_09_01.models.ActionGroupResource] + :paramtype value: list[~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -208,36 +208,34 @@ class ActionGroupResource(AzureResource): # pylint: disable=too-many-instance-a enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2021_09_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2021_09_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2021_09_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2021_09_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2021_09_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2021_09_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2021_09_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.ArmRoleReceiver] :ivar event_hub_receivers: The list of event hub receivers that are part of this action group. - :vartype event_hub_receivers: - list[~$(python-base-namespace).v2021_09_01.models.EventHubReceiver] + :vartype event_hub_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.EventHubReceiver] """ _validation = { @@ -304,40 +302,36 @@ def __init__( enabled, then none of its receivers will receive communications. :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2021_09_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2021_09_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2021_09_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2021_09_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2021_09_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2021_09_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2021_09_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.ArmRoleReceiver] :keyword event_hub_receivers: The list of event hub receivers that are part of this action group. - :paramtype event_hub_receivers: - list[~$(python-base-namespace).v2021_09_01.models.EventHubReceiver] + :paramtype event_hub_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.EventHubReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name @@ -617,7 +611,7 @@ class EmailReceiver(_serialization.Model): :vartype use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2021_09_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2021_09_01.models.ReceiverStatus """ _validation = { @@ -900,36 +894,34 @@ class NotificationRequestBody(_serialization.Model): # pylint: disable=too-many actualcostbudget, forecastedbudget. Required. :vartype alert_type: str :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2021_09_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2021_09_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2021_09_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2021_09_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2021_09_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2021_09_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2021_09_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.ArmRoleReceiver] :ivar event_hub_receivers: The list of event hub receivers that are part of this action group. - :vartype event_hub_receivers: - list[~$(python-base-namespace).v2021_09_01.models.EventHubReceiver] + :vartype event_hub_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.EventHubReceiver] """ _validation = { @@ -975,40 +967,36 @@ def __init__( actualcostbudget, forecastedbudget. Required. :paramtype alert_type: str :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2021_09_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2021_09_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2021_09_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2021_09_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2021_09_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2021_09_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2021_09_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2021_09_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2021_09_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.ArmRoleReceiver] :keyword event_hub_receivers: The list of event hub receivers that are part of this action group. - :paramtype event_hub_receivers: - list[~$(python-base-namespace).v2021_09_01.models.EventHubReceiver] + :paramtype event_hub_receivers: list[~azure.mgmt.monitor.v2021_09_01.models.EventHubReceiver] """ super().__init__(**kwargs) self.alert_type = alert_type @@ -1041,7 +1029,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2021_09_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2021_09_01.models.ReceiverStatus """ _validation = { @@ -1081,7 +1069,7 @@ class TestNotificationDetailsResponse(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar context: The context info. - :vartype context: ~$(python-base-namespace).v2021_09_01.models.Context + :vartype context: ~azure.mgmt.monitor.v2021_09_01.models.Context :ivar state: The overall state. Required. :vartype state: str :ivar completed_time: The completed time. @@ -1089,7 +1077,7 @@ class TestNotificationDetailsResponse(_serialization.Model): :ivar created_time: The created time. :vartype created_time: str :ivar action_details: The list of action detail. - :vartype action_details: list[~$(python-base-namespace).v2021_09_01.models.ActionDetail] + :vartype action_details: list[~azure.mgmt.monitor.v2021_09_01.models.ActionDetail] """ _validation = { @@ -1116,7 +1104,7 @@ def __init__( ) -> None: """ :keyword context: The context info. - :paramtype context: ~$(python-base-namespace).v2021_09_01.models.Context + :paramtype context: ~azure.mgmt.monitor.v2021_09_01.models.Context :keyword state: The overall state. Required. :paramtype state: str :keyword completed_time: The completed time. @@ -1124,7 +1112,7 @@ def __init__( :keyword created_time: The created time. :paramtype created_time: str :keyword action_details: The list of action detail. - :paramtype action_details: list[~$(python-base-namespace).v2021_09_01.models.ActionDetail] + :paramtype action_details: list[~azure.mgmt.monitor.v2021_09_01.models.ActionDetail] """ super().__init__(**kwargs) self.context = context diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py index fdfb8cdc85b9..1d0a98482f43 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,7 +113,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,7 +146,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,7 +180,7 @@ def build_post_test_notifications_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -210,13 +205,13 @@ def build_post_test_notifications_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_notifications_at_resource_group_level_request( +def build_create_notifications_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -245,13 +240,13 @@ def build_create_notifications_at_resource_group_level_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_notifications_at_action_group_resource_level_request( +def build_create_notifications_at_action_group_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, action_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -285,7 +280,7 @@ def build_get_test_notifications_request(notification_id: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -309,13 +304,13 @@ def build_get_test_notifications_request(notification_id: str, subscription_id: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_test_notifications_at_resource_group_level_request( +def build_get_test_notifications_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, notification_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -342,13 +337,13 @@ def build_get_test_notifications_at_resource_group_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_test_notifications_at_action_group_resource_level_request( +def build_get_test_notifications_at_action_group_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, action_group_name: str, notification_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -380,7 +375,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -404,7 +399,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -436,7 +431,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -472,7 +467,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2021_09_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2021_09_01.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -503,13 +498,13 @@ def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -537,7 +532,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -558,13 +553,13 @@ def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -578,7 +573,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -643,7 +638,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -657,7 +652,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -722,7 +717,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -774,13 +769,13 @@ def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2021_09_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -808,7 +803,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -829,14 +824,13 @@ def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2021_09_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -850,7 +844,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -914,7 +908,7 @@ def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -980,8 +974,7 @@ def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -996,7 +989,7 @@ def begin_post_test_notifications( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -1023,7 +1016,7 @@ def begin_post_test_notifications( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -1035,8 +1028,8 @@ def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1051,13 +1044,13 @@ def begin_post_test_notifications( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1102,7 +1095,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications" } - def _create_notifications_at_resource_group_level_initial( + def _create_notifications_at_resource_group_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> Optional[_models.TestNotificationDetailsResponse]: error_map = { @@ -1116,7 +1109,7 @@ def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1172,7 +1165,7 @@ def _create_notifications_at_resource_group_level_initial( } @overload - def begin_create_notifications_at_resource_group_level( + def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: _models.NotificationRequestBody, @@ -1187,8 +1180,7 @@ def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1203,12 +1195,12 @@ def begin_create_notifications_at_resource_group_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_notifications_at_resource_group_level( + def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: IO, @@ -1238,12 +1230,12 @@ def begin_create_notifications_at_resource_group_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create_notifications_at_resource_group_level( + def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> LROPoller[_models.TestNotificationDetailsResponse]: """Send test notifications to a set of provided receivers. @@ -1253,8 +1245,8 @@ def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1269,13 +1261,13 @@ def begin_create_notifications_at_resource_group_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1321,7 +1313,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/createNotifications" } - def _create_notifications_at_action_group_resource_level_initial( + def _create_notifications_at_action_group_resource_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1339,7 +1331,7 @@ def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1396,7 +1388,7 @@ def _create_notifications_at_action_group_resource_level_initial( } @overload - def begin_create_notifications_at_action_group_resource_level( + def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1414,8 +1406,7 @@ def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1430,12 +1421,12 @@ def begin_create_notifications_at_action_group_resource_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_notifications_at_action_group_resource_level( + def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1468,12 +1459,12 @@ def begin_create_notifications_at_action_group_resource_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create_notifications_at_action_group_resource_level( + def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1489,8 +1480,8 @@ def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2021_09_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1505,13 +1496,13 @@ def begin_create_notifications_at_action_group_resource_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1566,7 +1557,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1580,7 +1571,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1618,7 +1609,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models } @distributed_trace - def get_test_notifications_at_resource_group_level( + def get_test_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1630,7 +1621,7 @@ def get_test_notifications_at_resource_group_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1644,7 +1635,7 @@ def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1683,7 +1674,7 @@ def get_test_notifications_at_resource_group_level( } @distributed_trace - def get_test_notifications_at_action_group_resource_level( + def get_test_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1697,7 +1688,7 @@ def get_test_notifications_at_action_group_resource_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2021_09_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1711,7 +1702,7 @@ def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1757,13 +1748,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_09_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1846,13 +1837,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_09_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2021_09_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1943,7 +1934,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2021_09_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2021_09_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2000,7 +1991,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2021_09_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2021_09_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -2020,7 +2011,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01"] = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) 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 6fd488c201a4..9cefea7b878c 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-09-01-preview"] = kwargs.pop("api_version", "2021-09-01-preview") + api_version: str = kwargs.pop("api_version", "2021-09-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") 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_management_client.py index a84ad098ed6b..41cd39621823 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_management_client.py @@ -31,13 +31,13 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations :vartype data_collection_endpoints: - $(python-base-namespace).v2022_02_01_preview.operations.DataCollectionEndpointsOperations + azure.mgmt.monitor.v2022_02_01_preview.operations.DataCollectionEndpointsOperations :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations :vartype data_collection_rule_associations: - $(python-base-namespace).v2022_02_01_preview.operations.DataCollectionRuleAssociationsOperations + azure.mgmt.monitor.v2022_02_01_preview.operations.DataCollectionRuleAssociationsOperations :ivar data_collection_rules: DataCollectionRulesOperations operations :vartype data_collection_rules: - $(python-base-namespace).v2022_02_01_preview.operations.DataCollectionRulesOperations + azure.mgmt.monitor.v2022_02_01_preview.operations.DataCollectionRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. 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 caf312bd2d0b..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 = "6.0.0" +VERSION = "1.0.0b1" 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 163d71414550..821323054313 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 @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2021-09-01-preview"] = kwargs.pop("api_version", "2021-09-01-preview") + api_version: str = kwargs.pop("api_version", "2021-09-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be 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_management_client.py index 7ffc11b40840..2ff8b450311b 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_management_client.py @@ -31,13 +31,13 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations :vartype data_collection_endpoints: - $(python-base-namespace).v2022_02_01_preview.aio.operations.DataCollectionEndpointsOperations + azure.mgmt.monitor.v2022_02_01_preview.aio.operations.DataCollectionEndpointsOperations :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations :vartype data_collection_rule_associations: - $(python-base-namespace).v2022_02_01_preview.aio.operations.DataCollectionRuleAssociationsOperations + azure.mgmt.monitor.v2022_02_01_preview.aio.operations.DataCollectionRuleAssociationsOperations :ivar data_collection_rules: DataCollectionRulesOperations operations :vartype data_collection_rules: - $(python-base-namespace).v2022_02_01_preview.aio.operations.DataCollectionRulesOperations + azure.mgmt.monitor.v2022_02_01_preview.aio.operations.DataCollectionRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_endpoints_operations.py index 7ab6c5152341..eaae30c3bbd2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class DataCollectionEndpointsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_02_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_02_01_preview.aio.MonitorManagementClient`'s :attr:`data_collection_endpoints` attribute. """ @@ -80,15 +75,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -170,15 +163,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -265,7 +256,7 @@ async def get( :type data_collection_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -279,9 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -340,13 +329,13 @@ async def create( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -377,7 +366,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -401,14 +390,13 @@ async def create( :type data_collection_endpoint_name: str :param body: The payload. Is either a DataCollectionEndpointResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource - or IO + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -422,9 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -502,13 +488,13 @@ async def update( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -539,7 +525,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -563,13 +549,13 @@ async def update( :type data_collection_endpoint_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -583,9 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -668,9 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rule_associations_operations.py index 97f4dd4d9e51..f6127e5cd6bc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_rule_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class DataCollectionRuleAssociationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_02_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_02_01_preview.aio.MonitorManagementClient`'s :attr:`data_collection_rule_associations` attribute. """ @@ -79,15 +74,13 @@ def list_by_resource( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -176,15 +169,13 @@ def list_by_rule( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -277,15 +268,13 @@ def list_by_data_collection_endpoint( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -375,7 +364,7 @@ async def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -389,9 +378,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -448,14 +435,14 @@ async def create( :type association_name: str :param body: The payload. Default value is None. :type body: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -485,7 +472,7 @@ async def create( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -508,7 +495,7 @@ async def create( :param body: The payload. Is either a DataCollectionRuleAssociationProxyOnlyResource type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -516,7 +503,7 @@ async def create( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -530,9 +517,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -616,9 +601,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rules_operations.py index 42cf22f0378d..59b8c8bc1018 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/aio/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class DataCollectionRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_02_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_02_01_preview.aio.MonitorManagementClient`'s :attr:`data_collection_rules` attribute. """ @@ -80,15 +75,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -170,15 +163,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -265,7 +256,7 @@ async def get( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -279,9 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -340,13 +329,13 @@ async def create( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -377,7 +366,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -401,14 +390,13 @@ async def create( :type data_collection_rule_name: str :param body: The payload. Is either a DataCollectionRuleResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource or - IO + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -422,9 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -502,13 +488,13 @@ async def update( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -539,7 +525,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -563,13 +549,13 @@ async def update( :type data_collection_rule_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -583,9 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -668,9 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( 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 03bd67d3ba44..aa859920ff5d 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 @@ -55,8 +55,7 @@ class ColumnDefinition(_serialization.Model): :vartype name: str :ivar type: The type of the column data. Known values are: "string", "int", "long", "real", "boolean", "datetime", and "dynamic". - :vartype type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownColumnDefinitionType + :vartype type: str or ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownColumnDefinitionType """ _attribute_map = { @@ -77,7 +76,7 @@ def __init__( :keyword type: The type of the column data. Known values are: "string", "int", "long", "real", "boolean", "datetime", and "dynamic". :paramtype type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownColumnDefinitionType + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownColumnDefinitionType """ super().__init__(**kwargs) self.name = name @@ -119,17 +118,17 @@ class DataCollectionEndpoint(_serialization.Model): :vartype immutable_id: str :ivar configuration_access: The endpoint used by clients to access their configuration. :vartype configuration_access: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess :ivar logs_ingestion: The endpoint used by clients to ingest logs. :vartype logs_ingestion: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion :ivar network_acls: Network access control rules for the endpoints. :vartype network_acls: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionEndpointProvisioningState + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionEndpointProvisioningState """ _validation = { @@ -163,13 +162,13 @@ def __init__( :paramtype immutable_id: str :keyword configuration_access: The endpoint used by clients to access their configuration. :paramtype configuration_access: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess :keyword logs_ingestion: The endpoint used by clients to ingest logs. :paramtype logs_ingestion: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion :keyword network_acls: Network access control rules for the endpoints. :paramtype network_acls: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls """ super().__init__(**kwargs) self.description = description @@ -253,7 +252,7 @@ class NetworkRuleSet(_serialization.Model): :ivar public_network_access: The configuration to set whether network access from public internet to the endpoints are allowed. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownPublicNetworkAccessOptions """ _attribute_map = { @@ -270,7 +269,7 @@ def __init__( :keyword public_network_access: The configuration to set whether network access from public internet to the endpoints are allowed. Known values are: "Enabled" and "Disabled". :paramtype public_network_access: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownPublicNetworkAccessOptions """ super().__init__(**kwargs) self.public_network_access = public_network_access @@ -282,7 +281,7 @@ class DataCollectionEndpointNetworkAcls(NetworkRuleSet): :ivar public_network_access: The configuration to set whether network access from public internet to the endpoints are allowed. Known values are: "Enabled" and "Disabled". :vartype public_network_access: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownPublicNetworkAccessOptions """ _attribute_map = { @@ -299,7 +298,7 @@ def __init__( :keyword public_network_access: The configuration to set whether network access from public internet to the endpoints are allowed. Known values are: "Enabled" and "Disabled". :paramtype public_network_access: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownPublicNetworkAccessOptions """ super().__init__(public_network_access=public_network_access, **kwargs) @@ -317,7 +316,7 @@ class DataCollectionEndpointResource(_serialization.Model): # pylint: disable=t :vartype tags: dict[str, str] :ivar kind: The kind of the resource. Known values are: "Linux" and "Windows". :vartype kind: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionEndpointResourceKind + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionEndpointResourceKind :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -328,7 +327,7 @@ class DataCollectionEndpointResource(_serialization.Model): # pylint: disable=t :vartype etag: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResourceSystemData + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResourceSystemData :ivar description: Description of the data collection endpoint. :vartype description: str :ivar immutable_id: The immutable ID of this data collection endpoint resource. This property @@ -336,17 +335,17 @@ class DataCollectionEndpointResource(_serialization.Model): # pylint: disable=t :vartype immutable_id: str :ivar configuration_access: The endpoint used by clients to access their configuration. :vartype configuration_access: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess :ivar logs_ingestion: The endpoint used by clients to ingest logs. :vartype logs_ingestion: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion :ivar network_acls: Network access control rules for the endpoints. :vartype network_acls: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionEndpointProvisioningState + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionEndpointProvisioningState """ _validation = { @@ -399,7 +398,7 @@ def __init__( :paramtype tags: dict[str, str] :keyword kind: The kind of the resource. Known values are: "Linux" and "Windows". :paramtype kind: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionEndpointResourceKind + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionEndpointResourceKind :keyword description: Description of the data collection endpoint. :paramtype description: str :keyword immutable_id: The immutable ID of this data collection endpoint resource. This @@ -407,13 +406,13 @@ def __init__( :paramtype immutable_id: str :keyword configuration_access: The endpoint used by clients to access their configuration. :paramtype configuration_access: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess :keyword logs_ingestion: The endpoint used by clients to ingest logs. :paramtype logs_ingestion: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion :keyword network_acls: Network access control rules for the endpoints. :paramtype network_acls: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls """ super().__init__(**kwargs) self.location = location @@ -439,7 +438,7 @@ class DataCollectionEndpointResourceListResult(_serialization.Model): :ivar value: A list of resources. Required. :vartype value: - list[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -459,7 +458,7 @@ def __init__( """ :keyword value: A list of resources. Required. :paramtype value: - list[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -480,17 +479,17 @@ class DataCollectionEndpointResourceProperties(DataCollectionEndpoint): :vartype immutable_id: str :ivar configuration_access: The endpoint used by clients to access their configuration. :vartype configuration_access: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess :ivar logs_ingestion: The endpoint used by clients to ingest logs. :vartype logs_ingestion: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion :ivar network_acls: Network access control rules for the endpoints. :vartype network_acls: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionEndpointProvisioningState + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionEndpointProvisioningState """ _validation = { @@ -524,13 +523,13 @@ def __init__( :paramtype immutable_id: str :keyword configuration_access: The endpoint used by clients to access their configuration. :paramtype configuration_access: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointConfigurationAccess :keyword logs_ingestion: The endpoint used by clients to ingest logs. :paramtype logs_ingestion: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointLogsIngestion :keyword network_acls: Network access control rules for the endpoints. :paramtype network_acls: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointNetworkAcls """ super().__init__( description=description, @@ -549,8 +548,7 @@ class SystemData(_serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. @@ -558,7 +556,7 @@ class SystemData(_serialization.Model): :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -588,8 +586,7 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. @@ -597,7 +594,7 @@ def __init__( :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -617,8 +614,7 @@ class DataCollectionEndpointResourceSystemData(SystemData): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. @@ -626,7 +622,7 @@ class DataCollectionEndpointResourceSystemData(SystemData): :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -656,8 +652,7 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. @@ -665,7 +660,7 @@ def __init__( :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -693,25 +688,24 @@ class DataCollectionRule(_serialization.Model): rule can be used with. :vartype data_collection_endpoint_id: str :ivar metadata: Metadata about the resource. - :vartype metadata: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleMetadata :ivar stream_declarations: Declaration of custom streams used in this rule. :vartype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_02_01_preview.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_02_01_preview.models.StreamDeclaration] :ivar data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :vartype data_sources: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. :vartype destinations: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2022_02_01_preview.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -751,17 +745,17 @@ def __init__( :paramtype data_collection_endpoint_id: str :keyword stream_declarations: Declaration of custom streams used in this rule. :paramtype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_02_01_preview.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_02_01_preview.models.StreamDeclaration] :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :paramtype data_sources: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. :paramtype destinations: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2022_02_01_preview.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataFlow] """ super().__init__(**kwargs) self.description = description @@ -791,10 +785,10 @@ class DataCollectionRuleAssociation(_serialization.Model): :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState :ivar metadata: Metadata about the resource. :vartype metadata: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationMetadata + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationMetadata """ _validation = { @@ -896,7 +890,7 @@ class DataCollectionRuleAssociationProxyOnlyResource(_serialization.Model): :vartype etag: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResourceSystemData + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResourceSystemData :ivar description: Description of the association. :vartype description: str :ivar data_collection_rule_id: The resource ID of the data collection rule that is to be @@ -908,10 +902,10 @@ class DataCollectionRuleAssociationProxyOnlyResource(_serialization.Model): :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState :ivar metadata: Metadata about the resource. :vartype metadata: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationMetadata + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationMetadata """ _validation = { @@ -975,7 +969,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceListResult(_serialization.Mo :ivar value: A list of resources. Required. :vartype value: - list[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -999,7 +993,7 @@ def __init__( """ :keyword value: A list of resources. Required. :paramtype value: - list[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -1024,10 +1018,10 @@ class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRul :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState :ivar metadata: Metadata about the resource. :vartype metadata: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationMetadata + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationMetadata """ _validation = { @@ -1076,8 +1070,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceSystemData(SystemData): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. @@ -1085,7 +1078,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceSystemData(SystemData): :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -1115,8 +1108,7 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. @@ -1124,7 +1116,7 @@ def __init__( :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -1144,20 +1136,18 @@ class DataSourcesSpec(_serialization.Model): :ivar performance_counters: The list of performance counter data source configurations. :vartype performance_counters: - list[~$(python-base-namespace).v2022_02_01_preview.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.PerfCounterDataSource] :ivar windows_event_logs: The list of Windows Event Log data source configurations. :vartype windows_event_logs: - list[~$(python-base-namespace).v2022_02_01_preview.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.WindowsEventLogDataSource] :ivar syslog: The list of Syslog data source configurations. - :vartype syslog: list[~$(python-base-namespace).v2022_02_01_preview.models.SyslogDataSource] + :vartype syslog: list[~azure.mgmt.monitor.v2022_02_01_preview.models.SyslogDataSource] :ivar extensions: The list of Azure VM extension data source configurations. - :vartype extensions: - list[~$(python-base-namespace).v2022_02_01_preview.models.ExtensionDataSource] + :vartype extensions: list[~azure.mgmt.monitor.v2022_02_01_preview.models.ExtensionDataSource] :ivar log_files: The list of Log files source configurations. - :vartype log_files: - list[~$(python-base-namespace).v2022_02_01_preview.models.LogFilesDataSource] + :vartype log_files: list[~azure.mgmt.monitor.v2022_02_01_preview.models.LogFilesDataSource] :ivar iis_logs: The list of IIS logs source configurations. - :vartype iis_logs: list[~$(python-base-namespace).v2022_02_01_preview.models.IisLogsDataSource] + :vartype iis_logs: list[~azure.mgmt.monitor.v2022_02_01_preview.models.IisLogsDataSource] """ _attribute_map = { @@ -1183,21 +1173,18 @@ def __init__( """ :keyword performance_counters: The list of performance counter data source configurations. :paramtype performance_counters: - list[~$(python-base-namespace).v2022_02_01_preview.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.PerfCounterDataSource] :keyword windows_event_logs: The list of Windows Event Log data source configurations. :paramtype windows_event_logs: - list[~$(python-base-namespace).v2022_02_01_preview.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.WindowsEventLogDataSource] :keyword syslog: The list of Syslog data source configurations. - :paramtype syslog: list[~$(python-base-namespace).v2022_02_01_preview.models.SyslogDataSource] + :paramtype syslog: list[~azure.mgmt.monitor.v2022_02_01_preview.models.SyslogDataSource] :keyword extensions: The list of Azure VM extension data source configurations. - :paramtype extensions: - list[~$(python-base-namespace).v2022_02_01_preview.models.ExtensionDataSource] + :paramtype extensions: list[~azure.mgmt.monitor.v2022_02_01_preview.models.ExtensionDataSource] :keyword log_files: The list of Log files source configurations. - :paramtype log_files: - list[~$(python-base-namespace).v2022_02_01_preview.models.LogFilesDataSource] + :paramtype log_files: list[~azure.mgmt.monitor.v2022_02_01_preview.models.LogFilesDataSource] :keyword iis_logs: The list of IIS logs source configurations. - :paramtype iis_logs: - list[~$(python-base-namespace).v2022_02_01_preview.models.IisLogsDataSource] + :paramtype iis_logs: list[~azure.mgmt.monitor.v2022_02_01_preview.models.IisLogsDataSource] """ super().__init__(**kwargs) self.performance_counters = performance_counters @@ -1215,20 +1202,18 @@ class DataCollectionRuleDataSources(DataSourcesSpec): :ivar performance_counters: The list of performance counter data source configurations. :vartype performance_counters: - list[~$(python-base-namespace).v2022_02_01_preview.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.PerfCounterDataSource] :ivar windows_event_logs: The list of Windows Event Log data source configurations. :vartype windows_event_logs: - list[~$(python-base-namespace).v2022_02_01_preview.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.WindowsEventLogDataSource] :ivar syslog: The list of Syslog data source configurations. - :vartype syslog: list[~$(python-base-namespace).v2022_02_01_preview.models.SyslogDataSource] + :vartype syslog: list[~azure.mgmt.monitor.v2022_02_01_preview.models.SyslogDataSource] :ivar extensions: The list of Azure VM extension data source configurations. - :vartype extensions: - list[~$(python-base-namespace).v2022_02_01_preview.models.ExtensionDataSource] + :vartype extensions: list[~azure.mgmt.monitor.v2022_02_01_preview.models.ExtensionDataSource] :ivar log_files: The list of Log files source configurations. - :vartype log_files: - list[~$(python-base-namespace).v2022_02_01_preview.models.LogFilesDataSource] + :vartype log_files: list[~azure.mgmt.monitor.v2022_02_01_preview.models.LogFilesDataSource] :ivar iis_logs: The list of IIS logs source configurations. - :vartype iis_logs: list[~$(python-base-namespace).v2022_02_01_preview.models.IisLogsDataSource] + :vartype iis_logs: list[~azure.mgmt.monitor.v2022_02_01_preview.models.IisLogsDataSource] """ _attribute_map = { @@ -1254,21 +1239,18 @@ def __init__( """ :keyword performance_counters: The list of performance counter data source configurations. :paramtype performance_counters: - list[~$(python-base-namespace).v2022_02_01_preview.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.PerfCounterDataSource] :keyword windows_event_logs: The list of Windows Event Log data source configurations. :paramtype windows_event_logs: - list[~$(python-base-namespace).v2022_02_01_preview.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.WindowsEventLogDataSource] :keyword syslog: The list of Syslog data source configurations. - :paramtype syslog: list[~$(python-base-namespace).v2022_02_01_preview.models.SyslogDataSource] + :paramtype syslog: list[~azure.mgmt.monitor.v2022_02_01_preview.models.SyslogDataSource] :keyword extensions: The list of Azure VM extension data source configurations. - :paramtype extensions: - list[~$(python-base-namespace).v2022_02_01_preview.models.ExtensionDataSource] + :paramtype extensions: list[~azure.mgmt.monitor.v2022_02_01_preview.models.ExtensionDataSource] :keyword log_files: The list of Log files source configurations. - :paramtype log_files: - list[~$(python-base-namespace).v2022_02_01_preview.models.LogFilesDataSource] + :paramtype log_files: list[~azure.mgmt.monitor.v2022_02_01_preview.models.LogFilesDataSource] :keyword iis_logs: The list of IIS logs source configurations. - :paramtype iis_logs: - list[~$(python-base-namespace).v2022_02_01_preview.models.IisLogsDataSource] + :paramtype iis_logs: list[~azure.mgmt.monitor.v2022_02_01_preview.models.IisLogsDataSource] """ super().__init__( performance_counters=performance_counters, @@ -1286,10 +1268,10 @@ class DestinationsSpec(_serialization.Model): :ivar log_analytics: List of Log Analytics destinations. :vartype log_analytics: - list[~$(python-base-namespace).v2022_02_01_preview.models.LogAnalyticsDestination] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.LogAnalyticsDestination] :ivar azure_monitor_metrics: Azure Monitor Metrics destination. :vartype azure_monitor_metrics: - ~$(python-base-namespace).v2022_02_01_preview.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2022_02_01_preview.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { @@ -1307,10 +1289,10 @@ def __init__( """ :keyword log_analytics: List of Log Analytics destinations. :paramtype log_analytics: - list[~$(python-base-namespace).v2022_02_01_preview.models.LogAnalyticsDestination] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.LogAnalyticsDestination] :keyword azure_monitor_metrics: Azure Monitor Metrics destination. :paramtype azure_monitor_metrics: - ~$(python-base-namespace).v2022_02_01_preview.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2022_02_01_preview.models.DestinationsSpecAzureMonitorMetrics """ super().__init__(**kwargs) self.log_analytics = log_analytics @@ -1322,10 +1304,10 @@ class DataCollectionRuleDestinations(DestinationsSpec): :ivar log_analytics: List of Log Analytics destinations. :vartype log_analytics: - list[~$(python-base-namespace).v2022_02_01_preview.models.LogAnalyticsDestination] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.LogAnalyticsDestination] :ivar azure_monitor_metrics: Azure Monitor Metrics destination. :vartype azure_monitor_metrics: - ~$(python-base-namespace).v2022_02_01_preview.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2022_02_01_preview.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { @@ -1343,10 +1325,10 @@ def __init__( """ :keyword log_analytics: List of Log Analytics destinations. :paramtype log_analytics: - list[~$(python-base-namespace).v2022_02_01_preview.models.LogAnalyticsDestination] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.LogAnalyticsDestination] :keyword azure_monitor_metrics: Azure Monitor Metrics destination. :paramtype azure_monitor_metrics: - ~$(python-base-namespace).v2022_02_01_preview.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2022_02_01_preview.models.DestinationsSpecAzureMonitorMetrics """ super().__init__(log_analytics=log_analytics, azure_monitor_metrics=azure_monitor_metrics, **kwargs) @@ -1386,7 +1368,7 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m :vartype tags: dict[str, str] :ivar kind: The kind of the resource. Known values are: "Linux" and "Windows". :vartype kind: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionRuleResourceKind + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionRuleResourceKind :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -1397,7 +1379,7 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m :vartype etag: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResourceSystemData + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResourceSystemData :ivar description: Description of the data collection rule. :vartype description: str :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. @@ -1406,25 +1388,24 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m rule can be used with. :vartype data_collection_endpoint_id: str :ivar metadata: Metadata about the resource. - :vartype metadata: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleMetadata :ivar stream_declarations: Declaration of custom streams used in this rule. :vartype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_02_01_preview.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_02_01_preview.models.StreamDeclaration] :ivar data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :vartype data_sources: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. :vartype destinations: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2022_02_01_preview.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -1480,7 +1461,7 @@ def __init__( :paramtype tags: dict[str, str] :keyword kind: The kind of the resource. Known values are: "Linux" and "Windows". :paramtype kind: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionRuleResourceKind + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionRuleResourceKind :keyword description: Description of the data collection rule. :paramtype description: str :keyword data_collection_endpoint_id: The resource ID of the data collection endpoint that this @@ -1488,17 +1469,17 @@ def __init__( :paramtype data_collection_endpoint_id: str :keyword stream_declarations: Declaration of custom streams used in this rule. :paramtype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_02_01_preview.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_02_01_preview.models.StreamDeclaration] :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :paramtype data_sources: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. :paramtype destinations: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2022_02_01_preview.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataFlow] """ super().__init__(**kwargs) self.location = location @@ -1526,8 +1507,7 @@ class DataCollectionRuleResourceListResult(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: A list of resources. Required. - :vartype value: - list[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -1547,7 +1527,7 @@ def __init__( """ :keyword value: A list of resources. Required. :paramtype value: - list[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -1569,25 +1549,24 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): rule can be used with. :vartype data_collection_endpoint_id: str :ivar metadata: Metadata about the resource. - :vartype metadata: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleMetadata :ivar stream_declarations: Declaration of custom streams used in this rule. :vartype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_02_01_preview.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_02_01_preview.models.StreamDeclaration] :ivar data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :vartype data_sources: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. :vartype destinations: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2022_02_01_preview.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -1627,17 +1606,17 @@ def __init__( :paramtype data_collection_endpoint_id: str :keyword stream_declarations: Declaration of custom streams used in this rule. :paramtype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_02_01_preview.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_02_01_preview.models.StreamDeclaration] :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :paramtype data_sources: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDataSources + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. :paramtype destinations: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleDestinations + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2022_02_01_preview.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2022_02_01_preview.models.DataFlow] """ super().__init__( description=description, @@ -1657,8 +1636,7 @@ class DataCollectionRuleResourceSystemData(SystemData): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. @@ -1666,7 +1644,7 @@ class DataCollectionRuleResourceSystemData(SystemData): :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -1696,8 +1674,7 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. @@ -1705,7 +1682,7 @@ def __init__( :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_02_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_02_01_preview.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -1725,7 +1702,7 @@ class DataFlow(_serialization.Model): :ivar streams: List of streams for this data flow. :vartype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataFlowStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataFlowStreams] :ivar destinations: List of destinations for this data flow. :vartype destinations: list[str] :ivar transform_kql: The KQL query to transform stream data. @@ -1754,7 +1731,7 @@ def __init__( """ :keyword streams: List of streams for this data flow. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownDataFlowStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownDataFlowStreams] :keyword destinations: List of destinations for this data flow. :paramtype destinations: list[str] :keyword transform_kql: The KQL query to transform stream data. @@ -1833,10 +1810,10 @@ class ErrorDetail(_serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~$(python-base-namespace).v2022_02_01_preview.models.ErrorDetail] + :vartype details: list[~azure.mgmt.monitor.v2022_02_01_preview.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: - list[~$(python-base-namespace).v2022_02_01_preview.models.ErrorAdditionalInfo] + list[~azure.mgmt.monitor.v2022_02_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -1870,7 +1847,7 @@ class ErrorResponseCommonV2(_serialization.Model): operations. (This also follows the OData error response format.). :ivar error: The error object. - :vartype error: ~$(python-base-namespace).v2022_02_01_preview.models.ErrorDetail + :vartype error: ~azure.mgmt.monitor.v2022_02_01_preview.models.ErrorDetail """ _attribute_map = { @@ -1880,7 +1857,7 @@ class ErrorResponseCommonV2(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~$(python-base-namespace).v2022_02_01_preview.models.ErrorDetail + :paramtype error: ~azure.mgmt.monitor.v2022_02_01_preview.models.ErrorDetail """ super().__init__(**kwargs) self.error = error @@ -1897,7 +1874,7 @@ class ExtensionDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownExtensionDataSourceStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownExtensionDataSourceStreams] :ivar extension_name: The name of the VM extension. Required. :vartype extension_name: str :ivar extension_settings: The extension settings. The format is specific for particular @@ -1938,7 +1915,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownExtensionDataSourceStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownExtensionDataSourceStreams] :keyword extension_name: The name of the VM extension. Required. :paramtype extension_name: str :keyword extension_settings: The extension settings. The format is specific for particular @@ -2062,10 +2039,9 @@ class LogFilesDataSource(_serialization.Model): :vartype file_patterns: list[str] :ivar format: The data format of the log files. Required. "text" :vartype format: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownLogFilesDataSourceFormat + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownLogFilesDataSourceFormat :ivar settings: The log files specific settings. - :vartype settings: - ~$(python-base-namespace).v2022_02_01_preview.models.LogFilesDataSourceSettings + :vartype settings: ~azure.mgmt.monitor.v2022_02_01_preview.models.LogFilesDataSourceSettings :ivar name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -2104,10 +2080,9 @@ def __init__( :paramtype file_patterns: list[str] :keyword format: The data format of the log files. Required. "text" :paramtype format: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownLogFilesDataSourceFormat + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownLogFilesDataSourceFormat :keyword settings: The log files specific settings. - :paramtype settings: - ~$(python-base-namespace).v2022_02_01_preview.models.LogFilesDataSourceSettings + :paramtype settings: ~azure.mgmt.monitor.v2022_02_01_preview.models.LogFilesDataSourceSettings :keyword name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -2125,7 +2100,7 @@ class LogFileSettings(_serialization.Model): """Settings for different log file formats. :ivar text: Text settings. - :vartype text: ~$(python-base-namespace).v2022_02_01_preview.models.LogFileSettingsText + :vartype text: ~azure.mgmt.monitor.v2022_02_01_preview.models.LogFileSettingsText """ _attribute_map = { @@ -2135,7 +2110,7 @@ class LogFileSettings(_serialization.Model): def __init__(self, *, text: Optional["_models.LogFileSettingsText"] = None, **kwargs: Any) -> None: """ :keyword text: Text settings. - :paramtype text: ~$(python-base-namespace).v2022_02_01_preview.models.LogFileSettingsText + :paramtype text: ~azure.mgmt.monitor.v2022_02_01_preview.models.LogFileSettingsText """ super().__init__(**kwargs) self.text = text @@ -2145,7 +2120,7 @@ class LogFilesDataSourceSettings(LogFileSettings): """The log files specific settings. :ivar text: Text settings. - :vartype text: ~$(python-base-namespace).v2022_02_01_preview.models.LogFileSettingsText + :vartype text: ~azure.mgmt.monitor.v2022_02_01_preview.models.LogFileSettingsText """ _attribute_map = { @@ -2155,7 +2130,7 @@ class LogFilesDataSourceSettings(LogFileSettings): def __init__(self, *, text: Optional["_models.LogFileSettingsText"] = None, **kwargs: Any) -> None: """ :keyword text: Text settings. - :paramtype text: ~$(python-base-namespace).v2022_02_01_preview.models.LogFileSettingsText + :paramtype text: ~azure.mgmt.monitor.v2022_02_01_preview.models.LogFileSettingsText """ super().__init__(text=text, **kwargs) @@ -2170,7 +2145,7 @@ class LogFileTextSettings(_serialization.Model): HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz", and "yyyy-MM-ddTHH:mm:ssK". :vartype record_start_timestamp_format: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownLogFileTextSettingsRecordStartTimestampFormat + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownLogFileTextSettingsRecordStartTimestampFormat """ _validation = { @@ -2193,7 +2168,7 @@ def __init__( HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz", and "yyyy-MM-ddTHH:mm:ssK". :paramtype record_start_timestamp_format: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownLogFileTextSettingsRecordStartTimestampFormat + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownLogFileTextSettingsRecordStartTimestampFormat """ super().__init__(**kwargs) self.record_start_timestamp_format = record_start_timestamp_format @@ -2209,7 +2184,7 @@ class LogFileSettingsText(LogFileTextSettings): HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz", and "yyyy-MM-ddTHH:mm:ssK". :vartype record_start_timestamp_format: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownLogFileTextSettingsRecordStartTimestampFormat + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownLogFileTextSettingsRecordStartTimestampFormat """ _validation = { @@ -2232,7 +2207,7 @@ def __init__( HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz", and "yyyy-MM-ddTHH:mm:ssK". :paramtype record_start_timestamp_format: str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownLogFileTextSettingsRecordStartTimestampFormat + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownLogFileTextSettingsRecordStartTimestampFormat """ super().__init__(record_start_timestamp_format=record_start_timestamp_format, **kwargs) @@ -2246,7 +2221,7 @@ class PerfCounterDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownPerfCounterDataSourceStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownPerfCounterDataSourceStreams] :ivar sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). :vartype sampling_frequency_in_seconds: int @@ -2282,7 +2257,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownPerfCounterDataSourceStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownPerfCounterDataSourceStreams] :keyword sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). :paramtype sampling_frequency_in_seconds: int @@ -2327,7 +2302,7 @@ class StreamDeclaration(_serialization.Model): """Declaration of a custom stream. :ivar columns: List of columns used by data in this stream. - :vartype columns: list[~$(python-base-namespace).v2022_02_01_preview.models.ColumnDefinition] + :vartype columns: list[~azure.mgmt.monitor.v2022_02_01_preview.models.ColumnDefinition] """ _attribute_map = { @@ -2337,7 +2312,7 @@ class StreamDeclaration(_serialization.Model): def __init__(self, *, columns: Optional[List["_models.ColumnDefinition"]] = None, **kwargs: Any) -> None: """ :keyword columns: List of columns used by data in this stream. - :paramtype columns: list[~$(python-base-namespace).v2022_02_01_preview.models.ColumnDefinition] + :paramtype columns: list[~azure.mgmt.monitor.v2022_02_01_preview.models.ColumnDefinition] """ super().__init__(**kwargs) self.columns = columns @@ -2351,13 +2326,13 @@ class SyslogDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownSyslogDataSourceStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownSyslogDataSourceStreams] :ivar facility_names: The list of facility names. :vartype facility_names: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownSyslogDataSourceFacilityNames] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownSyslogDataSourceFacilityNames] :ivar log_levels: The log levels to collect. :vartype log_levels: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownSyslogDataSourceLogLevels] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownSyslogDataSourceLogLevels] :ivar name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -2385,13 +2360,13 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownSyslogDataSourceStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownSyslogDataSourceStreams] :keyword facility_names: The list of facility names. :paramtype facility_names: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownSyslogDataSourceFacilityNames] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownSyslogDataSourceFacilityNames] :keyword log_levels: The log levels to collect. :paramtype log_levels: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownSyslogDataSourceLogLevels] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownSyslogDataSourceLogLevels] :keyword name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -2412,7 +2387,7 @@ class WindowsEventLogDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownWindowsEventLogDataSourceStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownWindowsEventLogDataSourceStreams] :ivar x_path_queries: A list of Windows Event Log queries in XPATH format. :vartype x_path_queries: list[str] :ivar name: A friendly name for the data source. @@ -2440,7 +2415,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_02_01_preview.models.KnownWindowsEventLogDataSourceStreams] + ~azure.mgmt.monitor.v2022_02_01_preview.models.KnownWindowsEventLogDataSourceStreams] :keyword x_path_queries: A list of Windows Event Log queries in XPATH format. :paramtype x_path_queries: list[str] :keyword name: A friendly name for the data source. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_endpoints_operations.py index f6d2fbd5abbc..05f8e5f02243 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,9 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,9 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -144,9 +133,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -184,9 +171,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -224,9 +209,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -261,7 +244,7 @@ class DataCollectionEndpointsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_02_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_02_01_preview.MonitorManagementClient`'s :attr:`data_collection_endpoints` attribute. """ @@ -289,15 +272,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -379,15 +360,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -474,7 +453,7 @@ def get( :type data_collection_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -488,9 +467,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -549,13 +526,13 @@ def create( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -586,7 +563,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -610,14 +587,13 @@ def create( :type data_collection_endpoint_name: str :param body: The payload. Is either a DataCollectionEndpointResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource - or IO + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -631,9 +607,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -711,13 +685,13 @@ def update( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -748,7 +722,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -772,13 +746,13 @@ def update( :type data_collection_endpoint_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -792,9 +766,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -877,9 +849,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rule_associations_operations.py index 42b8e1f9fe4a..f25e0ce5a1f9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -102,15 +93,13 @@ def build_list_by_rule_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_list_by_data_collection_endpoint_request( +def build_list_by_data_collection_endpoint_request( # pylint: disable=name-too-long resource_group_name: str, data_collection_endpoint_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -143,9 +132,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -172,9 +159,7 @@ def build_create_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -204,9 +189,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -235,7 +218,7 @@ class DataCollectionRuleAssociationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_02_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_02_01_preview.MonitorManagementClient`'s :attr:`data_collection_rule_associations` attribute. """ @@ -262,15 +245,13 @@ def list_by_resource( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -359,15 +340,13 @@ def list_by_rule( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -460,15 +439,13 @@ def list_by_data_collection_endpoint( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -558,7 +535,7 @@ def get( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -572,9 +549,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -631,14 +606,14 @@ def create( :type association_name: str :param body: The payload. Default value is None. :type body: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -668,7 +643,7 @@ def create( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -691,7 +666,7 @@ def create( :param body: The payload. Is either a DataCollectionRuleAssociationProxyOnlyResource type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. @@ -699,7 +674,7 @@ def create( :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -713,9 +688,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -799,9 +772,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rules_operations.py index d9aee7ceef76..cac42d3bef4c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_02_01_preview/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,9 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -107,9 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -142,9 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -180,9 +167,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -218,9 +203,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -253,7 +236,7 @@ class DataCollectionRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_02_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_02_01_preview.MonitorManagementClient`'s :attr:`data_collection_rules` attribute. """ @@ -281,15 +264,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -371,15 +352,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -466,7 +445,7 @@ def get( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -480,9 +459,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -541,13 +518,13 @@ def create( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -578,7 +555,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -602,14 +579,13 @@ def create( :type data_collection_rule_name: str :param body: The payload. Is either a DataCollectionRuleResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource or - IO + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -623,9 +599,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -703,13 +677,13 @@ def update( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -740,7 +714,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -764,13 +738,13 @@ def update( :type data_collection_rule_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_02_01_preview.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2022_02_01_preview.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_02_01_preview.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_02_01_preview.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -784,9 +758,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -869,9 +841,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2021-09-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2021-09-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2021-09-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_configuration.py index b9ec9715dd48..660245741936 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", "2022-04-01") + api_version: str = kwargs.pop("api_version", "2022-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_monitor_management_client.py index 6e8a4f634539..a0198919ab76 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_monitor_management_client.py @@ -26,7 +26,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2022_04_01.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2022_04_01.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_configuration.py index 6905ba16088c..3df538e5f118 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", "2022-04-01") + api_version: str = kwargs.pop("api_version", "2022-04-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_monitor_management_client.py index e3142780f365..4c55b4206c0b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/_monitor_management_client.py @@ -26,8 +26,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2022_04_01.aio.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2022_04_01.aio.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/operations/_action_groups_operations.py index cd9c9404814c..f75b03332f7a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -45,10 +44,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -59,7 +54,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_04_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_04_01.aio.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -90,13 +85,13 @@ async def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -124,7 +119,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -145,13 +140,13 @@ async def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -165,7 +160,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -230,7 +225,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -244,7 +239,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -309,7 +304,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -361,13 +356,13 @@ async def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2022_04_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -395,7 +390,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -416,14 +411,13 @@ async def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2022_04_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -437,7 +431,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -501,7 +495,7 @@ async def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -567,8 +561,7 @@ async def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_04_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_04_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -583,7 +576,7 @@ async def begin_post_test_notifications( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -610,7 +603,7 @@ async def begin_post_test_notifications( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -622,8 +615,8 @@ async def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_04_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_04_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -638,13 +631,13 @@ async def begin_post_test_notifications( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -689,7 +682,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications" } - async def _create_notifications_at_resource_group_level_initial( + async def _create_notifications_at_resource_group_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> Optional[_models.TestNotificationDetailsResponse]: error_map = { @@ -703,7 +696,7 @@ async def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -759,7 +752,7 @@ async def _create_notifications_at_resource_group_level_initial( } @overload - async def begin_create_notifications_at_resource_group_level( + async def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: _models.NotificationRequestBody, @@ -774,8 +767,7 @@ async def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_04_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_04_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -790,12 +782,12 @@ async def begin_create_notifications_at_resource_group_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_notifications_at_resource_group_level( + async def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: IO, @@ -825,12 +817,12 @@ async def begin_create_notifications_at_resource_group_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_notifications_at_resource_group_level( + async def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> AsyncLROPoller[_models.TestNotificationDetailsResponse]: """Send test notifications to a set of provided receivers. @@ -840,8 +832,8 @@ async def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_04_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_04_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -856,13 +848,13 @@ async def begin_create_notifications_at_resource_group_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -918,7 +910,7 @@ async def get_test_notifications( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -932,7 +924,7 @@ async def get_test_notifications( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -970,7 +962,7 @@ async def get_test_notifications( } @distributed_trace_async - async def get_test_notifications_at_resource_group_level( + async def get_test_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -982,7 +974,7 @@ async def get_test_notifications_at_resource_group_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -996,7 +988,7 @@ async def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1041,13 +1033,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_04_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1130,13 +1122,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_04_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1227,7 +1219,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2022_04_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2022_04_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1284,7 +1276,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2022_04_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2022_04_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1304,7 +1296,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/models/_models_py3.py index 0d9bc341310e..b71023d76c8f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/models/_models_py3.py @@ -80,7 +80,7 @@ class ActionGroupList(_serialization.Model): """A list of action groups. :ivar value: The list of action groups. - :vartype value: list[~$(python-base-namespace).v2022_04_01.models.ActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -99,7 +99,7 @@ def __init__( ) -> None: """ :keyword value: The list of action groups. - :paramtype value: list[~$(python-base-namespace).v2022_04_01.models.ActionGroupResource] + :paramtype value: list[~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -208,36 +208,34 @@ class ActionGroupResource(AzureResource): # pylint: disable=too-many-instance-a enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2022_04_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2022_04_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2022_04_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2022_04_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2022_04_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2022_04_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2022_04_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.ArmRoleReceiver] :ivar event_hub_receivers: The list of event hub receivers that are part of this action group. - :vartype event_hub_receivers: - list[~$(python-base-namespace).v2022_04_01.models.EventHubReceiver] + :vartype event_hub_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.EventHubReceiver] """ _validation = { @@ -304,40 +302,36 @@ def __init__( enabled, then none of its receivers will receive communications. :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2022_04_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2022_04_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2022_04_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2022_04_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2022_04_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2022_04_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2022_04_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.ArmRoleReceiver] :keyword event_hub_receivers: The list of event hub receivers that are part of this action group. - :paramtype event_hub_receivers: - list[~$(python-base-namespace).v2022_04_01.models.EventHubReceiver] + :paramtype event_hub_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.EventHubReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name @@ -617,7 +611,7 @@ class EmailReceiver(_serialization.Model): :vartype use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2022_04_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2022_04_01.models.ReceiverStatus """ _validation = { @@ -900,36 +894,34 @@ class NotificationRequestBody(_serialization.Model): # pylint: disable=too-many actualcostbudget, forecastedbudget. Required. :vartype alert_type: str :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2022_04_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2022_04_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2022_04_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2022_04_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2022_04_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2022_04_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2022_04_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.ArmRoleReceiver] :ivar event_hub_receivers: The list of event hub receivers that are part of this action group. - :vartype event_hub_receivers: - list[~$(python-base-namespace).v2022_04_01.models.EventHubReceiver] + :vartype event_hub_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.EventHubReceiver] """ _validation = { @@ -975,40 +967,36 @@ def __init__( actualcostbudget, forecastedbudget. Required. :paramtype alert_type: str :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2022_04_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2022_04_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2022_04_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2022_04_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2022_04_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2022_04_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2022_04_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2022_04_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2022_04_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.ArmRoleReceiver] :keyword event_hub_receivers: The list of event hub receivers that are part of this action group. - :paramtype event_hub_receivers: - list[~$(python-base-namespace).v2022_04_01.models.EventHubReceiver] + :paramtype event_hub_receivers: list[~azure.mgmt.monitor.v2022_04_01.models.EventHubReceiver] """ super().__init__(**kwargs) self.alert_type = alert_type @@ -1041,7 +1029,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2022_04_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2022_04_01.models.ReceiverStatus """ _validation = { @@ -1081,7 +1069,7 @@ class TestNotificationDetailsResponse(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar context: The context info. - :vartype context: ~$(python-base-namespace).v2022_04_01.models.Context + :vartype context: ~azure.mgmt.monitor.v2022_04_01.models.Context :ivar state: The overall state. Required. :vartype state: str :ivar completed_time: The completed time. @@ -1089,7 +1077,7 @@ class TestNotificationDetailsResponse(_serialization.Model): :ivar created_time: The created time. :vartype created_time: str :ivar action_details: The list of action detail. - :vartype action_details: list[~$(python-base-namespace).v2022_04_01.models.ActionDetail] + :vartype action_details: list[~azure.mgmt.monitor.v2022_04_01.models.ActionDetail] """ _validation = { @@ -1116,7 +1104,7 @@ def __init__( ) -> None: """ :keyword context: The context info. - :paramtype context: ~$(python-base-namespace).v2022_04_01.models.Context + :paramtype context: ~azure.mgmt.monitor.v2022_04_01.models.Context :keyword state: The overall state. Required. :paramtype state: str :keyword completed_time: The completed time. @@ -1124,7 +1112,7 @@ def __init__( :keyword created_time: The created time. :paramtype created_time: str :keyword action_details: The list of action detail. - :paramtype action_details: list[~$(python-base-namespace).v2022_04_01.models.ActionDetail] + :paramtype action_details: list[~azure.mgmt.monitor.v2022_04_01.models.ActionDetail] """ super().__init__(**kwargs) self.context = context diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/operations/_action_groups_operations.py index 63f0c7729454..fe3985a8494a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_04_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,7 +113,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,7 +146,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,7 +180,7 @@ def build_post_test_notifications_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -210,13 +205,13 @@ def build_post_test_notifications_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_notifications_at_resource_group_level_request( +def build_create_notifications_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -249,7 +244,7 @@ def build_get_test_notifications_request(notification_id: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -273,13 +268,13 @@ def build_get_test_notifications_request(notification_id: str, subscription_id: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_test_notifications_at_resource_group_level_request( +def build_get_test_notifications_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, notification_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -310,7 +305,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -334,7 +329,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -366,7 +361,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -402,7 +397,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_04_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_04_01.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -433,13 +428,13 @@ def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -467,7 +462,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -488,13 +483,13 @@ def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -508,7 +503,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -573,7 +568,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -587,7 +582,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -652,7 +647,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -704,13 +699,13 @@ def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2022_04_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -738,7 +733,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -759,14 +754,13 @@ def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2022_04_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -780,7 +774,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -844,7 +838,7 @@ def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -910,8 +904,7 @@ def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_04_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_04_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -926,7 +919,7 @@ def begin_post_test_notifications( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -953,7 +946,7 @@ def begin_post_test_notifications( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -965,8 +958,8 @@ def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_04_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_04_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -981,13 +974,13 @@ def begin_post_test_notifications( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1032,7 +1025,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications" } - def _create_notifications_at_resource_group_level_initial( + def _create_notifications_at_resource_group_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> Optional[_models.TestNotificationDetailsResponse]: error_map = { @@ -1046,7 +1039,7 @@ def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1102,7 +1095,7 @@ def _create_notifications_at_resource_group_level_initial( } @overload - def begin_create_notifications_at_resource_group_level( + def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: _models.NotificationRequestBody, @@ -1117,8 +1110,7 @@ def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_04_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_04_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1133,12 +1125,12 @@ def begin_create_notifications_at_resource_group_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_notifications_at_resource_group_level( + def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: IO, @@ -1168,12 +1160,12 @@ def begin_create_notifications_at_resource_group_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create_notifications_at_resource_group_level( + def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> LROPoller[_models.TestNotificationDetailsResponse]: """Send test notifications to a set of provided receivers. @@ -1183,8 +1175,8 @@ def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_04_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_04_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1199,13 +1191,13 @@ def begin_create_notifications_at_resource_group_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1259,7 +1251,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1273,7 +1265,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1311,7 +1303,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models } @distributed_trace - def get_test_notifications_at_resource_group_level( + def get_test_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1323,7 +1315,7 @@ def get_test_notifications_at_resource_group_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_04_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_04_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1337,7 +1329,7 @@ def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1382,13 +1374,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_04_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1471,13 +1463,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_04_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_04_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1568,7 +1560,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2022_04_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2022_04_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1625,7 +1617,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2022_04_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2022_04_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1645,7 +1637,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-04-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-04-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_configuration.py index b9c50c775c40..3f9c93c26b65 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", "2022-06-01") + api_version: str = kwargs.pop("api_version", "2022-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_monitor_management_client.py index 22e2df084ccf..bace8c7fbbe6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_monitor_management_client.py @@ -31,16 +31,16 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2022_06_01.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2022_06_01.operations.ActionGroupsOperations :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations :vartype data_collection_endpoints: - $(python-base-namespace).v2022_06_01.operations.DataCollectionEndpointsOperations + azure.mgmt.monitor.v2022_06_01.operations.DataCollectionEndpointsOperations :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations :vartype data_collection_rule_associations: - $(python-base-namespace).v2022_06_01.operations.DataCollectionRuleAssociationsOperations + azure.mgmt.monitor.v2022_06_01.operations.DataCollectionRuleAssociationsOperations :ivar data_collection_rules: DataCollectionRulesOperations operations :vartype data_collection_rules: - $(python-base-namespace).v2022_06_01.operations.DataCollectionRulesOperations + azure.mgmt.monitor.v2022_06_01.operations.DataCollectionRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_configuration.py index 8f99f90be32f..233b355cd156 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", "2022-06-01") + api_version: str = kwargs.pop("api_version", "2022-06-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_monitor_management_client.py index 19922b41aaf9..628c870841c8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/_monitor_management_client.py @@ -31,17 +31,16 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2022_06_01.aio.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2022_06_01.aio.operations.ActionGroupsOperations :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations :vartype data_collection_endpoints: - $(python-base-namespace).v2022_06_01.aio.operations.DataCollectionEndpointsOperations + azure.mgmt.monitor.v2022_06_01.aio.operations.DataCollectionEndpointsOperations :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations :vartype data_collection_rule_associations: - $(python-base-namespace).v2022_06_01.aio.operations.DataCollectionRuleAssociationsOperations + azure.mgmt.monitor.v2022_06_01.aio.operations.DataCollectionRuleAssociationsOperations :ivar data_collection_rules: DataCollectionRulesOperations operations :vartype data_collection_rules: - $(python-base-namespace).v2022_06_01.aio.operations.DataCollectionRulesOperations + azure.mgmt.monitor.v2022_06_01.aio.operations.DataCollectionRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_action_groups_operations.py index 879ea7c520b8..6dddebf368bd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -47,10 +46,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -61,7 +56,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_06_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_06_01.aio.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -92,13 +87,13 @@ async def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -126,7 +121,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -147,13 +142,13 @@ async def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -167,7 +162,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -232,7 +227,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -246,7 +241,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -311,7 +306,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -363,13 +358,13 @@ async def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2022_06_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -397,7 +392,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -418,14 +413,13 @@ async def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2022_06_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -439,7 +433,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -503,7 +497,7 @@ async def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -569,8 +563,7 @@ async def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -585,7 +578,7 @@ async def begin_post_test_notifications( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -612,7 +605,7 @@ async def begin_post_test_notifications( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -624,8 +617,8 @@ async def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -640,13 +633,13 @@ async def begin_post_test_notifications( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -691,7 +684,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications" } - async def _create_notifications_at_resource_group_level_initial( + async def _create_notifications_at_resource_group_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> Optional[_models.TestNotificationDetailsResponse]: error_map = { @@ -705,7 +698,7 @@ async def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -761,7 +754,7 @@ async def _create_notifications_at_resource_group_level_initial( } @overload - async def begin_create_notifications_at_resource_group_level( + async def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: _models.NotificationRequestBody, @@ -776,8 +769,7 @@ async def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -792,12 +784,12 @@ async def begin_create_notifications_at_resource_group_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_notifications_at_resource_group_level( + async def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: IO, @@ -827,12 +819,12 @@ async def begin_create_notifications_at_resource_group_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_notifications_at_resource_group_level( + async def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> AsyncLROPoller[_models.TestNotificationDetailsResponse]: """Send test notifications to a set of provided receivers. @@ -842,8 +834,8 @@ async def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -858,13 +850,13 @@ async def begin_create_notifications_at_resource_group_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -910,7 +902,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/createNotifications" } - async def _create_notifications_at_action_group_resource_level_initial( + async def _create_notifications_at_action_group_resource_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -928,7 +920,7 @@ async def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -985,7 +977,7 @@ async def _create_notifications_at_action_group_resource_level_initial( } @overload - async def begin_create_notifications_at_action_group_resource_level( + async def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1003,8 +995,7 @@ async def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1019,12 +1010,12 @@ async def begin_create_notifications_at_action_group_resource_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_notifications_at_action_group_resource_level( + async def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1057,12 +1048,12 @@ async def begin_create_notifications_at_action_group_resource_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_notifications_at_action_group_resource_level( + async def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1078,8 +1069,8 @@ async def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1094,13 +1085,13 @@ async def begin_create_notifications_at_action_group_resource_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -1157,7 +1148,7 @@ async def get_test_notifications( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1171,7 +1162,7 @@ async def get_test_notifications( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1209,7 +1200,7 @@ async def get_test_notifications( } @distributed_trace_async - async def get_test_notifications_at_resource_group_level( + async def get_test_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1221,7 +1212,7 @@ async def get_test_notifications_at_resource_group_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1235,7 +1226,7 @@ async def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1274,7 +1265,7 @@ async def get_test_notifications_at_resource_group_level( } @distributed_trace_async - async def get_test_notifications_at_action_group_resource_level( + async def get_test_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1288,7 +1279,7 @@ async def get_test_notifications_at_action_group_resource_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1302,7 +1293,7 @@ async def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1348,13 +1339,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_06_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1437,13 +1428,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_06_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1534,7 +1525,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2022_06_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2022_06_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1591,7 +1582,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2022_06_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2022_06_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1611,7 +1602,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_endpoints_operations.py index abba78270fbf..c35260518aa9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class DataCollectionEndpointsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_06_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_06_01.aio.MonitorManagementClient`'s :attr:`data_collection_endpoints` attribute. """ @@ -80,13 +75,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -168,13 +163,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -261,7 +256,7 @@ async def get( :type data_collection_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -275,7 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -334,13 +329,13 @@ async def create( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :type body: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -371,7 +366,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -395,13 +390,13 @@ async def create( :type data_collection_endpoint_name: str :param body: The payload. Is either a DataCollectionEndpointResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource or IO + :type body: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -415,7 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -493,13 +488,13 @@ async def update( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -530,7 +525,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -554,13 +549,13 @@ async def update( :type data_collection_endpoint_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -574,7 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rule_associations_operations.py index b00adfe15c8b..985bffa7cbb0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_list_by_rule_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class DataCollectionRuleAssociationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_06_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_06_01.aio.MonitorManagementClient`'s :attr:`data_collection_rule_associations` attribute. """ @@ -79,13 +74,13 @@ def list_by_resource( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -174,13 +169,13 @@ def list_by_rule( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -273,13 +268,13 @@ def list_by_data_collection_endpoint( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -368,8 +363,7 @@ async def get( :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -383,7 +377,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -440,14 +434,13 @@ async def create( :type association_name: str :param body: The payload. Default value is None. :type body: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -476,8 +469,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -500,15 +492,13 @@ async def create( :param body: The payload. Is either a DataCollectionRuleAssociationProxyOnlyResource type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource or - IO + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -522,7 +512,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -606,7 +596,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rules_operations.py index b4d5d9604107..3e861dea15bc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/aio/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class DataCollectionRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_06_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_06_01.aio.MonitorManagementClient`'s :attr:`data_collection_rules` attribute. """ @@ -80,13 +75,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -168,13 +163,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.DataColl :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -261,7 +256,7 @@ async def get( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -275,7 +270,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -334,13 +329,13 @@ async def create( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :type body: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -371,7 +366,7 @@ async def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -395,13 +390,13 @@ async def create( :type data_collection_rule_name: str :param body: The payload. Is either a DataCollectionRuleResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource or IO + :type body: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -415,7 +410,7 @@ async def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -493,13 +488,13 @@ async def update( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -530,7 +525,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -554,13 +549,13 @@ async def update( :type data_collection_rule_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -574,7 +569,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -657,7 +652,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/models/_models_py3.py index 3536a6f796ee..2b564b89bfb0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/models/_models_py3.py @@ -88,7 +88,7 @@ class ActionGroupList(_serialization.Model): """A list of action groups. :ivar value: The list of action groups. - :vartype value: list[~$(python-base-namespace).v2022_06_01.models.ActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -107,7 +107,7 @@ def __init__( ) -> None: """ :keyword value: The list of action groups. - :paramtype value: list[~$(python-base-namespace).v2022_06_01.models.ActionGroupResource] + :paramtype value: list[~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -216,36 +216,34 @@ class ActionGroupResource(AzureResource): # pylint: disable=too-many-instance-a enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2022_06_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2022_06_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2022_06_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2022_06_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2022_06_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2022_06_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2022_06_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.ArmRoleReceiver] :ivar event_hub_receivers: The list of event hub receivers that are part of this action group. - :vartype event_hub_receivers: - list[~$(python-base-namespace).v2022_06_01.models.EventHubReceiver] + :vartype event_hub_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.EventHubReceiver] """ _validation = { @@ -312,40 +310,36 @@ def __init__( enabled, then none of its receivers will receive communications. :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2022_06_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2022_06_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2022_06_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2022_06_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2022_06_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2022_06_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2022_06_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.ArmRoleReceiver] :keyword event_hub_receivers: The list of event hub receivers that are part of this action group. - :paramtype event_hub_receivers: - list[~$(python-base-namespace).v2022_06_01.models.EventHubReceiver] + :paramtype event_hub_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.EventHubReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name @@ -612,7 +606,7 @@ class ColumnDefinition(_serialization.Model): :vartype name: str :ivar type: The type of the column data. Known values are: "string", "int", "long", "real", "boolean", "datetime", and "dynamic". - :vartype type: str or ~$(python-base-namespace).v2022_06_01.models.KnownColumnDefinitionType + :vartype type: str or ~azure.mgmt.monitor.v2022_06_01.models.KnownColumnDefinitionType """ _attribute_map = { @@ -632,7 +626,7 @@ def __init__( :paramtype name: str :keyword type: The type of the column data. Known values are: "string", "int", "long", "real", "boolean", "datetime", and "dynamic". - :paramtype type: str or ~$(python-base-namespace).v2022_06_01.models.KnownColumnDefinitionType + :paramtype type: str or ~azure.mgmt.monitor.v2022_06_01.models.KnownColumnDefinitionType """ super().__init__(**kwargs) self.name = name @@ -702,30 +696,29 @@ class DataCollectionEndpoint(_serialization.Model): :vartype immutable_id: str :ivar configuration_access: The endpoint used by clients to access their configuration. :vartype configuration_access: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointConfigurationAccess :ivar logs_ingestion: The endpoint used by clients to ingest logs. :vartype logs_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointLogsIngestion :ivar metrics_ingestion: The endpoint used by clients to ingest metrics. :vartype metrics_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointMetricsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointMetricsIngestion :ivar network_acls: Network access control rules for the endpoints. - :vartype network_acls: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointNetworkAcls + :vartype network_acls: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointNetworkAcls :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionEndpointProvisioningState + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionEndpointProvisioningState :ivar private_link_scoped_resources: List of Azure Monitor Private Link Scope Resources to which this data collection endpoint resource is associated. This property is READ-ONLY. :vartype private_link_scoped_resources: - list[~$(python-base-namespace).v2022_06_01.models.PrivateLinkScopedResource] + list[~azure.mgmt.monitor.v2022_06_01.models.PrivateLinkScopedResource] :ivar failover_configuration: Failover configuration on this endpoint. This property is READ-ONLY. :vartype failover_configuration: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointFailoverConfiguration + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointFailoverConfiguration :ivar metadata: Metadata for the resource. This property is READ-ONLY. - :vartype metadata: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointMetadata """ _validation = { @@ -770,16 +763,16 @@ def __init__( :paramtype immutable_id: str :keyword configuration_access: The endpoint used by clients to access their configuration. :paramtype configuration_access: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointConfigurationAccess :keyword logs_ingestion: The endpoint used by clients to ingest logs. :paramtype logs_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointLogsIngestion :keyword metrics_ingestion: The endpoint used by clients to ingest metrics. :paramtype metrics_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointMetricsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointMetricsIngestion :keyword network_acls: Network access control rules for the endpoints. :paramtype network_acls: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointNetworkAcls """ super().__init__(**kwargs) self.description = description @@ -822,7 +815,7 @@ class FailoverConfigurationSpec(_serialization.Model): :ivar active_location: Active location where data flow will occur. :vartype active_location: str :ivar locations: Locations that are configured for failover. - :vartype locations: list[~$(python-base-namespace).v2022_06_01.models.LocationSpec] + :vartype locations: list[~azure.mgmt.monitor.v2022_06_01.models.LocationSpec] """ _attribute_map = { @@ -841,7 +834,7 @@ def __init__( :keyword active_location: Active location where data flow will occur. :paramtype active_location: str :keyword locations: Locations that are configured for failover. - :paramtype locations: list[~$(python-base-namespace).v2022_06_01.models.LocationSpec] + :paramtype locations: list[~azure.mgmt.monitor.v2022_06_01.models.LocationSpec] """ super().__init__(**kwargs) self.active_location = active_location @@ -854,7 +847,7 @@ class DataCollectionEndpointFailoverConfiguration(FailoverConfigurationSpec): :ivar active_location: Active location where data flow will occur. :vartype active_location: str :ivar locations: Locations that are configured for failover. - :vartype locations: list[~$(python-base-namespace).v2022_06_01.models.LocationSpec] + :vartype locations: list[~azure.mgmt.monitor.v2022_06_01.models.LocationSpec] """ _attribute_map = { @@ -873,7 +866,7 @@ def __init__( :keyword active_location: Active location where data flow will occur. :paramtype active_location: str :keyword locations: Locations that are configured for failover. - :paramtype locations: list[~$(python-base-namespace).v2022_06_01.models.LocationSpec] + :paramtype locations: list[~azure.mgmt.monitor.v2022_06_01.models.LocationSpec] """ super().__init__(active_location=active_location, locations=locations, **kwargs) @@ -1031,7 +1024,7 @@ class NetworkRuleSet(_serialization.Model): internet to the endpoints are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or - ~$(python-base-namespace).v2022_06_01.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2022_06_01.models.KnownPublicNetworkAccessOptions """ _attribute_map = { @@ -1049,7 +1042,7 @@ def __init__( internet to the endpoints are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or - ~$(python-base-namespace).v2022_06_01.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2022_06_01.models.KnownPublicNetworkAccessOptions """ super().__init__(**kwargs) self.public_network_access = public_network_access @@ -1062,7 +1055,7 @@ class DataCollectionEndpointNetworkAcls(NetworkRuleSet): internet to the endpoints are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or - ~$(python-base-namespace).v2022_06_01.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2022_06_01.models.KnownPublicNetworkAccessOptions """ _attribute_map = { @@ -1080,7 +1073,7 @@ def __init__( internet to the endpoints are allowed. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or - ~$(python-base-namespace).v2022_06_01.models.KnownPublicNetworkAccessOptions + ~azure.mgmt.monitor.v2022_06_01.models.KnownPublicNetworkAccessOptions """ super().__init__(public_network_access=public_network_access, **kwargs) @@ -1098,10 +1091,10 @@ class DataCollectionEndpointResource(_serialization.Model): # pylint: disable=t :vartype tags: dict[str, str] :ivar kind: The kind of the resource. Known values are: "Linux" and "Windows". :vartype kind: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionEndpointResourceKind + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionEndpointResourceKind :ivar identity: Managed service identity of the resource. :vartype identity: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResourceIdentity + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResourceIdentity :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -1112,7 +1105,7 @@ class DataCollectionEndpointResource(_serialization.Model): # pylint: disable=t :vartype etag: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResourceSystemData + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResourceSystemData :ivar description: Description of the data collection endpoint. :vartype description: str :ivar immutable_id: The immutable ID of this data collection endpoint resource. This property @@ -1120,30 +1113,29 @@ class DataCollectionEndpointResource(_serialization.Model): # pylint: disable=t :vartype immutable_id: str :ivar configuration_access: The endpoint used by clients to access their configuration. :vartype configuration_access: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointConfigurationAccess :ivar logs_ingestion: The endpoint used by clients to ingest logs. :vartype logs_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointLogsIngestion :ivar metrics_ingestion: The endpoint used by clients to ingest metrics. :vartype metrics_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointMetricsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointMetricsIngestion :ivar network_acls: Network access control rules for the endpoints. - :vartype network_acls: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointNetworkAcls + :vartype network_acls: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointNetworkAcls :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionEndpointProvisioningState + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionEndpointProvisioningState :ivar private_link_scoped_resources: List of Azure Monitor Private Link Scope Resources to which this data collection endpoint resource is associated. This property is READ-ONLY. :vartype private_link_scoped_resources: - list[~$(python-base-namespace).v2022_06_01.models.PrivateLinkScopedResource] + list[~azure.mgmt.monitor.v2022_06_01.models.PrivateLinkScopedResource] :ivar failover_configuration: Failover configuration on this endpoint. This property is READ-ONLY. :vartype failover_configuration: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointFailoverConfiguration + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointFailoverConfiguration :ivar metadata: Metadata for the resource. This property is READ-ONLY. - :vartype metadata: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointMetadata """ _validation = { @@ -1212,10 +1204,10 @@ def __init__( :paramtype tags: dict[str, str] :keyword kind: The kind of the resource. Known values are: "Linux" and "Windows". :paramtype kind: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionEndpointResourceKind + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionEndpointResourceKind :keyword identity: Managed service identity of the resource. :paramtype identity: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResourceIdentity + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResourceIdentity :keyword description: Description of the data collection endpoint. :paramtype description: str :keyword immutable_id: The immutable ID of this data collection endpoint resource. This @@ -1223,16 +1215,16 @@ def __init__( :paramtype immutable_id: str :keyword configuration_access: The endpoint used by clients to access their configuration. :paramtype configuration_access: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointConfigurationAccess :keyword logs_ingestion: The endpoint used by clients to ingest logs. :paramtype logs_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointLogsIngestion :keyword metrics_ingestion: The endpoint used by clients to ingest metrics. :paramtype metrics_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointMetricsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointMetricsIngestion :keyword network_acls: Network access control rules for the endpoints. :paramtype network_acls: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointNetworkAcls """ super().__init__(**kwargs) self.location = location @@ -1272,13 +1264,13 @@ class ManagedServiceIdentity(_serialization.Model): :ivar type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". - :vartype type: str or ~$(python-base-namespace).v2022_06_01.models.ManagedServiceIdentityType + :vartype type: str or ~azure.mgmt.monitor.v2022_06_01.models.ManagedServiceIdentityType :ivar user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :vartype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_06_01.models.UserAssignedIdentity] + ~azure.mgmt.monitor.v2022_06_01.models.UserAssignedIdentity] """ _validation = { @@ -1305,13 +1297,13 @@ def __init__( :keyword type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". - :paramtype type: str or ~$(python-base-namespace).v2022_06_01.models.ManagedServiceIdentityType + :paramtype type: str or ~azure.mgmt.monitor.v2022_06_01.models.ManagedServiceIdentityType :keyword user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :paramtype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_06_01.models.UserAssignedIdentity] + ~azure.mgmt.monitor.v2022_06_01.models.UserAssignedIdentity] """ super().__init__(**kwargs) self.principal_id = None @@ -1336,13 +1328,13 @@ class DataCollectionEndpointResourceIdentity(ManagedServiceIdentity): :ivar type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". - :vartype type: str or ~$(python-base-namespace).v2022_06_01.models.ManagedServiceIdentityType + :vartype type: str or ~azure.mgmt.monitor.v2022_06_01.models.ManagedServiceIdentityType :ivar user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :vartype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_06_01.models.UserAssignedIdentity] + ~azure.mgmt.monitor.v2022_06_01.models.UserAssignedIdentity] """ _validation = { @@ -1369,13 +1361,13 @@ def __init__( :keyword type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". - :paramtype type: str or ~$(python-base-namespace).v2022_06_01.models.ManagedServiceIdentityType + :paramtype type: str or ~azure.mgmt.monitor.v2022_06_01.models.ManagedServiceIdentityType :keyword user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :paramtype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_06_01.models.UserAssignedIdentity] + ~azure.mgmt.monitor.v2022_06_01.models.UserAssignedIdentity] """ super().__init__(type=type, user_assigned_identities=user_assigned_identities, **kwargs) @@ -1386,8 +1378,7 @@ class DataCollectionEndpointResourceListResult(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: A list of resources. Required. - :vartype value: - list[~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource] + :vartype value: list[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -1406,8 +1397,7 @@ def __init__( ) -> None: """ :keyword value: A list of resources. Required. - :paramtype value: - list[~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource] + :paramtype value: list[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -1428,30 +1418,29 @@ class DataCollectionEndpointResourceProperties(DataCollectionEndpoint): :vartype immutable_id: str :ivar configuration_access: The endpoint used by clients to access their configuration. :vartype configuration_access: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointConfigurationAccess :ivar logs_ingestion: The endpoint used by clients to ingest logs. :vartype logs_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointLogsIngestion :ivar metrics_ingestion: The endpoint used by clients to ingest metrics. :vartype metrics_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointMetricsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointMetricsIngestion :ivar network_acls: Network access control rules for the endpoints. - :vartype network_acls: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointNetworkAcls + :vartype network_acls: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointNetworkAcls :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionEndpointProvisioningState + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionEndpointProvisioningState :ivar private_link_scoped_resources: List of Azure Monitor Private Link Scope Resources to which this data collection endpoint resource is associated. This property is READ-ONLY. :vartype private_link_scoped_resources: - list[~$(python-base-namespace).v2022_06_01.models.PrivateLinkScopedResource] + list[~azure.mgmt.monitor.v2022_06_01.models.PrivateLinkScopedResource] :ivar failover_configuration: Failover configuration on this endpoint. This property is READ-ONLY. :vartype failover_configuration: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointFailoverConfiguration + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointFailoverConfiguration :ivar metadata: Metadata for the resource. This property is READ-ONLY. - :vartype metadata: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointMetadata """ _validation = { @@ -1496,16 +1485,16 @@ def __init__( :paramtype immutable_id: str :keyword configuration_access: The endpoint used by clients to access their configuration. :paramtype configuration_access: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointConfigurationAccess + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointConfigurationAccess :keyword logs_ingestion: The endpoint used by clients to ingest logs. :paramtype logs_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointLogsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointLogsIngestion :keyword metrics_ingestion: The endpoint used by clients to ingest metrics. :paramtype metrics_ingestion: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointMetricsIngestion + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointMetricsIngestion :keyword network_acls: Network access control rules for the endpoints. :paramtype network_acls: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointNetworkAcls + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointNetworkAcls """ super().__init__( description=description, @@ -1525,15 +1514,14 @@ class SystemData(_serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -1563,15 +1551,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -1591,15 +1578,14 @@ class DataCollectionEndpointResourceSystemData(SystemData): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -1629,15 +1615,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -1665,24 +1650,22 @@ class DataCollectionRule(_serialization.Model): rule can be used with. :vartype data_collection_endpoint_id: str :ivar metadata: Metadata about the resource. - :vartype metadata: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleMetadata :ivar stream_declarations: Declaration of custom streams used in this rule. :vartype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_06_01.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_06_01.models.StreamDeclaration] :ivar data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :vartype data_sources: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDataSources + :vartype data_sources: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. - :vartype destinations: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDestinations + :vartype destinations: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2022_06_01.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2022_06_01.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -1722,17 +1705,15 @@ def __init__( :paramtype data_collection_endpoint_id: str :keyword stream_declarations: Declaration of custom streams used in this rule. :paramtype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_06_01.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_06_01.models.StreamDeclaration] :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :paramtype data_sources: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDataSources + :paramtype data_sources: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. - :paramtype destinations: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDestinations + :paramtype destinations: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2022_06_01.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2022_06_01.models.DataFlow] """ super().__init__(**kwargs) self.description = description @@ -1762,10 +1743,9 @@ class DataCollectionRuleAssociation(_serialization.Model): :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionRuleAssociationProvisioningState :ivar metadata: Metadata about the resource. - :vartype metadata: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationMetadata """ _validation = { @@ -1849,7 +1829,7 @@ class DataCollectionRuleAssociationProxyOnlyResource(_serialization.Model): :vartype etag: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResourceSystemData + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResourceSystemData :ivar description: Description of the association. :vartype description: str :ivar data_collection_rule_id: The resource ID of the data collection rule that is to be @@ -1861,10 +1841,9 @@ class DataCollectionRuleAssociationProxyOnlyResource(_serialization.Model): :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionRuleAssociationProvisioningState :ivar metadata: Metadata about the resource. - :vartype metadata: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationMetadata """ _validation = { @@ -1928,7 +1907,7 @@ class DataCollectionRuleAssociationProxyOnlyResourceListResult(_serialization.Mo :ivar value: A list of resources. Required. :vartype value: - list[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] + list[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -1952,7 +1931,7 @@ def __init__( """ :keyword value: A list of resources. Required. :paramtype value: - list[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] + list[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -1977,10 +1956,9 @@ class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRul :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionRuleAssociationProvisioningState + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionRuleAssociationProvisioningState :ivar metadata: Metadata about the resource. - :vartype metadata: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationMetadata """ _validation = { @@ -2029,15 +2007,14 @@ class DataCollectionRuleAssociationProxyOnlyResourceSystemData(SystemData): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -2067,15 +2044,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -2095,29 +2071,29 @@ class DataSourcesSpec(_serialization.Model): :ivar performance_counters: The list of performance counter data source configurations. :vartype performance_counters: - list[~$(python-base-namespace).v2022_06_01.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PerfCounterDataSource] :ivar windows_event_logs: The list of Windows Event Log data source configurations. :vartype windows_event_logs: - list[~$(python-base-namespace).v2022_06_01.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.WindowsEventLogDataSource] :ivar syslog: The list of Syslog data source configurations. - :vartype syslog: list[~$(python-base-namespace).v2022_06_01.models.SyslogDataSource] + :vartype syslog: list[~azure.mgmt.monitor.v2022_06_01.models.SyslogDataSource] :ivar extensions: The list of Azure VM extension data source configurations. - :vartype extensions: list[~$(python-base-namespace).v2022_06_01.models.ExtensionDataSource] + :vartype extensions: list[~azure.mgmt.monitor.v2022_06_01.models.ExtensionDataSource] :ivar log_files: The list of Log files source configurations. - :vartype log_files: list[~$(python-base-namespace).v2022_06_01.models.LogFilesDataSource] + :vartype log_files: list[~azure.mgmt.monitor.v2022_06_01.models.LogFilesDataSource] :ivar iis_logs: The list of IIS logs source configurations. - :vartype iis_logs: list[~$(python-base-namespace).v2022_06_01.models.IisLogsDataSource] + :vartype iis_logs: list[~azure.mgmt.monitor.v2022_06_01.models.IisLogsDataSource] :ivar windows_firewall_logs: The list of Windows Firewall logs source configurations. :vartype windows_firewall_logs: - list[~$(python-base-namespace).v2022_06_01.models.WindowsFirewallLogsDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.WindowsFirewallLogsDataSource] :ivar prometheus_forwarder: The list of Prometheus forwarder data source configurations. :vartype prometheus_forwarder: - list[~$(python-base-namespace).v2022_06_01.models.PrometheusForwarderDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PrometheusForwarderDataSource] :ivar platform_telemetry: The list of platform telemetry configurations. :vartype platform_telemetry: - list[~$(python-base-namespace).v2022_06_01.models.PlatformTelemetryDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PlatformTelemetryDataSource] :ivar data_imports: Specifications of pull based data sources. - :vartype data_imports: ~$(python-base-namespace).v2022_06_01.models.DataSourcesSpecDataImports + :vartype data_imports: ~azure.mgmt.monitor.v2022_06_01.models.DataSourcesSpecDataImports """ _attribute_map = { @@ -2151,30 +2127,29 @@ def __init__( """ :keyword performance_counters: The list of performance counter data source configurations. :paramtype performance_counters: - list[~$(python-base-namespace).v2022_06_01.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PerfCounterDataSource] :keyword windows_event_logs: The list of Windows Event Log data source configurations. :paramtype windows_event_logs: - list[~$(python-base-namespace).v2022_06_01.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.WindowsEventLogDataSource] :keyword syslog: The list of Syslog data source configurations. - :paramtype syslog: list[~$(python-base-namespace).v2022_06_01.models.SyslogDataSource] + :paramtype syslog: list[~azure.mgmt.monitor.v2022_06_01.models.SyslogDataSource] :keyword extensions: The list of Azure VM extension data source configurations. - :paramtype extensions: list[~$(python-base-namespace).v2022_06_01.models.ExtensionDataSource] + :paramtype extensions: list[~azure.mgmt.monitor.v2022_06_01.models.ExtensionDataSource] :keyword log_files: The list of Log files source configurations. - :paramtype log_files: list[~$(python-base-namespace).v2022_06_01.models.LogFilesDataSource] + :paramtype log_files: list[~azure.mgmt.monitor.v2022_06_01.models.LogFilesDataSource] :keyword iis_logs: The list of IIS logs source configurations. - :paramtype iis_logs: list[~$(python-base-namespace).v2022_06_01.models.IisLogsDataSource] + :paramtype iis_logs: list[~azure.mgmt.monitor.v2022_06_01.models.IisLogsDataSource] :keyword windows_firewall_logs: The list of Windows Firewall logs source configurations. :paramtype windows_firewall_logs: - list[~$(python-base-namespace).v2022_06_01.models.WindowsFirewallLogsDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.WindowsFirewallLogsDataSource] :keyword prometheus_forwarder: The list of Prometheus forwarder data source configurations. :paramtype prometheus_forwarder: - list[~$(python-base-namespace).v2022_06_01.models.PrometheusForwarderDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PrometheusForwarderDataSource] :keyword platform_telemetry: The list of platform telemetry configurations. :paramtype platform_telemetry: - list[~$(python-base-namespace).v2022_06_01.models.PlatformTelemetryDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PlatformTelemetryDataSource] :keyword data_imports: Specifications of pull based data sources. - :paramtype data_imports: - ~$(python-base-namespace).v2022_06_01.models.DataSourcesSpecDataImports + :paramtype data_imports: ~azure.mgmt.monitor.v2022_06_01.models.DataSourcesSpecDataImports """ super().__init__(**kwargs) self.performance_counters = performance_counters @@ -2196,29 +2171,29 @@ class DataCollectionRuleDataSources(DataSourcesSpec): :ivar performance_counters: The list of performance counter data source configurations. :vartype performance_counters: - list[~$(python-base-namespace).v2022_06_01.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PerfCounterDataSource] :ivar windows_event_logs: The list of Windows Event Log data source configurations. :vartype windows_event_logs: - list[~$(python-base-namespace).v2022_06_01.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.WindowsEventLogDataSource] :ivar syslog: The list of Syslog data source configurations. - :vartype syslog: list[~$(python-base-namespace).v2022_06_01.models.SyslogDataSource] + :vartype syslog: list[~azure.mgmt.monitor.v2022_06_01.models.SyslogDataSource] :ivar extensions: The list of Azure VM extension data source configurations. - :vartype extensions: list[~$(python-base-namespace).v2022_06_01.models.ExtensionDataSource] + :vartype extensions: list[~azure.mgmt.monitor.v2022_06_01.models.ExtensionDataSource] :ivar log_files: The list of Log files source configurations. - :vartype log_files: list[~$(python-base-namespace).v2022_06_01.models.LogFilesDataSource] + :vartype log_files: list[~azure.mgmt.monitor.v2022_06_01.models.LogFilesDataSource] :ivar iis_logs: The list of IIS logs source configurations. - :vartype iis_logs: list[~$(python-base-namespace).v2022_06_01.models.IisLogsDataSource] + :vartype iis_logs: list[~azure.mgmt.monitor.v2022_06_01.models.IisLogsDataSource] :ivar windows_firewall_logs: The list of Windows Firewall logs source configurations. :vartype windows_firewall_logs: - list[~$(python-base-namespace).v2022_06_01.models.WindowsFirewallLogsDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.WindowsFirewallLogsDataSource] :ivar prometheus_forwarder: The list of Prometheus forwarder data source configurations. :vartype prometheus_forwarder: - list[~$(python-base-namespace).v2022_06_01.models.PrometheusForwarderDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PrometheusForwarderDataSource] :ivar platform_telemetry: The list of platform telemetry configurations. :vartype platform_telemetry: - list[~$(python-base-namespace).v2022_06_01.models.PlatformTelemetryDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PlatformTelemetryDataSource] :ivar data_imports: Specifications of pull based data sources. - :vartype data_imports: ~$(python-base-namespace).v2022_06_01.models.DataSourcesSpecDataImports + :vartype data_imports: ~azure.mgmt.monitor.v2022_06_01.models.DataSourcesSpecDataImports """ _attribute_map = { @@ -2252,30 +2227,29 @@ def __init__( """ :keyword performance_counters: The list of performance counter data source configurations. :paramtype performance_counters: - list[~$(python-base-namespace).v2022_06_01.models.PerfCounterDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PerfCounterDataSource] :keyword windows_event_logs: The list of Windows Event Log data source configurations. :paramtype windows_event_logs: - list[~$(python-base-namespace).v2022_06_01.models.WindowsEventLogDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.WindowsEventLogDataSource] :keyword syslog: The list of Syslog data source configurations. - :paramtype syslog: list[~$(python-base-namespace).v2022_06_01.models.SyslogDataSource] + :paramtype syslog: list[~azure.mgmt.monitor.v2022_06_01.models.SyslogDataSource] :keyword extensions: The list of Azure VM extension data source configurations. - :paramtype extensions: list[~$(python-base-namespace).v2022_06_01.models.ExtensionDataSource] + :paramtype extensions: list[~azure.mgmt.monitor.v2022_06_01.models.ExtensionDataSource] :keyword log_files: The list of Log files source configurations. - :paramtype log_files: list[~$(python-base-namespace).v2022_06_01.models.LogFilesDataSource] + :paramtype log_files: list[~azure.mgmt.monitor.v2022_06_01.models.LogFilesDataSource] :keyword iis_logs: The list of IIS logs source configurations. - :paramtype iis_logs: list[~$(python-base-namespace).v2022_06_01.models.IisLogsDataSource] + :paramtype iis_logs: list[~azure.mgmt.monitor.v2022_06_01.models.IisLogsDataSource] :keyword windows_firewall_logs: The list of Windows Firewall logs source configurations. :paramtype windows_firewall_logs: - list[~$(python-base-namespace).v2022_06_01.models.WindowsFirewallLogsDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.WindowsFirewallLogsDataSource] :keyword prometheus_forwarder: The list of Prometheus forwarder data source configurations. :paramtype prometheus_forwarder: - list[~$(python-base-namespace).v2022_06_01.models.PrometheusForwarderDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PrometheusForwarderDataSource] :keyword platform_telemetry: The list of platform telemetry configurations. :paramtype platform_telemetry: - list[~$(python-base-namespace).v2022_06_01.models.PlatformTelemetryDataSource] + list[~azure.mgmt.monitor.v2022_06_01.models.PlatformTelemetryDataSource] :keyword data_imports: Specifications of pull based data sources. - :paramtype data_imports: - ~$(python-base-namespace).v2022_06_01.models.DataSourcesSpecDataImports + :paramtype data_imports: ~azure.mgmt.monitor.v2022_06_01.models.DataSourcesSpecDataImports """ super().__init__( performance_counters=performance_counters, @@ -2296,29 +2270,27 @@ class DestinationsSpec(_serialization.Model): """Specification of destinations that can be used in data flows. :ivar log_analytics: List of Log Analytics destinations. - :vartype log_analytics: - list[~$(python-base-namespace).v2022_06_01.models.LogAnalyticsDestination] + :vartype log_analytics: list[~azure.mgmt.monitor.v2022_06_01.models.LogAnalyticsDestination] :ivar monitoring_accounts: List of monitoring account destinations. :vartype monitoring_accounts: - list[~$(python-base-namespace).v2022_06_01.models.MonitoringAccountDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.MonitoringAccountDestination] :ivar azure_monitor_metrics: Azure Monitor Metrics destination. :vartype azure_monitor_metrics: - ~$(python-base-namespace).v2022_06_01.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2022_06_01.models.DestinationsSpecAzureMonitorMetrics :ivar event_hubs: List of Event Hubs destinations. - :vartype event_hubs: list[~$(python-base-namespace).v2022_06_01.models.EventHubDestination] + :vartype event_hubs: list[~azure.mgmt.monitor.v2022_06_01.models.EventHubDestination] :ivar event_hubs_direct: List of Event Hubs Direct destinations. :vartype event_hubs_direct: - list[~$(python-base-namespace).v2022_06_01.models.EventHubDirectDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.EventHubDirectDestination] :ivar storage_blobs_direct: List of Storage Blob Direct destinations. To be used only for sending data directly to store from the agent. :vartype storage_blobs_direct: - list[~$(python-base-namespace).v2022_06_01.models.StorageBlobDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageBlobDestination] :ivar storage_tables_direct: List of Storage Table Direct destinations. :vartype storage_tables_direct: - list[~$(python-base-namespace).v2022_06_01.models.StorageTableDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageTableDestination] :ivar storage_accounts: List of storage accounts destinations. - :vartype storage_accounts: - list[~$(python-base-namespace).v2022_06_01.models.StorageBlobDestination] + :vartype storage_accounts: list[~azure.mgmt.monitor.v2022_06_01.models.StorageBlobDestination] """ _attribute_map = { @@ -2347,29 +2319,28 @@ def __init__( ) -> None: """ :keyword log_analytics: List of Log Analytics destinations. - :paramtype log_analytics: - list[~$(python-base-namespace).v2022_06_01.models.LogAnalyticsDestination] + :paramtype log_analytics: list[~azure.mgmt.monitor.v2022_06_01.models.LogAnalyticsDestination] :keyword monitoring_accounts: List of monitoring account destinations. :paramtype monitoring_accounts: - list[~$(python-base-namespace).v2022_06_01.models.MonitoringAccountDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.MonitoringAccountDestination] :keyword azure_monitor_metrics: Azure Monitor Metrics destination. :paramtype azure_monitor_metrics: - ~$(python-base-namespace).v2022_06_01.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2022_06_01.models.DestinationsSpecAzureMonitorMetrics :keyword event_hubs: List of Event Hubs destinations. - :paramtype event_hubs: list[~$(python-base-namespace).v2022_06_01.models.EventHubDestination] + :paramtype event_hubs: list[~azure.mgmt.monitor.v2022_06_01.models.EventHubDestination] :keyword event_hubs_direct: List of Event Hubs Direct destinations. :paramtype event_hubs_direct: - list[~$(python-base-namespace).v2022_06_01.models.EventHubDirectDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.EventHubDirectDestination] :keyword storage_blobs_direct: List of Storage Blob Direct destinations. To be used only for sending data directly to store from the agent. :paramtype storage_blobs_direct: - list[~$(python-base-namespace).v2022_06_01.models.StorageBlobDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageBlobDestination] :keyword storage_tables_direct: List of Storage Table Direct destinations. :paramtype storage_tables_direct: - list[~$(python-base-namespace).v2022_06_01.models.StorageTableDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageTableDestination] :keyword storage_accounts: List of storage accounts destinations. :paramtype storage_accounts: - list[~$(python-base-namespace).v2022_06_01.models.StorageBlobDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageBlobDestination] """ super().__init__(**kwargs) self.log_analytics = log_analytics @@ -2386,29 +2357,27 @@ class DataCollectionRuleDestinations(DestinationsSpec): """The specification of destinations. :ivar log_analytics: List of Log Analytics destinations. - :vartype log_analytics: - list[~$(python-base-namespace).v2022_06_01.models.LogAnalyticsDestination] + :vartype log_analytics: list[~azure.mgmt.monitor.v2022_06_01.models.LogAnalyticsDestination] :ivar monitoring_accounts: List of monitoring account destinations. :vartype monitoring_accounts: - list[~$(python-base-namespace).v2022_06_01.models.MonitoringAccountDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.MonitoringAccountDestination] :ivar azure_monitor_metrics: Azure Monitor Metrics destination. :vartype azure_monitor_metrics: - ~$(python-base-namespace).v2022_06_01.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2022_06_01.models.DestinationsSpecAzureMonitorMetrics :ivar event_hubs: List of Event Hubs destinations. - :vartype event_hubs: list[~$(python-base-namespace).v2022_06_01.models.EventHubDestination] + :vartype event_hubs: list[~azure.mgmt.monitor.v2022_06_01.models.EventHubDestination] :ivar event_hubs_direct: List of Event Hubs Direct destinations. :vartype event_hubs_direct: - list[~$(python-base-namespace).v2022_06_01.models.EventHubDirectDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.EventHubDirectDestination] :ivar storage_blobs_direct: List of Storage Blob Direct destinations. To be used only for sending data directly to store from the agent. :vartype storage_blobs_direct: - list[~$(python-base-namespace).v2022_06_01.models.StorageBlobDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageBlobDestination] :ivar storage_tables_direct: List of Storage Table Direct destinations. :vartype storage_tables_direct: - list[~$(python-base-namespace).v2022_06_01.models.StorageTableDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageTableDestination] :ivar storage_accounts: List of storage accounts destinations. - :vartype storage_accounts: - list[~$(python-base-namespace).v2022_06_01.models.StorageBlobDestination] + :vartype storage_accounts: list[~azure.mgmt.monitor.v2022_06_01.models.StorageBlobDestination] """ _attribute_map = { @@ -2437,29 +2406,28 @@ def __init__( ) -> None: """ :keyword log_analytics: List of Log Analytics destinations. - :paramtype log_analytics: - list[~$(python-base-namespace).v2022_06_01.models.LogAnalyticsDestination] + :paramtype log_analytics: list[~azure.mgmt.monitor.v2022_06_01.models.LogAnalyticsDestination] :keyword monitoring_accounts: List of monitoring account destinations. :paramtype monitoring_accounts: - list[~$(python-base-namespace).v2022_06_01.models.MonitoringAccountDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.MonitoringAccountDestination] :keyword azure_monitor_metrics: Azure Monitor Metrics destination. :paramtype azure_monitor_metrics: - ~$(python-base-namespace).v2022_06_01.models.DestinationsSpecAzureMonitorMetrics + ~azure.mgmt.monitor.v2022_06_01.models.DestinationsSpecAzureMonitorMetrics :keyword event_hubs: List of Event Hubs destinations. - :paramtype event_hubs: list[~$(python-base-namespace).v2022_06_01.models.EventHubDestination] + :paramtype event_hubs: list[~azure.mgmt.monitor.v2022_06_01.models.EventHubDestination] :keyword event_hubs_direct: List of Event Hubs Direct destinations. :paramtype event_hubs_direct: - list[~$(python-base-namespace).v2022_06_01.models.EventHubDirectDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.EventHubDirectDestination] :keyword storage_blobs_direct: List of Storage Blob Direct destinations. To be used only for sending data directly to store from the agent. :paramtype storage_blobs_direct: - list[~$(python-base-namespace).v2022_06_01.models.StorageBlobDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageBlobDestination] :keyword storage_tables_direct: List of Storage Table Direct destinations. :paramtype storage_tables_direct: - list[~$(python-base-namespace).v2022_06_01.models.StorageTableDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageTableDestination] :keyword storage_accounts: List of storage accounts destinations. :paramtype storage_accounts: - list[~$(python-base-namespace).v2022_06_01.models.StorageBlobDestination] + list[~azure.mgmt.monitor.v2022_06_01.models.StorageBlobDestination] """ super().__init__( log_analytics=log_analytics, @@ -2514,10 +2482,9 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m :vartype tags: dict[str, str] :ivar kind: The kind of the resource. Known values are: "Linux" and "Windows". :vartype kind: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionRuleResourceKind + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionRuleResourceKind :ivar identity: Managed service identity of the resource. - :vartype identity: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResourceIdentity + :vartype identity: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResourceIdentity :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -2528,7 +2495,7 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m :vartype etag: str :ivar system_data: Metadata pertaining to creation and last modification of the resource. :vartype system_data: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResourceSystemData + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResourceSystemData :ivar description: Description of the data collection rule. :vartype description: str :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. @@ -2537,24 +2504,22 @@ class DataCollectionRuleResource(_serialization.Model): # pylint: disable=too-m rule can be used with. :vartype data_collection_endpoint_id: str :ivar metadata: Metadata about the resource. - :vartype metadata: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleMetadata :ivar stream_declarations: Declaration of custom streams used in this rule. :vartype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_06_01.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_06_01.models.StreamDeclaration] :ivar data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :vartype data_sources: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDataSources + :vartype data_sources: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. - :vartype destinations: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDestinations + :vartype destinations: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2022_06_01.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2022_06_01.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -2612,10 +2577,9 @@ def __init__( :paramtype tags: dict[str, str] :keyword kind: The kind of the resource. Known values are: "Linux" and "Windows". :paramtype kind: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionRuleResourceKind + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionRuleResourceKind :keyword identity: Managed service identity of the resource. - :paramtype identity: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResourceIdentity + :paramtype identity: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResourceIdentity :keyword description: Description of the data collection rule. :paramtype description: str :keyword data_collection_endpoint_id: The resource ID of the data collection endpoint that this @@ -2623,17 +2587,15 @@ def __init__( :paramtype data_collection_endpoint_id: str :keyword stream_declarations: Declaration of custom streams used in this rule. :paramtype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_06_01.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_06_01.models.StreamDeclaration] :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :paramtype data_sources: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDataSources + :paramtype data_sources: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. - :paramtype destinations: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDestinations + :paramtype destinations: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2022_06_01.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2022_06_01.models.DataFlow] """ super().__init__(**kwargs) self.location = location @@ -2672,13 +2634,13 @@ class DataCollectionRuleResourceIdentity(ManagedServiceIdentity): :ivar type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". - :vartype type: str or ~$(python-base-namespace).v2022_06_01.models.ManagedServiceIdentityType + :vartype type: str or ~azure.mgmt.monitor.v2022_06_01.models.ManagedServiceIdentityType :ivar user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :vartype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_06_01.models.UserAssignedIdentity] + ~azure.mgmt.monitor.v2022_06_01.models.UserAssignedIdentity] """ _validation = { @@ -2705,13 +2667,13 @@ def __init__( :keyword type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". - :paramtype type: str or ~$(python-base-namespace).v2022_06_01.models.ManagedServiceIdentityType + :paramtype type: str or ~azure.mgmt.monitor.v2022_06_01.models.ManagedServiceIdentityType :keyword user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :paramtype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_06_01.models.UserAssignedIdentity] + ~azure.mgmt.monitor.v2022_06_01.models.UserAssignedIdentity] """ super().__init__(type=type, user_assigned_identities=user_assigned_identities, **kwargs) @@ -2722,7 +2684,7 @@ class DataCollectionRuleResourceListResult(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: A list of resources. Required. - :vartype value: list[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource] :ivar next_link: The URL to use for getting the next set of results. :vartype next_link: str """ @@ -2741,7 +2703,7 @@ def __init__( ) -> None: """ :keyword value: A list of resources. Required. - :paramtype value: list[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource] + :paramtype value: list[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource] :keyword next_link: The URL to use for getting the next set of results. :paramtype next_link: str """ @@ -2763,24 +2725,22 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): rule can be used with. :vartype data_collection_endpoint_id: str :ivar metadata: Metadata about the resource. - :vartype metadata: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleMetadata + :vartype metadata: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleMetadata :ivar stream_declarations: Declaration of custom streams used in this rule. :vartype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_06_01.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_06_01.models.StreamDeclaration] :ivar data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :vartype data_sources: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDataSources + :vartype data_sources: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDataSources :ivar destinations: The specification of destinations. - :vartype destinations: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDestinations + :vartype destinations: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDestinations :ivar data_flows: The specification of data flows. - :vartype data_flows: list[~$(python-base-namespace).v2022_06_01.models.DataFlow] + :vartype data_flows: list[~azure.mgmt.monitor.v2022_06_01.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_state: str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataCollectionRuleProvisioningState + ~azure.mgmt.monitor.v2022_06_01.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -2820,17 +2780,15 @@ def __init__( :paramtype data_collection_endpoint_id: str :keyword stream_declarations: Declaration of custom streams used in this rule. :paramtype stream_declarations: dict[str, - ~$(python-base-namespace).v2022_06_01.models.StreamDeclaration] + ~azure.mgmt.monitor.v2022_06_01.models.StreamDeclaration] :keyword data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :paramtype data_sources: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDataSources + :paramtype data_sources: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDataSources :keyword destinations: The specification of destinations. - :paramtype destinations: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleDestinations + :paramtype destinations: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleDestinations :keyword data_flows: The specification of data flows. - :paramtype data_flows: list[~$(python-base-namespace).v2022_06_01.models.DataFlow] + :paramtype data_flows: list[~azure.mgmt.monitor.v2022_06_01.models.DataFlow] """ super().__init__( description=description, @@ -2850,15 +2808,14 @@ class DataCollectionRuleResourceSystemData(SystemData): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -2888,15 +2845,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_06_01.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_06_01.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ @@ -2915,8 +2871,7 @@ class DataFlow(_serialization.Model): """Definition of which streams are sent to which destinations. :ivar streams: List of streams for this data flow. - :vartype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataFlowStreams] + :vartype streams: list[str or ~azure.mgmt.monitor.v2022_06_01.models.KnownDataFlowStreams] :ivar destinations: List of destinations for this data flow. :vartype destinations: list[str] :ivar transform_kql: The KQL query to transform stream data. @@ -2948,8 +2903,7 @@ def __init__( ) -> None: """ :keyword streams: List of streams for this data flow. - :paramtype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownDataFlowStreams] + :paramtype streams: list[str or ~azure.mgmt.monitor.v2022_06_01.models.KnownDataFlowStreams] :keyword destinations: List of destinations for this data flow. :paramtype destinations: list[str] :keyword transform_kql: The KQL query to transform stream data. @@ -2972,7 +2926,7 @@ class DataImportSources(_serialization.Model): """DataImportSources. :ivar event_hub: Definition of Event Hub configuration. - :vartype event_hub: ~$(python-base-namespace).v2022_06_01.models.DataImportSourcesEventHub + :vartype event_hub: ~azure.mgmt.monitor.v2022_06_01.models.DataImportSourcesEventHub """ _attribute_map = { @@ -2982,7 +2936,7 @@ class DataImportSources(_serialization.Model): def __init__(self, *, event_hub: Optional["_models.DataImportSourcesEventHub"] = None, **kwargs: Any) -> None: """ :keyword event_hub: Definition of Event Hub configuration. - :paramtype event_hub: ~$(python-base-namespace).v2022_06_01.models.DataImportSourcesEventHub + :paramtype event_hub: ~azure.mgmt.monitor.v2022_06_01.models.DataImportSourcesEventHub """ super().__init__(**kwargs) self.event_hub = event_hub @@ -3075,7 +3029,7 @@ class DataSourcesSpecDataImports(DataImportSources): """Specifications of pull based data sources. :ivar event_hub: Definition of Event Hub configuration. - :vartype event_hub: ~$(python-base-namespace).v2022_06_01.models.DataImportSourcesEventHub + :vartype event_hub: ~azure.mgmt.monitor.v2022_06_01.models.DataImportSourcesEventHub """ _attribute_map = { @@ -3085,7 +3039,7 @@ class DataSourcesSpecDataImports(DataImportSources): def __init__(self, *, event_hub: Optional["_models.DataImportSourcesEventHub"] = None, **kwargs: Any) -> None: """ :keyword event_hub: Definition of Event Hub configuration. - :paramtype event_hub: ~$(python-base-namespace).v2022_06_01.models.DataImportSourcesEventHub + :paramtype event_hub: ~azure.mgmt.monitor.v2022_06_01.models.DataImportSourcesEventHub """ super().__init__(event_hub=event_hub, **kwargs) @@ -3129,7 +3083,7 @@ class EmailReceiver(_serialization.Model): :vartype use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2022_06_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2022_06_01.models.ReceiverStatus """ _validation = { @@ -3228,10 +3182,9 @@ class ErrorDetail(_serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~$(python-base-namespace).v2022_06_01.models.ErrorDetail] + :vartype details: list[~azure.mgmt.monitor.v2022_06_01.models.ErrorDetail] :ivar additional_info: The error additional info. - :vartype additional_info: - list[~$(python-base-namespace).v2022_06_01.models.ErrorAdditionalInfo] + :vartype additional_info: list[~azure.mgmt.monitor.v2022_06_01.models.ErrorAdditionalInfo] """ _validation = { @@ -3291,7 +3244,7 @@ class ErrorResponseCommonV2(_serialization.Model): operations. (This also follows the OData error response format.). :ivar error: The error object. - :vartype error: ~$(python-base-namespace).v2022_06_01.models.ErrorDetail + :vartype error: ~azure.mgmt.monitor.v2022_06_01.models.ErrorDetail """ _attribute_map = { @@ -3301,7 +3254,7 @@ class ErrorResponseCommonV2(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~$(python-base-namespace).v2022_06_01.models.ErrorDetail + :paramtype error: ~azure.mgmt.monitor.v2022_06_01.models.ErrorDetail """ super().__init__(**kwargs) self.error = error @@ -3453,7 +3406,7 @@ class ExtensionDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownExtensionDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownExtensionDataSourceStreams] :ivar extension_name: The name of the VM extension. Required. :vartype extension_name: str :ivar extension_settings: The extension settings. The format is specific for particular @@ -3494,7 +3447,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownExtensionDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownExtensionDataSourceStreams] :keyword extension_name: The name of the VM extension. Required. :paramtype extension_name: str :keyword extension_settings: The extension settings. The format is specific for particular @@ -3638,7 +3591,7 @@ class LocationSpec(_serialization.Model): :ivar provisioning_status: The resource provisioning state in this location. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :vartype provisioning_status: str or - ~$(python-base-namespace).v2022_06_01.models.KnownLocationSpecProvisioningStatus + ~azure.mgmt.monitor.v2022_06_01.models.KnownLocationSpecProvisioningStatus """ _attribute_map = { @@ -3659,7 +3612,7 @@ def __init__( :keyword provisioning_status: The resource provisioning state in this location. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", and "Failed". :paramtype provisioning_status: str or - ~$(python-base-namespace).v2022_06_01.models.KnownLocationSpecProvisioningStatus + ~azure.mgmt.monitor.v2022_06_01.models.KnownLocationSpecProvisioningStatus """ super().__init__(**kwargs) self.location = location @@ -3719,10 +3672,9 @@ class LogFilesDataSource(_serialization.Model): :ivar file_patterns: File Patterns where the log files are located. Required. :vartype file_patterns: list[str] :ivar format: The data format of the log files. Required. "text" - :vartype format: str or - ~$(python-base-namespace).v2022_06_01.models.KnownLogFilesDataSourceFormat + :vartype format: str or ~azure.mgmt.monitor.v2022_06_01.models.KnownLogFilesDataSourceFormat :ivar settings: The log files specific settings. - :vartype settings: ~$(python-base-namespace).v2022_06_01.models.LogFilesDataSourceSettings + :vartype settings: ~azure.mgmt.monitor.v2022_06_01.models.LogFilesDataSourceSettings :ivar name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -3760,10 +3712,9 @@ def __init__( :keyword file_patterns: File Patterns where the log files are located. Required. :paramtype file_patterns: list[str] :keyword format: The data format of the log files. Required. "text" - :paramtype format: str or - ~$(python-base-namespace).v2022_06_01.models.KnownLogFilesDataSourceFormat + :paramtype format: str or ~azure.mgmt.monitor.v2022_06_01.models.KnownLogFilesDataSourceFormat :keyword settings: The log files specific settings. - :paramtype settings: ~$(python-base-namespace).v2022_06_01.models.LogFilesDataSourceSettings + :paramtype settings: ~azure.mgmt.monitor.v2022_06_01.models.LogFilesDataSourceSettings :keyword name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -3781,7 +3732,7 @@ class LogFileSettings(_serialization.Model): """Settings for different log file formats. :ivar text: Text settings. - :vartype text: ~$(python-base-namespace).v2022_06_01.models.LogFileSettingsText + :vartype text: ~azure.mgmt.monitor.v2022_06_01.models.LogFileSettingsText """ _attribute_map = { @@ -3791,7 +3742,7 @@ class LogFileSettings(_serialization.Model): def __init__(self, *, text: Optional["_models.LogFileSettingsText"] = None, **kwargs: Any) -> None: """ :keyword text: Text settings. - :paramtype text: ~$(python-base-namespace).v2022_06_01.models.LogFileSettingsText + :paramtype text: ~azure.mgmt.monitor.v2022_06_01.models.LogFileSettingsText """ super().__init__(**kwargs) self.text = text @@ -3801,7 +3752,7 @@ class LogFilesDataSourceSettings(LogFileSettings): """The log files specific settings. :ivar text: Text settings. - :vartype text: ~$(python-base-namespace).v2022_06_01.models.LogFileSettingsText + :vartype text: ~azure.mgmt.monitor.v2022_06_01.models.LogFileSettingsText """ _attribute_map = { @@ -3811,7 +3762,7 @@ class LogFilesDataSourceSettings(LogFileSettings): def __init__(self, *, text: Optional["_models.LogFileSettingsText"] = None, **kwargs: Any) -> None: """ :keyword text: Text settings. - :paramtype text: ~$(python-base-namespace).v2022_06_01.models.LogFileSettingsText + :paramtype text: ~azure.mgmt.monitor.v2022_06_01.models.LogFileSettingsText """ super().__init__(text=text, **kwargs) @@ -3826,7 +3777,7 @@ class LogFileTextSettings(_serialization.Model): HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz", and "yyyy-MM-ddTHH:mm:ssK". :vartype record_start_timestamp_format: str or - ~$(python-base-namespace).v2022_06_01.models.KnownLogFileTextSettingsRecordStartTimestampFormat + ~azure.mgmt.monitor.v2022_06_01.models.KnownLogFileTextSettingsRecordStartTimestampFormat """ _validation = { @@ -3849,7 +3800,7 @@ def __init__( HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz", and "yyyy-MM-ddTHH:mm:ssK". :paramtype record_start_timestamp_format: str or - ~$(python-base-namespace).v2022_06_01.models.KnownLogFileTextSettingsRecordStartTimestampFormat + ~azure.mgmt.monitor.v2022_06_01.models.KnownLogFileTextSettingsRecordStartTimestampFormat """ super().__init__(**kwargs) self.record_start_timestamp_format = record_start_timestamp_format @@ -3865,7 +3816,7 @@ class LogFileSettingsText(LogFileTextSettings): HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz", and "yyyy-MM-ddTHH:mm:ssK". :vartype record_start_timestamp_format: str or - ~$(python-base-namespace).v2022_06_01.models.KnownLogFileTextSettingsRecordStartTimestampFormat + ~azure.mgmt.monitor.v2022_06_01.models.KnownLogFileTextSettingsRecordStartTimestampFormat """ _validation = { @@ -3888,7 +3839,7 @@ def __init__( HH:MM:SS", "yyMMdd HH:mm:ss", "ddMMyy HH:mm:ss", "MMM d hh:mm:ss", "dd/MMM/yyyy:HH:mm:ss zzz", and "yyyy-MM-ddTHH:mm:ssK". :paramtype record_start_timestamp_format: str or - ~$(python-base-namespace).v2022_06_01.models.KnownLogFileTextSettingsRecordStartTimestampFormat + ~azure.mgmt.monitor.v2022_06_01.models.KnownLogFileTextSettingsRecordStartTimestampFormat """ super().__init__(record_start_timestamp_format=record_start_timestamp_format, **kwargs) @@ -3994,36 +3945,34 @@ class NotificationRequestBody(_serialization.Model): # pylint: disable=too-many actualcostbudget, forecastedbudget. Required. :vartype alert_type: str :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2022_06_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2022_06_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2022_06_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2022_06_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2022_06_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2022_06_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2022_06_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.ArmRoleReceiver] :ivar event_hub_receivers: The list of event hub receivers that are part of this action group. - :vartype event_hub_receivers: - list[~$(python-base-namespace).v2022_06_01.models.EventHubReceiver] + :vartype event_hub_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.EventHubReceiver] """ _validation = { @@ -4069,40 +4018,36 @@ def __init__( actualcostbudget, forecastedbudget. Required. :paramtype alert_type: str :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2022_06_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2022_06_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2022_06_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2022_06_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2022_06_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2022_06_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2022_06_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2022_06_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2022_06_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.ArmRoleReceiver] :keyword event_hub_receivers: The list of event hub receivers that are part of this action group. - :paramtype event_hub_receivers: - list[~$(python-base-namespace).v2022_06_01.models.EventHubReceiver] + :paramtype event_hub_receivers: list[~azure.mgmt.monitor.v2022_06_01.models.EventHubReceiver] """ super().__init__(**kwargs) self.alert_type = alert_type @@ -4128,7 +4073,7 @@ class PerfCounterDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownPerfCounterDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownPerfCounterDataSourceStreams] :ivar sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). :vartype sampling_frequency_in_seconds: int @@ -4164,7 +4109,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownPerfCounterDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownPerfCounterDataSourceStreams] :keyword sampling_frequency_in_seconds: The number of seconds between consecutive counter measurements (samples). :paramtype sampling_frequency_in_seconds: int @@ -4256,7 +4201,7 @@ class PrometheusForwarderDataSource(_serialization.Model): :ivar streams: List of streams that this data source will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownPrometheusForwarderDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownPrometheusForwarderDataSourceStreams] :ivar label_include_filter: The list of label inclusion filters in the form of label "name-value" pairs. Currently only one label is supported: 'microsoft_metrics_include_label'. @@ -4285,7 +4230,7 @@ def __init__( """ :keyword streams: List of streams that this data source will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownPrometheusForwarderDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownPrometheusForwarderDataSourceStreams] :keyword label_include_filter: The list of label inclusion filters in the form of label "name-value" pairs. Currently only one label is supported: 'microsoft_metrics_include_label'. @@ -4308,7 +4253,7 @@ class ResourceForUpdate(_serialization.Model): :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar identity: Managed Service Identity. - :vartype identity: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdateIdentity + :vartype identity: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdateIdentity """ _attribute_map = { @@ -4327,7 +4272,7 @@ def __init__( :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword identity: Managed Service Identity. - :paramtype identity: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdateIdentity + :paramtype identity: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdateIdentity """ super().__init__(**kwargs) self.tags = tags @@ -4350,13 +4295,13 @@ class ResourceForUpdateIdentity(ManagedServiceIdentity): :ivar type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". - :vartype type: str or ~$(python-base-namespace).v2022_06_01.models.ManagedServiceIdentityType + :vartype type: str or ~azure.mgmt.monitor.v2022_06_01.models.ManagedServiceIdentityType :ivar user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :vartype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_06_01.models.UserAssignedIdentity] + ~azure.mgmt.monitor.v2022_06_01.models.UserAssignedIdentity] """ _validation = { @@ -4383,13 +4328,13 @@ def __init__( :keyword type: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). Required. Known values are: "None", "SystemAssigned", "UserAssigned", and "SystemAssigned,UserAssigned". - :paramtype type: str or ~$(python-base-namespace).v2022_06_01.models.ManagedServiceIdentityType + :paramtype type: str or ~azure.mgmt.monitor.v2022_06_01.models.ManagedServiceIdentityType :keyword user_assigned_identities: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. :paramtype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_06_01.models.UserAssignedIdentity] + ~azure.mgmt.monitor.v2022_06_01.models.UserAssignedIdentity] """ super().__init__(type=type, user_assigned_identities=user_assigned_identities, **kwargs) @@ -4410,7 +4355,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2022_06_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2022_06_01.models.ReceiverStatus """ _validation = { @@ -4534,7 +4479,7 @@ class StreamDeclaration(_serialization.Model): """Declaration of a custom stream. :ivar columns: List of columns used by data in this stream. - :vartype columns: list[~$(python-base-namespace).v2022_06_01.models.ColumnDefinition] + :vartype columns: list[~azure.mgmt.monitor.v2022_06_01.models.ColumnDefinition] """ _attribute_map = { @@ -4544,7 +4489,7 @@ class StreamDeclaration(_serialization.Model): def __init__(self, *, columns: Optional[List["_models.ColumnDefinition"]] = None, **kwargs: Any) -> None: """ :keyword columns: List of columns used by data in this stream. - :paramtype columns: list[~$(python-base-namespace).v2022_06_01.models.ColumnDefinition] + :paramtype columns: list[~azure.mgmt.monitor.v2022_06_01.models.ColumnDefinition] """ super().__init__(**kwargs) self.columns = columns @@ -4558,13 +4503,13 @@ class SyslogDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownSyslogDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownSyslogDataSourceStreams] :ivar facility_names: The list of facility names. :vartype facility_names: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownSyslogDataSourceFacilityNames] + ~azure.mgmt.monitor.v2022_06_01.models.KnownSyslogDataSourceFacilityNames] :ivar log_levels: The log levels to collect. :vartype log_levels: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownSyslogDataSourceLogLevels] + ~azure.mgmt.monitor.v2022_06_01.models.KnownSyslogDataSourceLogLevels] :ivar name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -4592,13 +4537,13 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownSyslogDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownSyslogDataSourceStreams] :keyword facility_names: The list of facility names. :paramtype facility_names: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownSyslogDataSourceFacilityNames] + ~azure.mgmt.monitor.v2022_06_01.models.KnownSyslogDataSourceFacilityNames] :keyword log_levels: The log levels to collect. :paramtype log_levels: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownSyslogDataSourceLogLevels] + ~azure.mgmt.monitor.v2022_06_01.models.KnownSyslogDataSourceLogLevels] :keyword name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. @@ -4617,7 +4562,7 @@ class TestNotificationDetailsResponse(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar context: The context info. - :vartype context: ~$(python-base-namespace).v2022_06_01.models.Context + :vartype context: ~azure.mgmt.monitor.v2022_06_01.models.Context :ivar state: The overall state. Required. :vartype state: str :ivar completed_time: The completed time. @@ -4625,7 +4570,7 @@ class TestNotificationDetailsResponse(_serialization.Model): :ivar created_time: The created time. :vartype created_time: str :ivar action_details: The list of action detail. - :vartype action_details: list[~$(python-base-namespace).v2022_06_01.models.ActionDetail] + :vartype action_details: list[~azure.mgmt.monitor.v2022_06_01.models.ActionDetail] """ _validation = { @@ -4652,7 +4597,7 @@ def __init__( ) -> None: """ :keyword context: The context info. - :paramtype context: ~$(python-base-namespace).v2022_06_01.models.Context + :paramtype context: ~azure.mgmt.monitor.v2022_06_01.models.Context :keyword state: The overall state. Required. :paramtype state: str :keyword completed_time: The completed time. @@ -4660,7 +4605,7 @@ def __init__( :keyword created_time: The created time. :paramtype created_time: str :keyword action_details: The list of action detail. - :paramtype action_details: list[~$(python-base-namespace).v2022_06_01.models.ActionDetail] + :paramtype action_details: list[~azure.mgmt.monitor.v2022_06_01.models.ActionDetail] """ super().__init__(**kwargs) self.context = context @@ -4824,7 +4769,7 @@ class WindowsEventLogDataSource(_serialization.Model): A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :vartype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownWindowsEventLogDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownWindowsEventLogDataSourceStreams] :ivar x_path_queries: A list of Windows Event Log queries in XPATH format. :vartype x_path_queries: list[str] :ivar name: A friendly name for the data source. @@ -4852,7 +4797,7 @@ def __init__( A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. :paramtype streams: list[str or - ~$(python-base-namespace).v2022_06_01.models.KnownWindowsEventLogDataSourceStreams] + ~azure.mgmt.monitor.v2022_06_01.models.KnownWindowsEventLogDataSourceStreams] :keyword x_path_queries: A list of Windows Event Log queries in XPATH format. :paramtype x_path_queries: list[str] :keyword name: A friendly name for the data source. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_action_groups_operations.py index f1f270f607d2..f9f641901280 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,7 +113,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,7 +146,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -185,7 +180,7 @@ def build_post_test_notifications_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -210,13 +205,13 @@ def build_post_test_notifications_request(subscription_id: str, **kwargs: Any) - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_notifications_at_resource_group_level_request( +def build_create_notifications_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -245,13 +240,13 @@ def build_create_notifications_at_resource_group_level_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_notifications_at_action_group_resource_level_request( +def build_create_notifications_at_action_group_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, action_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -285,7 +280,7 @@ def build_get_test_notifications_request(notification_id: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -309,13 +304,13 @@ def build_get_test_notifications_request(notification_id: str, subscription_id: return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_test_notifications_at_resource_group_level_request( +def build_get_test_notifications_at_resource_group_level_request( # pylint: disable=name-too-long resource_group_name: str, notification_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -342,13 +337,13 @@ def build_get_test_notifications_at_resource_group_level_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_test_notifications_at_action_group_resource_level_request( +def build_get_test_notifications_at_action_group_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, action_group_name: str, notification_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -380,7 +375,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -404,7 +399,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -436,7 +431,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -472,7 +467,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_06_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_06_01.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -503,13 +498,13 @@ def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -537,7 +532,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -558,13 +553,13 @@ def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -578,7 +573,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -643,7 +638,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -657,7 +652,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -722,7 +717,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -774,13 +769,13 @@ def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2022_06_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -808,7 +803,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -829,14 +824,13 @@ def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2022_06_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -850,7 +844,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -914,7 +908,7 @@ def _post_test_notifications_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -980,8 +974,7 @@ def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -996,7 +989,7 @@ def begin_post_test_notifications( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -1023,7 +1016,7 @@ def begin_post_test_notifications( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @@ -1035,8 +1028,8 @@ def begin_post_test_notifications( :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1051,13 +1044,13 @@ def begin_post_test_notifications( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1102,7 +1095,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications" } - def _create_notifications_at_resource_group_level_initial( + def _create_notifications_at_resource_group_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> Optional[_models.TestNotificationDetailsResponse]: error_map = { @@ -1116,7 +1109,7 @@ def _create_notifications_at_resource_group_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1172,7 +1165,7 @@ def _create_notifications_at_resource_group_level_initial( } @overload - def begin_create_notifications_at_resource_group_level( + def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: _models.NotificationRequestBody, @@ -1187,8 +1180,7 @@ def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1203,12 +1195,12 @@ def begin_create_notifications_at_resource_group_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_notifications_at_resource_group_level( + def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: IO, @@ -1238,12 +1230,12 @@ def begin_create_notifications_at_resource_group_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create_notifications_at_resource_group_level( + def begin_create_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_request: Union[_models.NotificationRequestBody, IO], **kwargs: Any ) -> LROPoller[_models.TestNotificationDetailsResponse]: """Send test notifications to a set of provided receivers. @@ -1253,8 +1245,8 @@ def begin_create_notifications_at_resource_group_level( :type resource_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1269,13 +1261,13 @@ def begin_create_notifications_at_resource_group_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1321,7 +1313,7 @@ def get_long_running_output(pipeline_response): "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/createNotifications" } - def _create_notifications_at_action_group_resource_level_initial( + def _create_notifications_at_action_group_resource_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1339,7 +1331,7 @@ def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -1396,7 +1388,7 @@ def _create_notifications_at_action_group_resource_level_initial( } @overload - def begin_create_notifications_at_action_group_resource_level( + def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1414,8 +1406,7 @@ def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1430,12 +1421,12 @@ def begin_create_notifications_at_action_group_resource_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_notifications_at_action_group_resource_level( + def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1468,12 +1459,12 @@ def begin_create_notifications_at_action_group_resource_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create_notifications_at_action_group_resource_level( + def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -1489,8 +1480,8 @@ def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2022_06_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2022_06_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1505,13 +1496,13 @@ def begin_create_notifications_at_action_group_resource_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1566,7 +1557,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1580,7 +1571,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_request( @@ -1618,7 +1609,7 @@ def get_test_notifications(self, notification_id: str, **kwargs: Any) -> _models } @distributed_trace - def get_test_notifications_at_resource_group_level( + def get_test_notifications_at_resource_group_level( # pylint: disable=name-too-long self, resource_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1630,7 +1621,7 @@ def get_test_notifications_at_resource_group_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1644,7 +1635,7 @@ def get_test_notifications_at_resource_group_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_resource_group_level_request( @@ -1683,7 +1674,7 @@ def get_test_notifications_at_resource_group_level( } @distributed_trace - def get_test_notifications_at_action_group_resource_level( + def get_test_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1697,7 +1688,7 @@ def get_test_notifications_at_action_group_resource_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1711,7 +1702,7 @@ def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1757,13 +1748,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_06_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1846,13 +1837,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_06_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_06_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1943,7 +1934,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2022_06_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2022_06_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -2000,7 +1991,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2022_06_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2022_06_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -2020,7 +2011,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_endpoints_operations.py index 2ef9621ec668..8eeb833bdda9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_endpoints_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_endpoints_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -138,7 +133,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,7 +171,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -214,7 +209,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -249,7 +244,7 @@ class DataCollectionEndpointsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_06_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_06_01.MonitorManagementClient`'s :attr:`data_collection_endpoints` attribute. """ @@ -277,13 +272,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -365,13 +360,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio :return: An iterator like instance of either DataCollectionEndpointResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -458,7 +453,7 @@ def get( :type data_collection_endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -472,7 +467,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) request = build_get_request( @@ -531,13 +526,13 @@ def create( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :type body: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -568,7 +563,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -592,13 +587,13 @@ def create( :type data_collection_endpoint_name: str :param body: The payload. Is either a DataCollectionEndpointResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource or IO + :type body: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -612,7 +607,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -690,13 +685,13 @@ def update( case insensitive. Required. :type data_collection_endpoint_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -727,7 +722,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -751,13 +746,13 @@ def update( :type data_collection_endpoint_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionEndpointResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionEndpointResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionEndpointResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -771,7 +766,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionEndpointResource] = kwargs.pop("cls", None) @@ -854,7 +849,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rule_associations_operations.py index 4704ae627737..1a5da1e93321 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rule_associations_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_request(resource_uri: str, **kwargs: Any) -> HttpRequ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,7 +66,7 @@ def build_list_by_rule_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -98,13 +93,13 @@ def build_list_by_rule_request( return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs) -def build_list_by_data_collection_endpoint_request( +def build_list_by_data_collection_endpoint_request( # pylint: disable=name-too-long resource_group_name: str, data_collection_endpoint_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -137,7 +132,7 @@ def build_get_request(resource_uri: str, association_name: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -164,7 +159,7 @@ def build_create_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -194,7 +189,7 @@ def build_delete_request(resource_uri: str, association_name: str, **kwargs: Any _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -223,7 +218,7 @@ class DataCollectionRuleAssociationsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_06_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_06_01.MonitorManagementClient`'s :attr:`data_collection_rule_associations` attribute. """ @@ -250,13 +245,13 @@ def list_by_resource( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -345,13 +340,13 @@ def list_by_rule( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -444,13 +439,13 @@ def list_by_data_collection_endpoint( :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -539,8 +534,7 @@ def get( :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -554,7 +548,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) request = build_get_request( @@ -611,14 +605,13 @@ def create( :type association_name: str :param body: The payload. Default value is None. :type body: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -647,8 +640,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -671,15 +663,13 @@ def create( :param body: The payload. Is either a DataCollectionRuleAssociationProxyOnlyResource type or a IO type. Default value is None. :type body: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource or - IO + ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource or the result of cls(response) - :rtype: - ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleAssociationProxyOnlyResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -693,7 +683,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleAssociationProxyOnlyResource] = kwargs.pop("cls", None) @@ -777,7 +767,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rules_operations.py index 8d547efd9585..178b4924c8f0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_06_01/operations/_data_collection_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -75,7 +70,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -103,7 +98,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -136,7 +131,7 @@ def build_create_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -172,7 +167,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -208,7 +203,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -241,7 +236,7 @@ class DataCollectionRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_06_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_06_01.MonitorManagementClient`'s :attr:`data_collection_rules` attribute. """ @@ -269,13 +264,13 @@ def list_by_resource_group( :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -357,13 +352,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.DataCollectio :return: An iterator like instance of either DataCollectionRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResourceListResult] = kwargs.pop("cls", None) error_map = { @@ -450,7 +445,7 @@ def get( :type data_collection_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -464,7 +459,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -523,13 +518,13 @@ def create( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :type body: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -560,7 +555,7 @@ def create( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -584,13 +579,13 @@ def create( :type data_collection_rule_name: str :param body: The payload. Is either a DataCollectionRuleResource type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource or IO + :type body: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -604,7 +599,7 @@ def create( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -682,13 +677,13 @@ def update( insensitive. Required. :type data_collection_rule_name: str :param body: The payload. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdate + :type body: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdate :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -719,7 +714,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -743,13 +738,13 @@ def update( :type data_collection_rule_name: str :param body: The payload. Is either a ResourceForUpdate type or a IO type. Default value is None. - :type body: ~$(python-base-namespace).v2022_06_01.models.ResourceForUpdate or IO + :type body: ~azure.mgmt.monitor.v2022_06_01.models.ResourceForUpdate or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_06_01.models.DataCollectionRuleResource + :rtype: ~azure.mgmt.monitor.v2022_06_01.models.DataCollectionRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -763,7 +758,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.DataCollectionRuleResource] = kwargs.pop("cls", None) @@ -846,7 +841,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-06-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-06-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_configuration.py index 24f1af84e5d2..d1bf2062b24c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-08-01-preview"] = kwargs.pop("api_version", "2022-08-01-preview") + api_version: str = kwargs.pop("api_version", "2022-08-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_monitor_management_client.py index ca27096a042e..8d9eabf0b3ee 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_monitor_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations :vartype scheduled_query_rules: - $(python-base-namespace).v2022_08_01_preview.operations.ScheduledQueryRulesOperations + azure.mgmt.monitor.v2022_08_01_preview.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_configuration.py index 93de7bfe09ae..3a679591e323 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-08-01-preview"] = kwargs.pop("api_version", "2022-08-01-preview") + api_version: str = kwargs.pop("api_version", "2022-08-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_monitor_management_client.py index c97ebb337071..927cae76b99e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/_monitor_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar scheduled_query_rules: ScheduledQueryRulesOperations operations :vartype scheduled_query_rules: - $(python-base-namespace).v2022_08_01_preview.aio.operations.ScheduledQueryRulesOperations + azure.mgmt.monitor.v2022_08_01_preview.aio.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/operations/_scheduled_query_rules_operations.py index 183af9048f1e..3118e7bc5af8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/aio/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class ScheduledQueryRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_08_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_08_01_preview.aio.MonitorManagementClient`'s :attr:`scheduled_query_rules` attribute. """ @@ -73,15 +68,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Schedule :return: An iterator like instance of either ScheduledQueryRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -165,15 +158,13 @@ def list_by_resource_group( :return: An iterator like instance of either ScheduledQueryRuleResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -256,7 +247,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -270,9 +261,7 @@ async def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -328,14 +317,13 @@ async def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :type parameters: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -363,7 +351,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -384,14 +372,14 @@ async def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a ScheduledQueryRuleResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -405,9 +393,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -480,13 +466,13 @@ async def update( :type rule_name: str :param parameters: The parameters of the rule to update. Required. :type parameters: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResourcePatch + ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -514,7 +500,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -536,13 +522,13 @@ async def update( :param parameters: The parameters of the rule to update. Is either a ScheduledQueryRuleResourcePatch type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResourcePatch or IO + ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -556,9 +542,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -635,9 +619,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/models/_models_py3.py index 92bbed4fb0d7..8d9bb334bf54 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/models/_models_py3.py @@ -57,7 +57,7 @@ class Condition(_serialization.Model): :ivar time_aggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. Known values are: "Count", "Average", "Minimum", "Maximum", and "Total". :vartype time_aggregation: str or - ~$(python-base-namespace).v2022_08_01_preview.models.TimeAggregation + ~azure.mgmt.monitor.v2022_08_01_preview.models.TimeAggregation :ivar metric_measure_column: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. :vartype metric_measure_column: str @@ -65,19 +65,18 @@ class Condition(_serialization.Model): be a uri formatted as resource id. Relevant only for rules of the kind LogAlert. :vartype resource_id_column: str :ivar dimensions: List of Dimensions conditions. - :vartype dimensions: list[~$(python-base-namespace).v2022_08_01_preview.models.Dimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2022_08_01_preview.models.Dimension] :ivar operator: The criteria operator. Relevant and required only for rules of the kind LogAlert. Known values are: "Equals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or - ~$(python-base-namespace).v2022_08_01_preview.models.ConditionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.ConditionOperator :ivar threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert. :vartype threshold: float :ivar failing_periods: The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert. :vartype failing_periods: - ~$(python-base-namespace).v2022_08_01_preview.models.ConditionFailingPeriods + ~azure.mgmt.monitor.v2022_08_01_preview.models.ConditionFailingPeriods :ivar metric_name: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric. :vartype metric_name: str @@ -115,7 +114,7 @@ def __init__( :keyword time_aggregation: Aggregation type. Relevant and required only for rules of the kind LogAlert. Known values are: "Count", "Average", "Minimum", "Maximum", and "Total". :paramtype time_aggregation: str or - ~$(python-base-namespace).v2022_08_01_preview.models.TimeAggregation + ~azure.mgmt.monitor.v2022_08_01_preview.models.TimeAggregation :keyword metric_measure_column: The column containing the metric measure number. Relevant only for rules of the kind LogAlert. :paramtype metric_measure_column: str @@ -123,19 +122,18 @@ def __init__( must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert. :paramtype resource_id_column: str :keyword dimensions: List of Dimensions conditions. - :paramtype dimensions: list[~$(python-base-namespace).v2022_08_01_preview.models.Dimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2022_08_01_preview.models.Dimension] :keyword operator: The criteria operator. Relevant and required only for rules of the kind LogAlert. Known values are: "Equals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or - ~$(python-base-namespace).v2022_08_01_preview.models.ConditionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.ConditionOperator :keyword threshold: the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert. :paramtype threshold: float :keyword failing_periods: The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert. :paramtype failing_periods: - ~$(python-base-namespace).v2022_08_01_preview.models.ConditionFailingPeriods + ~azure.mgmt.monitor.v2022_08_01_preview.models.ConditionFailingPeriods :keyword metric_name: The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric. :paramtype metric_name: str @@ -196,8 +194,7 @@ class Dimension(_serialization.Model): :vartype name: str :ivar operator: Operator for dimension values. Required. Known values are: "Include" and "Exclude". - :vartype operator: str or - ~$(python-base-namespace).v2022_08_01_preview.models.DimensionOperator + :vartype operator: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.DimensionOperator :ivar values: List of dimension values. Required. :vartype values: list[str] """ @@ -222,8 +219,7 @@ def __init__( :paramtype name: str :keyword operator: Operator for dimension values. Required. Known values are: "Include" and "Exclude". - :paramtype operator: str or - ~$(python-base-namespace).v2022_08_01_preview.models.DimensionOperator + :paramtype operator: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.DimensionOperator :keyword values: List of dimension values. Required. :paramtype values: list[str] """ @@ -237,7 +233,7 @@ class ErrorContract(_serialization.Model): """Describes the format of Error response. :ivar error: The error details. - :vartype error: ~$(python-base-namespace).v2022_08_01_preview.models.ErrorResponseDetails + :vartype error: ~azure.mgmt.monitor.v2022_08_01_preview.models.ErrorResponseDetails """ _attribute_map = { @@ -247,7 +243,7 @@ class ErrorContract(_serialization.Model): def __init__(self, *, error: Optional["_models.ErrorResponseDetails"] = None, **kwargs: Any) -> None: """ :keyword error: The error details. - :paramtype error: ~$(python-base-namespace).v2022_08_01_preview.models.ErrorResponseDetails + :paramtype error: ~azure.mgmt.monitor.v2022_08_01_preview.models.ErrorResponseDetails """ super().__init__(**kwargs) self.error = error @@ -294,11 +290,10 @@ class ErrorResponseDetails(_serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: - list[~$(python-base-namespace).v2022_08_01_preview.models.ErrorResponseDetails] + :vartype details: list[~azure.mgmt.monitor.v2022_08_01_preview.models.ErrorResponseDetails] :ivar additional_info: The error additional info. :vartype additional_info: - list[~$(python-base-namespace).v2022_08_01_preview.models.ErrorResponseAdditionalInfo] + list[~azure.mgmt.monitor.v2022_08_01_preview.models.ErrorResponseAdditionalInfo] """ _validation = { @@ -340,12 +335,12 @@ class Identity(_serialization.Model): :vartype tenant_id: str :ivar type: Type of managed service identity. Required. Known values are: "SystemAssigned", "UserAssigned", and "None". - :vartype type: str or ~$(python-base-namespace).v2022_08_01_preview.models.IdentityType + :vartype type: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.IdentityType :ivar user_assigned_identities: The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :vartype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_08_01_preview.models.UserIdentityProperties] + ~azure.mgmt.monitor.v2022_08_01_preview.models.UserIdentityProperties] """ _validation = { @@ -371,12 +366,12 @@ def __init__( """ :keyword type: Type of managed service identity. Required. Known values are: "SystemAssigned", "UserAssigned", and "None". - :paramtype type: str or ~$(python-base-namespace).v2022_08_01_preview.models.IdentityType + :paramtype type: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.IdentityType :keyword user_assigned_identities: The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. :paramtype user_assigned_identities: dict[str, - ~$(python-base-namespace).v2022_08_01_preview.models.UserIdentityProperties] + ~azure.mgmt.monitor.v2022_08_01_preview.models.UserIdentityProperties] """ super().__init__(**kwargs) self.principal_id = None @@ -423,7 +418,7 @@ class ScheduledQueryRuleCriteria(_serialization.Model): """The rule criteria that defines the conditions of the scheduled query rule. :ivar all_of: A list of conditions to evaluate against the specified scopes. - :vartype all_of: list[~$(python-base-namespace).v2022_08_01_preview.models.Condition] + :vartype all_of: list[~azure.mgmt.monitor.v2022_08_01_preview.models.Condition] """ _attribute_map = { @@ -433,7 +428,7 @@ class ScheduledQueryRuleCriteria(_serialization.Model): def __init__(self, *, all_of: Optional[List["_models.Condition"]] = None, **kwargs: Any) -> None: """ :keyword all_of: A list of conditions to evaluate against the specified scopes. - :paramtype all_of: list[~$(python-base-namespace).v2022_08_01_preview.models.Condition] + :paramtype all_of: list[~azure.mgmt.monitor.v2022_08_01_preview.models.Condition] """ super().__init__(**kwargs) self.all_of = all_of @@ -455,14 +450,14 @@ class ScheduledQueryRuleResource(_serialization.Model): # pylint: disable=too-m "Microsoft.Storage/storageAccounts". :vartype type: str :ivar identity: The identity of the resource. - :vartype identity: ~$(python-base-namespace).v2022_08_01_preview.models.Identity + :vartype identity: ~azure.mgmt.monitor.v2022_08_01_preview.models.Identity :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar location: The geo-location where the resource lives. Required. :vartype location: str :ivar kind: Indicates the type of scheduled query rule. The default is LogAlert. Known values are: "LogAlert" and "LogToMetric". - :vartype kind: str or ~$(python-base-namespace).v2022_08_01_preview.models.Kind + :vartype kind: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.Kind :ivar etag: The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in @@ -470,7 +465,7 @@ class ScheduledQueryRuleResource(_serialization.Model): # pylint: disable=too-m (section 14.27) header fields. :vartype etag: str :ivar system_data: SystemData of ScheduledQueryRule. - :vartype system_data: ~$(python-base-namespace).v2022_08_01_preview.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2022_08_01_preview.models.SystemData :ivar created_with_api_version: The api-version used when creating this alert rule. :vartype created_with_api_version: str :ivar is_legacy_log_analytics_rule: True if alert rule is legacy Log Analytic rule. @@ -482,14 +477,14 @@ class ScheduledQueryRuleResource(_serialization.Model): # pylint: disable=too-m :ivar severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert. Known values are: 0, 1, 2, 3, and 4. - :vartype severity: int or ~$(python-base-namespace).v2022_08_01_preview.models.AlertSeverity + :vartype severity: int or ~azure.mgmt.monitor.v2022_08_01_preview.models.AlertSeverity :ivar enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false. :vartype enabled: bool :ivar public_network_access: This determines if traffic is allowed over public network. By default it is enabled. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or - ~$(python-base-namespace).v2022_08_01_preview.models.PublicNetworkAccess + ~azure.mgmt.monitor.v2022_08_01_preview.models.PublicNetworkAccess :ivar scopes: The list of resource id's that this scheduled query rule is scoped to. :vartype scopes: list[str] :ivar evaluation_frequency: How often the scheduled query rule is evaluated represented in ISO @@ -508,13 +503,12 @@ class ScheduledQueryRuleResource(_serialization.Model): # pylint: disable=too-m kind LogAlert. :vartype target_resource_types: list[str] :ivar criteria: The rule criteria that defines the conditions of the scheduled query rule. - :vartype criteria: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleCriteria + :vartype criteria: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleCriteria :ivar mute_actions_duration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert. :vartype mute_actions_duration: ~datetime.timedelta :ivar actions: Actions to invoke when the alert fires. - :vartype actions: ~$(python-base-namespace).v2022_08_01_preview.models.Actions + :vartype actions: ~azure.mgmt.monitor.v2022_08_01_preview.models.Actions :ivar is_workspace_alerts_storage_configured: The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false. :vartype is_workspace_alerts_storage_configured: bool @@ -531,7 +525,7 @@ class ScheduledQueryRuleResource(_serialization.Model): # pylint: disable=too-m :ivar rule_resolve_configuration: Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. :vartype rule_resolve_configuration: - ~$(python-base-namespace).v2022_08_01_preview.models.RuleResolveConfiguration + ~azure.mgmt.monitor.v2022_08_01_preview.models.RuleResolveConfiguration """ _validation = { @@ -615,14 +609,14 @@ def __init__( # pylint: disable=too-many-locals ) -> None: """ :keyword identity: The identity of the resource. - :paramtype identity: ~$(python-base-namespace).v2022_08_01_preview.models.Identity + :paramtype identity: ~azure.mgmt.monitor.v2022_08_01_preview.models.Identity :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword location: The geo-location where the resource lives. Required. :paramtype location: str :keyword kind: Indicates the type of scheduled query rule. The default is LogAlert. Known values are: "LogAlert" and "LogToMetric". - :paramtype kind: str or ~$(python-base-namespace).v2022_08_01_preview.models.Kind + :paramtype kind: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.Kind :keyword description: The description of the scheduled query rule. :paramtype description: str :keyword display_name: The display name of the alert rule. @@ -630,14 +624,14 @@ def __init__( # pylint: disable=too-many-locals :keyword severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert. Known values are: 0, 1, 2, 3, and 4. - :paramtype severity: int or ~$(python-base-namespace).v2022_08_01_preview.models.AlertSeverity + :paramtype severity: int or ~azure.mgmt.monitor.v2022_08_01_preview.models.AlertSeverity :keyword enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false. :paramtype enabled: bool :keyword public_network_access: This determines if traffic is allowed over public network. By default it is enabled. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or - ~$(python-base-namespace).v2022_08_01_preview.models.PublicNetworkAccess + ~azure.mgmt.monitor.v2022_08_01_preview.models.PublicNetworkAccess :keyword scopes: The list of resource id's that this scheduled query rule is scoped to. :paramtype scopes: list[str] :keyword evaluation_frequency: How often the scheduled query rule is evaluated represented in @@ -656,13 +650,12 @@ def __init__( # pylint: disable=too-many-locals kind LogAlert. :paramtype target_resource_types: list[str] :keyword criteria: The rule criteria that defines the conditions of the scheduled query rule. - :paramtype criteria: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleCriteria + :paramtype criteria: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleCriteria :keyword mute_actions_duration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert. :paramtype mute_actions_duration: ~datetime.timedelta :keyword actions: Actions to invoke when the alert fires. - :paramtype actions: ~$(python-base-namespace).v2022_08_01_preview.models.Actions + :paramtype actions: ~azure.mgmt.monitor.v2022_08_01_preview.models.Actions :keyword check_workspace_alerts_storage_configured: The flag which indicates whether this scheduled query rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind LogAlert. @@ -676,7 +669,7 @@ def __init__( # pylint: disable=too-many-locals :keyword rule_resolve_configuration: Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. :paramtype rule_resolve_configuration: - ~$(python-base-namespace).v2022_08_01_preview.models.RuleResolveConfiguration + ~azure.mgmt.monitor.v2022_08_01_preview.models.RuleResolveConfiguration """ super().__init__(**kwargs) self.id = None @@ -716,8 +709,7 @@ class ScheduledQueryRuleResourceCollection(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar value: The values for the scheduled query rule resources. - :vartype value: - list[~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource] + :vartype value: list[~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -735,7 +727,7 @@ def __init__(self, *, value: Optional[List["_models.ScheduledQueryRuleResource"] """ :keyword value: The values for the scheduled query rule resources. :paramtype value: - list[~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource] + list[~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource] """ super().__init__(**kwargs) self.value = value @@ -748,7 +740,7 @@ class ScheduledQueryRuleResourcePatch(_serialization.Model): # pylint: disable= Variables are only populated by the server, and will be ignored when sending a request. :ivar identity: The identity of the resource. - :vartype identity: ~$(python-base-namespace).v2022_08_01_preview.models.Identity + :vartype identity: ~azure.mgmt.monitor.v2022_08_01_preview.models.Identity :ivar tags: Resource tags. :vartype tags: dict[str, str] :ivar created_with_api_version: The api-version used when creating this alert rule. @@ -762,14 +754,14 @@ class ScheduledQueryRuleResourcePatch(_serialization.Model): # pylint: disable= :ivar severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert. Known values are: 0, 1, 2, 3, and 4. - :vartype severity: int or ~$(python-base-namespace).v2022_08_01_preview.models.AlertSeverity + :vartype severity: int or ~azure.mgmt.monitor.v2022_08_01_preview.models.AlertSeverity :ivar enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false. :vartype enabled: bool :ivar public_network_access: This determines if traffic is allowed over public network. By default it is enabled. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :vartype public_network_access: str or - ~$(python-base-namespace).v2022_08_01_preview.models.PublicNetworkAccess + ~azure.mgmt.monitor.v2022_08_01_preview.models.PublicNetworkAccess :ivar scopes: The list of resource id's that this scheduled query rule is scoped to. :vartype scopes: list[str] :ivar evaluation_frequency: How often the scheduled query rule is evaluated represented in ISO @@ -788,13 +780,12 @@ class ScheduledQueryRuleResourcePatch(_serialization.Model): # pylint: disable= kind LogAlert. :vartype target_resource_types: list[str] :ivar criteria: The rule criteria that defines the conditions of the scheduled query rule. - :vartype criteria: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleCriteria + :vartype criteria: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleCriteria :ivar mute_actions_duration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert. :vartype mute_actions_duration: ~datetime.timedelta :ivar actions: Actions to invoke when the alert fires. - :vartype actions: ~$(python-base-namespace).v2022_08_01_preview.models.Actions + :vartype actions: ~azure.mgmt.monitor.v2022_08_01_preview.models.Actions :ivar is_workspace_alerts_storage_configured: The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false. :vartype is_workspace_alerts_storage_configured: bool @@ -811,7 +802,7 @@ class ScheduledQueryRuleResourcePatch(_serialization.Model): # pylint: disable= :ivar rule_resolve_configuration: Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. :vartype rule_resolve_configuration: - ~$(python-base-namespace).v2022_08_01_preview.models.RuleResolveConfiguration + ~azure.mgmt.monitor.v2022_08_01_preview.models.RuleResolveConfiguration """ _validation = { @@ -880,7 +871,7 @@ def __init__( ) -> None: """ :keyword identity: The identity of the resource. - :paramtype identity: ~$(python-base-namespace).v2022_08_01_preview.models.Identity + :paramtype identity: ~azure.mgmt.monitor.v2022_08_01_preview.models.Identity :keyword tags: Resource tags. :paramtype tags: dict[str, str] :keyword description: The description of the scheduled query rule. @@ -890,14 +881,14 @@ def __init__( :keyword severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert. Known values are: 0, 1, 2, 3, and 4. - :paramtype severity: int or ~$(python-base-namespace).v2022_08_01_preview.models.AlertSeverity + :paramtype severity: int or ~azure.mgmt.monitor.v2022_08_01_preview.models.AlertSeverity :keyword enabled: The flag which indicates whether this scheduled query rule is enabled. Value should be true or false. :paramtype enabled: bool :keyword public_network_access: This determines if traffic is allowed over public network. By default it is enabled. Known values are: "Enabled", "Disabled", and "SecuredByPerimeter". :paramtype public_network_access: str or - ~$(python-base-namespace).v2022_08_01_preview.models.PublicNetworkAccess + ~azure.mgmt.monitor.v2022_08_01_preview.models.PublicNetworkAccess :keyword scopes: The list of resource id's that this scheduled query rule is scoped to. :paramtype scopes: list[str] :keyword evaluation_frequency: How often the scheduled query rule is evaluated represented in @@ -916,13 +907,12 @@ def __init__( kind LogAlert. :paramtype target_resource_types: list[str] :keyword criteria: The rule criteria that defines the conditions of the scheduled query rule. - :paramtype criteria: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleCriteria + :paramtype criteria: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleCriteria :keyword mute_actions_duration: Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert. :paramtype mute_actions_duration: ~datetime.timedelta :keyword actions: Actions to invoke when the alert fires. - :paramtype actions: ~$(python-base-namespace).v2022_08_01_preview.models.Actions + :paramtype actions: ~azure.mgmt.monitor.v2022_08_01_preview.models.Actions :keyword check_workspace_alerts_storage_configured: The flag which indicates whether this scheduled query rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind LogAlert. @@ -936,7 +926,7 @@ def __init__( :keyword rule_resolve_configuration: Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert. :paramtype rule_resolve_configuration: - ~$(python-base-namespace).v2022_08_01_preview.models.RuleResolveConfiguration + ~azure.mgmt.monitor.v2022_08_01_preview.models.RuleResolveConfiguration """ super().__init__(**kwargs) self.identity = identity @@ -970,8 +960,7 @@ class SystemData(_serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or - ~$(python-base-namespace).v2022_08_01_preview.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. @@ -979,7 +968,7 @@ class SystemData(_serialization.Model): :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_08_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_08_01_preview.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -1009,8 +998,7 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or - ~$(python-base-namespace).v2022_08_01_preview.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_08_01_preview.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. @@ -1018,7 +1006,7 @@ def __init__( :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_08_01_preview.models.CreatedByType + ~azure.mgmt.monitor.v2022_08_01_preview.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/operations/_scheduled_query_rules_operations.py index e0237a7d7532..0cd8c1d54760 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_08_01_preview/operations/_scheduled_query_rules_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,9 +40,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,9 +66,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -105,9 +96,7 @@ def build_get_request(resource_group_name: str, rule_name: str, subscription_id: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -140,9 +129,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -176,9 +163,7 @@ def build_update_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -212,9 +197,7 @@ def build_delete_request(resource_group_name: str, rule_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -247,7 +230,7 @@ class ScheduledQueryRulesOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_08_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_08_01_preview.MonitorManagementClient`'s :attr:`scheduled_query_rules` attribute. """ @@ -268,15 +251,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.ScheduledQuer :return: An iterator like instance of either ScheduledQueryRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -360,15 +341,13 @@ def list_by_resource_group( :return: An iterator like instance of either ScheduledQueryRuleResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -451,7 +430,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -465,9 +444,7 @@ def get(self, resource_group_name: str, rule_name: str, **kwargs: Any) -> _model _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) request = build_get_request( @@ -523,14 +500,13 @@ def create_or_update( :param rule_name: The name of the rule. Required. :type rule_name: str :param parameters: The parameters of the rule to create or update. Required. - :type parameters: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :type parameters: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -558,7 +534,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -579,14 +555,14 @@ def create_or_update( :type rule_name: str :param parameters: The parameters of the rule to create or update. Is either a ScheduledQueryRuleResource type or a IO type. Required. - :type parameters: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource or IO + :type parameters: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -600,9 +576,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -675,13 +649,13 @@ def update( :type rule_name: str :param parameters: The parameters of the rule to update. Required. :type parameters: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResourcePatch + ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -709,7 +683,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -731,13 +705,13 @@ def update( :param parameters: The parameters of the rule to update. Is either a ScheduledQueryRuleResourcePatch type or a IO type. Required. :type parameters: - ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResourcePatch or IO + ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ScheduledQueryRuleResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_08_01_preview.models.ScheduledQueryRuleResource + :rtype: ~azure.mgmt.monitor.v2022_08_01_preview.models.ScheduledQueryRuleResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -751,9 +725,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ScheduledQueryRuleResource] = kwargs.pop("cls", None) @@ -830,9 +802,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-08-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2022-08-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-08-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_configuration.py index 5b24348f04f9..a47c12c4834c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01") + api_version: str = kwargs.pop("api_version", "2022-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_monitor_management_client.py index 56afc65deeaf..1bb05affeb7e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_monitor_management_client.py @@ -27,10 +27,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar autoscale_settings: AutoscaleSettingsOperations operations :vartype autoscale_settings: - $(python-base-namespace).v2022_10_01.operations.AutoscaleSettingsOperations + azure.mgmt.monitor.v2022_10_01.operations.AutoscaleSettingsOperations :ivar predictive_metric: PredictiveMetricOperations operations :vartype predictive_metric: - $(python-base-namespace).v2022_10_01.operations.PredictiveMetricOperations + azure.mgmt.monitor.v2022_10_01.operations.PredictiveMetricOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_configuration.py index 8539bfb83e81..a0bd7f0de702 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", "2022-10-01") + api_version: str = kwargs.pop("api_version", "2022-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_monitor_management_client.py index 044b630ae388..5e131d74b38e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/_monitor_management_client.py @@ -27,10 +27,10 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar autoscale_settings: AutoscaleSettingsOperations operations :vartype autoscale_settings: - $(python-base-namespace).v2022_10_01.aio.operations.AutoscaleSettingsOperations + azure.mgmt.monitor.v2022_10_01.aio.operations.AutoscaleSettingsOperations :ivar predictive_metric: PredictiveMetricOperations operations :vartype predictive_metric: - $(python-base-namespace).v2022_10_01.aio.operations.PredictiveMetricOperations + azure.mgmt.monitor.v2022_10_01.aio.operations.PredictiveMetricOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_autoscale_settings_operations.py index 2c93b8ef2012..b6db3e4214dc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -38,10 +37,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -52,7 +47,7 @@ class AutoscaleSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_10_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_10_01.aio.MonitorManagementClient`'s :attr:`autoscale_settings` attribute. """ @@ -78,13 +73,13 @@ def list_by_resource_group( :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -174,13 +169,13 @@ async def create_or_update( :param autoscale_setting_name: The autoscale setting name. Required. :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :type parameters: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -208,7 +203,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -229,13 +224,13 @@ async def create_or_update( :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Is either a AutoscaleSettingResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource or IO + :type parameters: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -249,7 +244,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -330,7 +325,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -377,7 +372,7 @@ async def get( :type autoscale_setting_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -391,7 +386,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -449,13 +444,13 @@ async def update( :type autoscale_setting_name: str :param autoscale_setting_resource: Parameters supplied to the operation. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResourcePatch + ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -484,7 +479,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -507,13 +502,13 @@ async def update( :param autoscale_setting_resource: Parameters supplied to the operation. Is either a AutoscaleSettingResourcePatch type or a IO type. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResourcePatch or IO + ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -527,7 +522,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -585,13 +580,13 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Autoscal :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_predictive_metric_operations.py index b9df0b2711cd..71a0f12ce4c5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_predictive_metric_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/aio/operations/_predictive_metric_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._vendor import _convert_request from ...operations._predictive_metric_operations import build_get_request -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -43,7 +38,7 @@ class PredictiveMetricOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_10_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_10_01.aio.MonitorManagementClient`'s :attr:`predictive_metric` attribute. """ @@ -90,7 +85,7 @@ async def get( :type aggregation: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PredictiveResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.PredictiveResponse + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.PredictiveResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -104,7 +99,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.PredictiveResponse] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/models/_models_py3.py index 4fa4e68006a8..c47a2643e8f0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/models/_models_py3.py @@ -23,9 +23,9 @@ class AutoscaleErrorResponse(_serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. :ivar error: The error object. - :vartype error: ~$(python-base-namespace).v2022_10_01.models.AutoscaleErrorResponseError + :vartype error: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleErrorResponseError :ivar system_data: The system metadata related to the response. - :vartype system_data: ~$(python-base-namespace).v2022_10_01.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2022_10_01.models.SystemData """ _validation = { @@ -40,7 +40,7 @@ class AutoscaleErrorResponse(_serialization.Model): def __init__(self, *, error: Optional["_models.AutoscaleErrorResponseError"] = None, **kwargs: Any) -> None: """ :keyword error: The error object. - :paramtype error: ~$(python-base-namespace).v2022_10_01.models.AutoscaleErrorResponseError + :paramtype error: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleErrorResponseError """ super().__init__(**kwargs) self.error = error @@ -104,9 +104,9 @@ class AutoscaleNotification(_serialization.Model): Required. Default value is "Scale". :vartype operation: str :ivar email: the email notification. - :vartype email: ~$(python-base-namespace).v2022_10_01.models.EmailNotification + :vartype email: ~azure.mgmt.monitor.v2022_10_01.models.EmailNotification :ivar webhooks: the collection of webhook notifications. - :vartype webhooks: list[~$(python-base-namespace).v2022_10_01.models.WebhookNotification] + :vartype webhooks: list[~azure.mgmt.monitor.v2022_10_01.models.WebhookNotification] """ _validation = { @@ -130,9 +130,9 @@ def __init__( ) -> None: """ :keyword email: the email notification. - :paramtype email: ~$(python-base-namespace).v2022_10_01.models.EmailNotification + :paramtype email: ~azure.mgmt.monitor.v2022_10_01.models.EmailNotification :keyword webhooks: the collection of webhook notifications. - :paramtype webhooks: list[~$(python-base-namespace).v2022_10_01.models.WebhookNotification] + :paramtype webhooks: list[~azure.mgmt.monitor.v2022_10_01.models.WebhookNotification] """ super().__init__(**kwargs) self.email = email @@ -147,16 +147,16 @@ class AutoscaleProfile(_serialization.Model): :ivar name: the name of the profile. Required. :vartype name: str :ivar capacity: the number of instances that can be used during this profile. Required. - :vartype capacity: ~$(python-base-namespace).v2022_10_01.models.ScaleCapacity + :vartype capacity: ~azure.mgmt.monitor.v2022_10_01.models.ScaleCapacity :ivar rules: the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. Required. - :vartype rules: list[~$(python-base-namespace).v2022_10_01.models.ScaleRule] + :vartype rules: list[~azure.mgmt.monitor.v2022_10_01.models.ScaleRule] :ivar fixed_date: the specific date-time for the profile. This element is not used if the Recurrence element is used. - :vartype fixed_date: ~$(python-base-namespace).v2022_10_01.models.TimeWindow + :vartype fixed_date: ~azure.mgmt.monitor.v2022_10_01.models.TimeWindow :ivar recurrence: the repeating times at which this profile begins. This element is not used if the FixedDate element is used. - :vartype recurrence: ~$(python-base-namespace).v2022_10_01.models.Recurrence + :vartype recurrence: ~azure.mgmt.monitor.v2022_10_01.models.Recurrence """ _validation = { @@ -187,16 +187,16 @@ def __init__( :keyword name: the name of the profile. Required. :paramtype name: str :keyword capacity: the number of instances that can be used during this profile. Required. - :paramtype capacity: ~$(python-base-namespace).v2022_10_01.models.ScaleCapacity + :paramtype capacity: ~azure.mgmt.monitor.v2022_10_01.models.ScaleCapacity :keyword rules: the collection of rules that provide the triggers and parameters for the scaling action. A maximum of 10 rules can be specified. Required. - :paramtype rules: list[~$(python-base-namespace).v2022_10_01.models.ScaleRule] + :paramtype rules: list[~azure.mgmt.monitor.v2022_10_01.models.ScaleRule] :keyword fixed_date: the specific date-time for the profile. This element is not used if the Recurrence element is used. - :paramtype fixed_date: ~$(python-base-namespace).v2022_10_01.models.TimeWindow + :paramtype fixed_date: ~azure.mgmt.monitor.v2022_10_01.models.TimeWindow :keyword recurrence: the repeating times at which this profile begins. This element is not used if the FixedDate element is used. - :paramtype recurrence: ~$(python-base-namespace).v2022_10_01.models.Recurrence + :paramtype recurrence: ~azure.mgmt.monitor.v2022_10_01.models.Recurrence """ super().__init__(**kwargs) self.name = name @@ -227,7 +227,7 @@ class Resource(_serialization.Model): characters and a value no greater in length than 256 characters. :vartype tags: dict[str, str] :ivar system_data: The system metadata related to the response. - :vartype system_data: ~$(python-base-namespace).v2022_10_01.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2022_10_01.models.SystemData """ _validation = { @@ -287,19 +287,18 @@ class AutoscaleSettingResource(Resource): # pylint: disable=too-many-instance-a characters and a value no greater in length than 256 characters. :vartype tags: dict[str, str] :ivar system_data: The system metadata related to the response. - :vartype system_data: ~$(python-base-namespace).v2022_10_01.models.SystemData + :vartype system_data: ~azure.mgmt.monitor.v2022_10_01.models.SystemData :ivar profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Required. - :vartype profiles: list[~$(python-base-namespace).v2022_10_01.models.AutoscaleProfile] + :vartype profiles: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleProfile] :ivar notifications: the collection of notifications. - :vartype notifications: - list[~$(python-base-namespace).v2022_10_01.models.AutoscaleNotification] + :vartype notifications: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleNotification] :ivar enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :vartype enabled: bool :ivar predictive_autoscale_policy: the predictive autoscale policy mode. :vartype predictive_autoscale_policy: - ~$(python-base-namespace).v2022_10_01.models.PredictiveAutoscalePolicy + ~azure.mgmt.monitor.v2022_10_01.models.PredictiveAutoscalePolicy :ivar name_properties_name: the name of the autoscale setting. :vartype name_properties_name: str :ivar target_resource_uri: the resource identifier of the resource that the autoscale setting @@ -362,16 +361,15 @@ def __init__( :paramtype tags: dict[str, str] :keyword profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. Required. - :paramtype profiles: list[~$(python-base-namespace).v2022_10_01.models.AutoscaleProfile] + :paramtype profiles: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleProfile] :keyword notifications: the collection of notifications. - :paramtype notifications: - list[~$(python-base-namespace).v2022_10_01.models.AutoscaleNotification] + :paramtype notifications: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleNotification] :keyword enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :paramtype enabled: bool :keyword predictive_autoscale_policy: the predictive autoscale policy mode. :paramtype predictive_autoscale_policy: - ~$(python-base-namespace).v2022_10_01.models.PredictiveAutoscalePolicy + ~azure.mgmt.monitor.v2022_10_01.models.PredictiveAutoscalePolicy :keyword name_properties_name: the name of the autoscale setting. :paramtype name_properties_name: str :keyword target_resource_uri: the resource identifier of the resource that the autoscale @@ -397,7 +395,7 @@ class AutoscaleSettingResourceCollection(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar value: the values for the autoscale setting resources. Required. - :vartype value: list[~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource] + :vartype value: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource] :ivar next_link: URL to get the next set of results. :vartype next_link: str """ @@ -416,7 +414,7 @@ def __init__( ) -> None: """ :keyword value: the values for the autoscale setting resources. Required. - :paramtype value: list[~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource] + :paramtype value: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource] :keyword next_link: URL to get the next set of results. :paramtype next_link: str """ @@ -432,16 +430,15 @@ class AutoscaleSettingResourcePatch(_serialization.Model): :vartype tags: dict[str, str] :ivar profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. - :vartype profiles: list[~$(python-base-namespace).v2022_10_01.models.AutoscaleProfile] + :vartype profiles: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleProfile] :ivar notifications: the collection of notifications. - :vartype notifications: - list[~$(python-base-namespace).v2022_10_01.models.AutoscaleNotification] + :vartype notifications: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleNotification] :ivar enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :vartype enabled: bool :ivar predictive_autoscale_policy: the predictive autoscale policy mode. :vartype predictive_autoscale_policy: - ~$(python-base-namespace).v2022_10_01.models.PredictiveAutoscalePolicy + ~azure.mgmt.monitor.v2022_10_01.models.PredictiveAutoscalePolicy :ivar name: the name of the autoscale setting. :vartype name: str :ivar target_resource_uri: the resource identifier of the resource that the autoscale setting @@ -488,16 +485,15 @@ def __init__( :paramtype tags: dict[str, str] :keyword profiles: the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified. - :paramtype profiles: list[~$(python-base-namespace).v2022_10_01.models.AutoscaleProfile] + :paramtype profiles: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleProfile] :keyword notifications: the collection of notifications. - :paramtype notifications: - list[~$(python-base-namespace).v2022_10_01.models.AutoscaleNotification] + :paramtype notifications: list[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleNotification] :keyword enabled: the enabled flag. Specifies whether automatic scaling is enabled for the resource. The default value is 'false'. :paramtype enabled: bool :keyword predictive_autoscale_policy: the predictive autoscale policy mode. :paramtype predictive_autoscale_policy: - ~$(python-base-namespace).v2022_10_01.models.PredictiveAutoscalePolicy + ~azure.mgmt.monitor.v2022_10_01.models.PredictiveAutoscalePolicy :keyword name: the name of the autoscale setting. :paramtype name: str :keyword target_resource_uri: the resource identifier of the resource that the autoscale @@ -582,7 +578,7 @@ class MetricTrigger(_serialization.Model): # pylint: disable=too-many-instance- :vartype time_grain: ~datetime.timedelta :ivar statistic: the metric statistic type. How the metrics from multiple instances are combined. Required. Known values are: "Average", "Min", "Max", "Sum", and "Count". - :vartype statistic: str or ~$(python-base-namespace).v2022_10_01.models.MetricStatisticType + :vartype statistic: str or ~azure.mgmt.monitor.v2022_10_01.models.MetricStatisticType :ivar time_window: the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. Required. @@ -590,18 +586,16 @@ class MetricTrigger(_serialization.Model): # pylint: disable=too-many-instance- :ivar time_aggregation: time aggregation type. How the data that is collected should be combined over time. The default value is Average. Required. Known values are: "Average", "Minimum", "Maximum", "Total", "Count", and "Last". - :vartype time_aggregation: str or - ~$(python-base-namespace).v2022_10_01.models.TimeAggregationType + :vartype time_aggregation: str or ~azure.mgmt.monitor.v2022_10_01.models.TimeAggregationType :ivar operator: the operator that is used to compare the metric data and the threshold. Required. Known values are: "Equals", "NotEquals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :vartype operator: str or ~$(python-base-namespace).v2022_10_01.models.ComparisonOperationType + :vartype operator: str or ~azure.mgmt.monitor.v2022_10_01.models.ComparisonOperationType :ivar threshold: the threshold of the metric that triggers the scale action. Required. :vartype threshold: float :ivar dimensions: List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. - :vartype dimensions: - list[~$(python-base-namespace).v2022_10_01.models.ScaleRuleMetricDimension] + :vartype dimensions: list[~azure.mgmt.monitor.v2022_10_01.models.ScaleRuleMetricDimension] :ivar divide_per_instance: a value indicating whether metric should divide per instance. :vartype divide_per_instance: bool """ @@ -665,7 +659,7 @@ def __init__( :paramtype time_grain: ~datetime.timedelta :keyword statistic: the metric statistic type. How the metrics from multiple instances are combined. Required. Known values are: "Average", "Min", "Max", "Sum", and "Count". - :paramtype statistic: str or ~$(python-base-namespace).v2022_10_01.models.MetricStatisticType + :paramtype statistic: str or ~azure.mgmt.monitor.v2022_10_01.models.MetricStatisticType :keyword time_window: the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes. Required. @@ -673,19 +667,16 @@ def __init__( :keyword time_aggregation: time aggregation type. How the data that is collected should be combined over time. The default value is Average. Required. Known values are: "Average", "Minimum", "Maximum", "Total", "Count", and "Last". - :paramtype time_aggregation: str or - ~$(python-base-namespace).v2022_10_01.models.TimeAggregationType + :paramtype time_aggregation: str or ~azure.mgmt.monitor.v2022_10_01.models.TimeAggregationType :keyword operator: the operator that is used to compare the metric data and the threshold. Required. Known values are: "Equals", "NotEquals", "GreaterThan", "GreaterThanOrEqual", "LessThan", and "LessThanOrEqual". - :paramtype operator: str or - ~$(python-base-namespace).v2022_10_01.models.ComparisonOperationType + :paramtype operator: str or ~azure.mgmt.monitor.v2022_10_01.models.ComparisonOperationType :keyword threshold: the threshold of the metric that triggers the scale action. Required. :paramtype threshold: float :keyword dimensions: List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. - :paramtype dimensions: - list[~$(python-base-namespace).v2022_10_01.models.ScaleRuleMetricDimension] + :paramtype dimensions: list[~azure.mgmt.monitor.v2022_10_01.models.ScaleRuleMetricDimension] :keyword divide_per_instance: a value indicating whether metric should divide per instance. :paramtype divide_per_instance: bool """ @@ -712,7 +703,7 @@ class PredictiveAutoscalePolicy(_serialization.Model): :ivar scale_mode: the predictive autoscale mode. Required. Known values are: "Disabled", "ForecastOnly", and "Enabled". :vartype scale_mode: str or - ~$(python-base-namespace).v2022_10_01.models.PredictiveAutoscalePolicyScaleMode + ~azure.mgmt.monitor.v2022_10_01.models.PredictiveAutoscalePolicyScaleMode :ivar scale_look_ahead_time: the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format. :vartype scale_look_ahead_time: ~datetime.timedelta @@ -738,7 +729,7 @@ def __init__( :keyword scale_mode: the predictive autoscale mode. Required. Known values are: "Disabled", "ForecastOnly", and "Enabled". :paramtype scale_mode: str or - ~$(python-base-namespace).v2022_10_01.models.PredictiveAutoscalePolicyScaleMode + ~azure.mgmt.monitor.v2022_10_01.models.PredictiveAutoscalePolicyScaleMode :keyword scale_look_ahead_time: the amount of time to specify by which instances are launched in advance. It must be between 1 minute and 60 minutes in ISO 8601 format. :paramtype scale_look_ahead_time: ~datetime.timedelta @@ -764,7 +755,7 @@ class PredictiveResponse(_serialization.Model): :ivar target_resource_id: resource of the predictive metric. :vartype target_resource_id: str :ivar data: the value of the collection. - :vartype data: list[~$(python-base-namespace).v2022_10_01.models.PredictiveValue] + :vartype data: list[~azure.mgmt.monitor.v2022_10_01.models.PredictiveValue] """ _attribute_map = { @@ -799,7 +790,7 @@ def __init__( :keyword target_resource_id: resource of the predictive metric. :paramtype target_resource_id: str :keyword data: the value of the collection. - :paramtype data: list[~$(python-base-namespace).v2022_10_01.models.PredictiveValue] + :paramtype data: list[~azure.mgmt.monitor.v2022_10_01.models.PredictiveValue] """ super().__init__(**kwargs) self.timespan = timespan @@ -853,9 +844,9 @@ class Recurrence(_serialization.Model): set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. Required. Known values are: "None", "Second", "Minute", "Hour", "Day", "Week", "Month", and "Year". - :vartype frequency: str or ~$(python-base-namespace).v2022_10_01.models.RecurrenceFrequency + :vartype frequency: str or ~azure.mgmt.monitor.v2022_10_01.models.RecurrenceFrequency :ivar schedule: the scheduling constraints for when the profile begins. Required. - :vartype schedule: ~$(python-base-namespace).v2022_10_01.models.RecurrentSchedule + :vartype schedule: ~azure.mgmt.monitor.v2022_10_01.models.RecurrentSchedule """ _validation = { @@ -881,9 +872,9 @@ def __init__( example, to set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. Required. Known values are: "None", "Second", "Minute", "Hour", "Day", "Week", "Month", and "Year". - :paramtype frequency: str or ~$(python-base-namespace).v2022_10_01.models.RecurrenceFrequency + :paramtype frequency: str or ~azure.mgmt.monitor.v2022_10_01.models.RecurrenceFrequency :keyword schedule: the scheduling constraints for when the profile begins. Required. - :paramtype schedule: ~$(python-base-namespace).v2022_10_01.models.RecurrentSchedule + :paramtype schedule: ~azure.mgmt.monitor.v2022_10_01.models.RecurrentSchedule """ super().__init__(**kwargs) self.frequency = frequency @@ -1006,10 +997,10 @@ class ScaleAction(_serialization.Model): :ivar direction: the scale direction. Whether the scaling action increases or decreases the number of instances. Required. Known values are: "None", "Increase", and "Decrease". - :vartype direction: str or ~$(python-base-namespace).v2022_10_01.models.ScaleDirection + :vartype direction: str or ~azure.mgmt.monitor.v2022_10_01.models.ScaleDirection :ivar type: the type of action that should occur when the scale rule fires. Required. Known values are: "ChangeCount", "PercentChangeCount", "ExactCount", and "ServiceAllowedNextValue". - :vartype type: str or ~$(python-base-namespace).v2022_10_01.models.ScaleType + :vartype type: str or ~azure.mgmt.monitor.v2022_10_01.models.ScaleType :ivar value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. :vartype value: str @@ -1043,10 +1034,10 @@ def __init__( """ :keyword direction: the scale direction. Whether the scaling action increases or decreases the number of instances. Required. Known values are: "None", "Increase", and "Decrease". - :paramtype direction: str or ~$(python-base-namespace).v2022_10_01.models.ScaleDirection + :paramtype direction: str or ~azure.mgmt.monitor.v2022_10_01.models.ScaleDirection :keyword type: the type of action that should occur when the scale rule fires. Required. Known values are: "ChangeCount", "PercentChangeCount", "ExactCount", and "ServiceAllowedNextValue". - :paramtype type: str or ~$(python-base-namespace).v2022_10_01.models.ScaleType + :paramtype type: str or ~azure.mgmt.monitor.v2022_10_01.models.ScaleType :keyword value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. :paramtype value: str @@ -1113,9 +1104,9 @@ class ScaleRule(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar metric_trigger: the trigger that results in a scaling action. Required. - :vartype metric_trigger: ~$(python-base-namespace).v2022_10_01.models.MetricTrigger + :vartype metric_trigger: ~azure.mgmt.monitor.v2022_10_01.models.MetricTrigger :ivar scale_action: the parameters for the scaling action. Required. - :vartype scale_action: ~$(python-base-namespace).v2022_10_01.models.ScaleAction + :vartype scale_action: ~azure.mgmt.monitor.v2022_10_01.models.ScaleAction """ _validation = { @@ -1133,9 +1124,9 @@ def __init__( ) -> None: """ :keyword metric_trigger: the trigger that results in a scaling action. Required. - :paramtype metric_trigger: ~$(python-base-namespace).v2022_10_01.models.MetricTrigger + :paramtype metric_trigger: ~azure.mgmt.monitor.v2022_10_01.models.MetricTrigger :keyword scale_action: the parameters for the scaling action. Required. - :paramtype scale_action: ~$(python-base-namespace).v2022_10_01.models.ScaleAction + :paramtype scale_action: ~azure.mgmt.monitor.v2022_10_01.models.ScaleAction """ super().__init__(**kwargs) self.metric_trigger = metric_trigger @@ -1153,7 +1144,7 @@ class ScaleRuleMetricDimension(_serialization.Model): being equal to any of the values. 'NotEquals' being not equal to all of the values. Required. Known values are: "Equals" and "NotEquals". :vartype operator: str or - ~$(python-base-namespace).v2022_10_01.models.ScaleRuleMetricDimensionOperationType + ~azure.mgmt.monitor.v2022_10_01.models.ScaleRuleMetricDimensionOperationType :ivar values: list of dimension values. For example: ["App1","App2"]. Required. :vartype values: list[str] """ @@ -1185,7 +1176,7 @@ def __init__( 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. Required. Known values are: "Equals" and "NotEquals". :paramtype operator: str or - ~$(python-base-namespace).v2022_10_01.models.ScaleRuleMetricDimensionOperationType + ~azure.mgmt.monitor.v2022_10_01.models.ScaleRuleMetricDimensionOperationType :keyword values: list of dimension values. For example: ["App1","App2"]. Required. :paramtype values: list[str] """ @@ -1202,15 +1193,14 @@ class SystemData(_serialization.Model): :vartype created_by: str :ivar created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype created_by_type: str or ~$(python-base-namespace).v2022_10_01.models.CreatedByType + :vartype created_by_type: str or ~azure.mgmt.monitor.v2022_10_01.models.CreatedByType :ivar created_at: The timestamp of resource creation (UTC). :vartype created_at: ~datetime.datetime :ivar last_modified_by: The identity that last modified the resource. :vartype last_modified_by: str :ivar last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :vartype last_modified_by_type: str or - ~$(python-base-namespace).v2022_10_01.models.CreatedByType + :vartype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_10_01.models.CreatedByType :ivar last_modified_at: The timestamp of resource last modification (UTC). :vartype last_modified_at: ~datetime.datetime """ @@ -1240,15 +1230,14 @@ def __init__( :paramtype created_by: str :keyword created_by_type: The type of identity that created the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype created_by_type: str or ~$(python-base-namespace).v2022_10_01.models.CreatedByType + :paramtype created_by_type: str or ~azure.mgmt.monitor.v2022_10_01.models.CreatedByType :keyword created_at: The timestamp of resource creation (UTC). :paramtype created_at: ~datetime.datetime :keyword last_modified_by: The identity that last modified the resource. :paramtype last_modified_by: str :keyword last_modified_by_type: The type of identity that last modified the resource. Known values are: "User", "Application", "ManagedIdentity", and "Key". - :paramtype last_modified_by_type: str or - ~$(python-base-namespace).v2022_10_01.models.CreatedByType + :paramtype last_modified_by_type: str or ~azure.mgmt.monitor.v2022_10_01.models.CreatedByType :keyword last_modified_at: The timestamp of resource last modification (UTC). :paramtype last_modified_at: ~datetime.datetime """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_autoscale_settings_operations.py index b38d2fc34bbd..eb8a0947cdab 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_autoscale_settings_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -45,7 +40,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -77,7 +72,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -113,7 +108,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -146,7 +141,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -179,7 +174,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -213,7 +208,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -239,7 +234,7 @@ class AutoscaleSettingsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_10_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_10_01.MonitorManagementClient`'s :attr:`autoscale_settings` attribute. """ @@ -265,13 +260,13 @@ def list_by_resource_group( :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { @@ -361,13 +356,13 @@ def create_or_update( :param autoscale_setting_name: The autoscale setting name. Required. :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Required. - :type parameters: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :type parameters: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -395,7 +390,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -416,13 +411,13 @@ def create_or_update( :type autoscale_setting_name: str :param parameters: Parameters supplied to the operation. Is either a AutoscaleSettingResource type or a IO type. Required. - :type parameters: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource or IO + :type parameters: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -436,7 +431,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -517,7 +512,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -564,7 +559,7 @@ def get( :type autoscale_setting_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -578,7 +573,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) request = build_get_request( @@ -636,13 +631,13 @@ def update( :type autoscale_setting_name: str :param autoscale_setting_resource: Parameters supplied to the operation. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResourcePatch + ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResourcePatch :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -671,7 +666,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -694,13 +689,13 @@ def update( :param autoscale_setting_resource: Parameters supplied to the operation. Is either a AutoscaleSettingResourcePatch type or a IO type. Required. :type autoscale_setting_resource: - ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResourcePatch or IO + ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResourcePatch or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AutoscaleSettingResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -714,7 +709,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.AutoscaleSettingResource] = kwargs.pop("cls", None) @@ -772,13 +767,13 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.AutoscaleSett :return: An iterator like instance of either AutoscaleSettingResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2022_10_01.models.AutoscaleSettingResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2022_10_01.models.AutoscaleSettingResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.AutoscaleSettingResourceCollection] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_predictive_metric_operations.py index 7a93c4a49a4d..d1f57c131d60 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_predictive_metric_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2022_10_01/operations/_predictive_metric_operations.py @@ -7,7 +7,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -import sys from typing import Any, Callable, Dict, Optional, TypeVar from azure.core.exceptions import ( @@ -29,10 +28,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -55,7 +50,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -93,7 +88,7 @@ class PredictiveMetricOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2022_10_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2022_10_01.MonitorManagementClient`'s :attr:`predictive_metric` attribute. """ @@ -140,7 +135,7 @@ def get( :type aggregation: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PredictiveResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2022_10_01.models.PredictiveResponse + :rtype: ~azure.mgmt.monitor.v2022_10_01.models.PredictiveResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -154,7 +149,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2022-10-01"] = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2022-10-01")) cls: ClsType[_models.PredictiveResponse] = kwargs.pop("cls", None) request = build_get_request( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_configuration.py index 26b20e120f3c..44706f982b49 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", "2023-01-01") + api_version: str = kwargs.pop("api_version", "2023-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_monitor_management_client.py index fcd51b46897d..2df565f22f59 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_monitor_management_client.py @@ -26,7 +26,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: $(python-base-namespace).v2023_01_01.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2023_01_01.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_configuration.py index a43db08d7191..dde84c532624 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -42,7 +36,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", "2023-01-01") + api_version: str = kwargs.pop("api_version", "2023-01-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_monitor_management_client.py index 6e6c2fe8af77..e729b5d59b3f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/_monitor_management_client.py @@ -26,8 +26,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key """Monitor Management Client. :ivar action_groups: ActionGroupsOperations operations - :vartype action_groups: - $(python-base-namespace).v2023_01_01.aio.operations.ActionGroupsOperations + :vartype action_groups: azure.mgmt.monitor.v2023_01_01.aio.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. Required. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/operations/_action_groups_operations.py index 875fd274a274..0b64afbb9f89 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/aio/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -43,10 +42,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -57,7 +52,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2023_01_01.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2023_01_01.aio.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -88,13 +83,13 @@ async def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -122,7 +117,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -143,13 +138,13 @@ async def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -163,7 +158,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -228,7 +223,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -242,7 +237,7 @@ async def get(self, resource_group_name: str, action_group_name: str, **kwargs: _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -307,7 +302,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -359,13 +354,13 @@ async def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2023_01_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -393,7 +388,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -414,14 +409,13 @@ async def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2023_01_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -435,7 +429,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -485,7 +479,7 @@ async def update( "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}" } - async def _create_notifications_at_action_group_resource_level_initial( + async def _create_notifications_at_action_group_resource_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -503,7 +497,7 @@ async def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -560,7 +554,7 @@ async def _create_notifications_at_action_group_resource_level_initial( } @overload - async def begin_create_notifications_at_action_group_resource_level( + async def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -578,8 +572,7 @@ async def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2023_01_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2023_01_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -594,12 +587,12 @@ async def begin_create_notifications_at_action_group_resource_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2023_01_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2023_01_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - async def begin_create_notifications_at_action_group_resource_level( + async def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -632,12 +625,12 @@ async def begin_create_notifications_at_action_group_resource_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2023_01_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2023_01_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace_async - async def begin_create_notifications_at_action_group_resource_level( + async def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -653,8 +646,8 @@ async def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2023_01_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2023_01_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -669,13 +662,13 @@ async def begin_create_notifications_at_action_group_resource_level( :return: An instance of AsyncLROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2023_01_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.AsyncLROPoller[~azure.mgmt.monitor.v2023_01_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) @@ -723,7 +716,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace_async - async def get_test_notifications_at_action_group_resource_level( + async def get_test_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -737,7 +730,7 @@ async def get_test_notifications_at_action_group_resource_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -751,7 +744,7 @@ async def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -797,13 +790,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> AsyncIterable["_models.Actio :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2023_01_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -886,13 +879,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2023_01_01.models.ActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -983,7 +976,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2023_01_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2023_01_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1040,7 +1033,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2023_01_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2023_01_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1060,7 +1053,7 @@ async def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/models/_models_py3.py index d0759bb32ec9..f75c74e4eec6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/models/_models_py3.py @@ -80,7 +80,7 @@ class ActionGroupList(_serialization.Model): """A list of action groups. :ivar value: The list of action groups. - :vartype value: list[~$(python-base-namespace).v2023_01_01.models.ActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -99,7 +99,7 @@ def __init__( ) -> None: """ :keyword value: The list of action groups. - :paramtype value: list[~$(python-base-namespace).v2023_01_01.models.ActionGroupResource] + :paramtype value: list[~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -208,36 +208,34 @@ class ActionGroupResource(AzureResource): # pylint: disable=too-many-instance-a enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2023_01_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2023_01_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2023_01_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2023_01_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2023_01_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2023_01_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2023_01_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.ArmRoleReceiver] :ivar event_hub_receivers: The list of event hub receivers that are part of this action group. - :vartype event_hub_receivers: - list[~$(python-base-namespace).v2023_01_01.models.EventHubReceiver] + :vartype event_hub_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.EventHubReceiver] """ _validation = { @@ -304,40 +302,36 @@ def __init__( enabled, then none of its receivers will receive communications. :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2023_01_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2023_01_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2023_01_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2023_01_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2023_01_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2023_01_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2023_01_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.ArmRoleReceiver] :keyword event_hub_receivers: The list of event hub receivers that are part of this action group. - :paramtype event_hub_receivers: - list[~$(python-base-namespace).v2023_01_01.models.EventHubReceiver] + :paramtype event_hub_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.EventHubReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name @@ -617,7 +611,7 @@ class EmailReceiver(_serialization.Model): :vartype use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2023_01_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2023_01_01.models.ReceiverStatus """ _validation = { @@ -900,36 +894,34 @@ class NotificationRequestBody(_serialization.Model): # pylint: disable=too-many actualcostbudget, forecastedbudget. Required. :vartype alert_type: str :ivar email_receivers: The list of email receivers that are part of this action group. - :vartype email_receivers: list[~$(python-base-namespace).v2023_01_01.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2023_01_01.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this action group. - :vartype webhook_receivers: list[~$(python-base-namespace).v2023_01_01.models.WebhookReceiver] + :vartype webhook_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.WebhookReceiver] :ivar itsm_receivers: The list of ITSM receivers that are part of this action group. - :vartype itsm_receivers: list[~$(python-base-namespace).v2023_01_01.models.ItsmReceiver] + :vartype itsm_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.ItsmReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AzureAppPushReceiver] :ivar automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :vartype automation_runbook_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AutomationRunbookReceiver] :ivar voice_receivers: The list of voice receivers that are part of this action group. - :vartype voice_receivers: list[~$(python-base-namespace).v2023_01_01.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.VoiceReceiver] :ivar logic_app_receivers: The list of logic app receivers that are part of this action group. - :vartype logic_app_receivers: - list[~$(python-base-namespace).v2023_01_01.models.LogicAppReceiver] + :vartype logic_app_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.LogicAppReceiver] :ivar azure_function_receivers: The list of azure function receivers that are part of this action group. :vartype azure_function_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AzureFunctionReceiver] :ivar arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :vartype arm_role_receivers: list[~$(python-base-namespace).v2023_01_01.models.ArmRoleReceiver] + :vartype arm_role_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.ArmRoleReceiver] :ivar event_hub_receivers: The list of event hub receivers that are part of this action group. - :vartype event_hub_receivers: - list[~$(python-base-namespace).v2023_01_01.models.EventHubReceiver] + :vartype event_hub_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.EventHubReceiver] """ _validation = { @@ -975,40 +967,36 @@ def __init__( actualcostbudget, forecastedbudget. Required. :paramtype alert_type: str :keyword email_receivers: The list of email receivers that are part of this action group. - :paramtype email_receivers: list[~$(python-base-namespace).v2023_01_01.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this action group. - :paramtype sms_receivers: list[~$(python-base-namespace).v2023_01_01.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this action group. - :paramtype webhook_receivers: - list[~$(python-base-namespace).v2023_01_01.models.WebhookReceiver] + :paramtype webhook_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.WebhookReceiver] :keyword itsm_receivers: The list of ITSM receivers that are part of this action group. - :paramtype itsm_receivers: list[~$(python-base-namespace).v2023_01_01.models.ItsmReceiver] + :paramtype itsm_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.ItsmReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AzureAppPushReceiver] :keyword automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. :paramtype automation_runbook_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AutomationRunbookReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AutomationRunbookReceiver] :keyword voice_receivers: The list of voice receivers that are part of this action group. - :paramtype voice_receivers: list[~$(python-base-namespace).v2023_01_01.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.VoiceReceiver] :keyword logic_app_receivers: The list of logic app receivers that are part of this action group. - :paramtype logic_app_receivers: - list[~$(python-base-namespace).v2023_01_01.models.LogicAppReceiver] + :paramtype logic_app_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.LogicAppReceiver] :keyword azure_function_receivers: The list of azure function receivers that are part of this action group. :paramtype azure_function_receivers: - list[~$(python-base-namespace).v2023_01_01.models.AzureFunctionReceiver] + list[~azure.mgmt.monitor.v2023_01_01.models.AzureFunctionReceiver] :keyword arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. - :paramtype arm_role_receivers: - list[~$(python-base-namespace).v2023_01_01.models.ArmRoleReceiver] + :paramtype arm_role_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.ArmRoleReceiver] :keyword event_hub_receivers: The list of event hub receivers that are part of this action group. - :paramtype event_hub_receivers: - list[~$(python-base-namespace).v2023_01_01.models.EventHubReceiver] + :paramtype event_hub_receivers: list[~azure.mgmt.monitor.v2023_01_01.models.EventHubReceiver] """ super().__init__(**kwargs) self.alert_type = alert_type @@ -1041,7 +1029,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2023_01_01.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2023_01_01.models.ReceiverStatus """ _validation = { @@ -1081,7 +1069,7 @@ class TestNotificationDetailsResponse(_serialization.Model): All required parameters must be populated in order to send to Azure. :ivar context: The context info. - :vartype context: ~$(python-base-namespace).v2023_01_01.models.Context + :vartype context: ~azure.mgmt.monitor.v2023_01_01.models.Context :ivar state: The overall state. Required. :vartype state: str :ivar completed_time: The completed time. @@ -1089,7 +1077,7 @@ class TestNotificationDetailsResponse(_serialization.Model): :ivar created_time: The created time. :vartype created_time: str :ivar action_details: The list of action detail. - :vartype action_details: list[~$(python-base-namespace).v2023_01_01.models.ActionDetail] + :vartype action_details: list[~azure.mgmt.monitor.v2023_01_01.models.ActionDetail] """ _validation = { @@ -1116,7 +1104,7 @@ def __init__( ) -> None: """ :keyword context: The context info. - :paramtype context: ~$(python-base-namespace).v2023_01_01.models.Context + :paramtype context: ~azure.mgmt.monitor.v2023_01_01.models.Context :keyword state: The overall state. Required. :paramtype state: str :keyword completed_time: The completed time. @@ -1124,7 +1112,7 @@ def __init__( :keyword created_time: The created time. :paramtype created_time: str :keyword action_details: The list of action detail. - :paramtype action_details: list[~$(python-base-namespace).v2023_01_01.models.ActionDetail] + :paramtype action_details: list[~azure.mgmt.monitor.v2023_01_01.models.ActionDetail] """ super().__init__(**kwargs) self.context = context diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/operations/_action_groups_operations.py index 4980c1551740..8dc6e1859808 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_01_01/operations/_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, cast, overload import urllib.parse @@ -32,10 +31,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -49,7 +44,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -85,7 +80,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -118,7 +113,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -151,7 +146,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -181,13 +176,13 @@ def build_update_request( return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_create_notifications_at_action_group_resource_level_request( +def build_create_notifications_at_action_group_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, action_group_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -217,13 +212,13 @@ def build_create_notifications_at_action_group_resource_level_request( return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) -def build_get_test_notifications_at_action_group_resource_level_request( +def build_get_test_notifications_at_action_group_resource_level_request( # pylint: disable=name-too-long resource_group_name: str, action_group_name: str, notification_id: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -255,7 +250,7 @@ def build_list_by_subscription_id_request(subscription_id: str, **kwargs: Any) - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -279,7 +274,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -311,7 +306,7 @@ def build_enable_receiver_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -347,7 +342,7 @@ class ActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2023_01_01.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2023_01_01.MonitorManagementClient`'s :attr:`action_groups` attribute. """ @@ -378,13 +373,13 @@ def create_or_update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group: The action group to create or use for the update. Required. - :type action_group: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -412,7 +407,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -433,13 +428,13 @@ def create_or_update( :type action_group_name: str :param action_group: The action group to create or use for the update. Is either a ActionGroupResource type or a IO type. Required. - :type action_group: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -453,7 +448,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -518,7 +513,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - :type action_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -532,7 +527,7 @@ def get(self, resource_group_name: str, action_group_name: str, **kwargs: Any) - _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -597,7 +592,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -649,13 +644,13 @@ def update( :param action_group_name: The name of the action group. Required. :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Required. - :type action_group_patch: ~$(python-base-namespace).v2023_01_01.models.ActionGroupPatchBody + :type action_group_patch: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -683,7 +678,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -704,14 +699,13 @@ def update( :type action_group_name: str :param action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. - :type action_group_patch: ~$(python-base-namespace).v2023_01_01.models.ActionGroupPatchBody or - IO + :type action_group_patch: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.ActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -725,7 +719,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.ActionGroupResource] = kwargs.pop("cls", None) @@ -775,7 +769,7 @@ def update( "url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}" } - def _create_notifications_at_action_group_resource_level_initial( + def _create_notifications_at_action_group_resource_level_initial( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -793,7 +787,7 @@ def _create_notifications_at_action_group_resource_level_initial( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[Optional[_models.TestNotificationDetailsResponse]] = kwargs.pop("cls", None) @@ -850,7 +844,7 @@ def _create_notifications_at_action_group_resource_level_initial( } @overload - def begin_create_notifications_at_action_group_resource_level( + def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -868,8 +862,7 @@ def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Required. - :type notification_request: - ~$(python-base-namespace).v2023_01_01.models.NotificationRequestBody + :type notification_request: ~azure.mgmt.monitor.v2023_01_01.models.NotificationRequestBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -884,12 +877,12 @@ def begin_create_notifications_at_action_group_resource_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2023_01_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2023_01_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @overload - def begin_create_notifications_at_action_group_resource_level( + def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -922,12 +915,12 @@ def begin_create_notifications_at_action_group_resource_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2023_01_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2023_01_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ @distributed_trace - def begin_create_notifications_at_action_group_resource_level( + def begin_create_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, @@ -943,8 +936,8 @@ def begin_create_notifications_at_action_group_resource_level( :type action_group_name: str :param notification_request: The notification request body which includes the contact details. Is either a NotificationRequestBody type or a IO type. Required. - :type notification_request: - ~$(python-base-namespace).v2023_01_01.models.NotificationRequestBody or IO + :type notification_request: ~azure.mgmt.monitor.v2023_01_01.models.NotificationRequestBody or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -959,13 +952,13 @@ def begin_create_notifications_at_action_group_resource_level( :return: An instance of LROPoller that returns either TestNotificationDetailsResponse or the result of cls(response) :rtype: - ~azure.core.polling.LROPoller[~$(python-base-namespace).v2023_01_01.models.TestNotificationDetailsResponse] + ~azure.core.polling.LROPoller[~azure.mgmt.monitor.v2023_01_01.models.TestNotificationDetailsResponse] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) @@ -1013,7 +1006,7 @@ def get_long_running_output(pipeline_response): } @distributed_trace - def get_test_notifications_at_action_group_resource_level( + def get_test_notifications_at_action_group_resource_level( # pylint: disable=name-too-long self, resource_group_name: str, action_group_name: str, notification_id: str, **kwargs: Any ) -> _models.TestNotificationDetailsResponse: """Get the test notifications by the notification id. @@ -1027,7 +1020,7 @@ def get_test_notifications_at_action_group_resource_level( :type notification_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TestNotificationDetailsResponse or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_01_01.models.TestNotificationDetailsResponse + :rtype: ~azure.mgmt.monitor.v2023_01_01.models.TestNotificationDetailsResponse :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -1041,7 +1034,7 @@ def get_test_notifications_at_action_group_resource_level( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.TestNotificationDetailsResponse] = kwargs.pop("cls", None) request = build_get_test_notifications_at_action_group_resource_level_request( @@ -1087,13 +1080,13 @@ def list_by_subscription_id(self, **kwargs: Any) -> Iterable["_models.ActionGrou :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2023_01_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1176,13 +1169,13 @@ def list_by_resource_group( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2023_01_01.models.ActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2023_01_01.models.ActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) cls: ClsType[_models.ActionGroupList] = kwargs.pop("cls", None) error_map = { @@ -1273,7 +1266,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :param action_group_name: The name of the action group. Required. :type action_group_name: str :param enable_request: The receiver to re-enable. Required. - :type enable_request: ~$(python-base-namespace).v2023_01_01.models.EnableRequest + :type enable_request: ~azure.mgmt.monitor.v2023_01_01.models.EnableRequest :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str @@ -1330,7 +1323,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements :type action_group_name: str :param enable_request: The receiver to re-enable. Is either a EnableRequest type or a IO type. Required. - :type enable_request: ~$(python-base-namespace).v2023_01_01.models.EnableRequest or IO + :type enable_request: ~azure.mgmt.monitor.v2023_01_01.models.EnableRequest or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str @@ -1350,7 +1343,7 @@ def enable_receiver( # pylint: disable=inconsistent-return-statements _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-01-01"] = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-01-01")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[None] = kwargs.pop("cls", None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_configuration.py index 2c148bfb94b3..3c8cf235fbba 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from ._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2023-03-01-preview"] = kwargs.pop("api_version", "2023-03-01-preview") + api_version: str = kwargs.pop("api_version", "2023-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_monitor_management_client.py index 94c79591faad..d3b97cc5c89b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_monitor_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar tenant_action_groups: TenantActionGroupsOperations operations :vartype tenant_action_groups: - $(python-base-namespace).v2023_03_01_preview.operations.TenantActionGroupsOperations + azure.mgmt.monitor.v2023_03_01_preview.operations.TenantActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials.TokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_version.py index caf312bd2d0b..e5754a47ce68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "6.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_configuration.py index 0e9ba1b8ef8d..e95fb3f74ae1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_configuration.py @@ -6,7 +6,6 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration @@ -15,11 +14,6 @@ from .._version import VERSION -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports - if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential @@ -40,7 +34,7 @@ class MonitorManagementClientConfiguration(Configuration): # pylint: disable=to def __init__(self, credential: "AsyncTokenCredential", **kwargs: Any) -> None: super(MonitorManagementClientConfiguration, self).__init__(**kwargs) - api_version: Literal["2023-03-01-preview"] = kwargs.pop("api_version", "2023-03-01-preview") + api_version: str = kwargs.pop("api_version", "2023-03-01-preview") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_monitor_management_client.py index 604d116b7af3..5bafc0c09b2b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/_monitor_management_client.py @@ -27,7 +27,7 @@ class MonitorManagementClient: # pylint: disable=client-accepts-api-version-key :ivar tenant_action_groups: TenantActionGroupsOperations operations :vartype tenant_action_groups: - $(python-base-namespace).v2023_03_01_preview.aio.operations.TenantActionGroupsOperations + azure.mgmt.monitor.v2023_03_01_preview.aio.operations.TenantActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. Required. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param base_url: Service URL. Default value is "https://management.azure.com". diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/operations/_tenant_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/operations/_tenant_action_groups_operations.py index d71f73c51de8..dd43cf92c8c6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/operations/_tenant_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/aio/operations/_tenant_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, AsyncIterable, Callable, Dict, IO, Optional, TypeVar, Union, overload import urllib.parse @@ -37,10 +36,6 @@ build_update_request, ) -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -51,7 +46,7 @@ class TenantActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2023_03_01_preview.aio.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2023_03_01_preview.aio.MonitorManagementClient`'s :attr:`tenant_action_groups` attribute. """ @@ -84,14 +79,13 @@ async def create_or_update( :param x_ms_client_tenant_id: The tenant ID of the client making the request. Required. :type x_ms_client_tenant_id: str :param action_group: The tenant action group to create or use for the update. Required. - :type action_group: - ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -121,7 +115,7 @@ async def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -144,14 +138,14 @@ async def create_or_update( :type x_ms_client_tenant_id: str :param action_group: The tenant action group to create or use for the update. Is either a TenantActionGroupResource type or a IO type. Required. - :type action_group: - ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -165,9 +159,7 @@ async def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) @@ -235,7 +227,7 @@ async def get( :type x_ms_client_tenant_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -249,9 +241,7 @@ async def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -317,9 +307,7 @@ async def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -375,13 +363,13 @@ async def update( :type x_ms_client_tenant_id: str :param tenant_action_group_patch: Parameters supplied to the operation. Required. :type tenant_action_group_patch: - ~$(python-base-namespace).v2023_03_01_preview.models.ActionGroupPatchBody + ~azure.mgmt.monitor.v2023_03_01_preview.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -412,7 +400,7 @@ async def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -437,13 +425,13 @@ async def update( :param tenant_action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. :type tenant_action_group_patch: - ~$(python-base-namespace).v2023_03_01_preview.models.ActionGroupPatchBody or IO + ~azure.mgmt.monitor.v2023_03_01_preview.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -457,9 +445,7 @@ async def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) @@ -523,15 +509,13 @@ def list_by_management_group_id( :return: An iterator like instance of either TenantActionGroupResource or the result of cls(response) :rtype: - ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource] + ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[_models.TenantActionGroupList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/models/_models_py3.py index b815e9bae0f5..0228f1dc008e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/models/_models_py3.py @@ -144,7 +144,7 @@ class EmailReceiver(_serialization.Model): :vartype use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2023_03_01_preview.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2023_03_01_preview.models.ReceiverStatus """ _validation = { @@ -219,7 +219,7 @@ class SmsReceiver(_serialization.Model): :vartype phone_number: str :ivar status: The status of the receiver. Known values are: "NotSpecified", "Enabled", and "Disabled". - :vartype status: str or ~$(python-base-namespace).v2023_03_01_preview.models.ReceiverStatus + :vartype status: str or ~azure.mgmt.monitor.v2023_03_01_preview.models.ReceiverStatus """ _validation = { @@ -257,8 +257,7 @@ class TenantActionGroupList(_serialization.Model): """A list of tenant action groups. :ivar value: The list of tenant action groups. - :vartype value: - list[~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource] + :vartype value: list[~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource] :ivar next_link: Provides the link to retrieve the next set of elements. :vartype next_link: str """ @@ -278,7 +277,7 @@ def __init__( """ :keyword value: The list of tenant action groups. :paramtype value: - list[~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource] + list[~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource] :keyword next_link: Provides the link to retrieve the next set of elements. :paramtype next_link: str """ @@ -310,21 +309,19 @@ class TenantActionGroupResource(AzureResource): # pylint: disable=too-many-inst is not enabled, then none of its receivers will receive communications. :vartype enabled: bool :ivar email_receivers: The list of email receivers that are part of this tenant action group. - :vartype email_receivers: - list[~$(python-base-namespace).v2023_03_01_preview.models.EmailReceiver] + :vartype email_receivers: list[~azure.mgmt.monitor.v2023_03_01_preview.models.EmailReceiver] :ivar sms_receivers: The list of SMS receivers that are part of this tenant action group. - :vartype sms_receivers: list[~$(python-base-namespace).v2023_03_01_preview.models.SmsReceiver] + :vartype sms_receivers: list[~azure.mgmt.monitor.v2023_03_01_preview.models.SmsReceiver] :ivar webhook_receivers: The list of webhook receivers that are part of this tenant action group. :vartype webhook_receivers: - list[~$(python-base-namespace).v2023_03_01_preview.models.WebhookReceiver] + list[~azure.mgmt.monitor.v2023_03_01_preview.models.WebhookReceiver] :ivar azure_app_push_receivers: The list of AzureAppPush receivers that are part of this tenant action group. :vartype azure_app_push_receivers: - list[~$(python-base-namespace).v2023_03_01_preview.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2023_03_01_preview.models.AzureAppPushReceiver] :ivar voice_receivers: The list of voice receivers that are part of this tenant action group. - :vartype voice_receivers: - list[~$(python-base-namespace).v2023_03_01_preview.models.VoiceReceiver] + :vartype voice_receivers: list[~azure.mgmt.monitor.v2023_03_01_preview.models.VoiceReceiver] """ _validation = { @@ -377,23 +374,20 @@ def __init__( :paramtype enabled: bool :keyword email_receivers: The list of email receivers that are part of this tenant action group. - :paramtype email_receivers: - list[~$(python-base-namespace).v2023_03_01_preview.models.EmailReceiver] + :paramtype email_receivers: list[~azure.mgmt.monitor.v2023_03_01_preview.models.EmailReceiver] :keyword sms_receivers: The list of SMS receivers that are part of this tenant action group. - :paramtype sms_receivers: - list[~$(python-base-namespace).v2023_03_01_preview.models.SmsReceiver] + :paramtype sms_receivers: list[~azure.mgmt.monitor.v2023_03_01_preview.models.SmsReceiver] :keyword webhook_receivers: The list of webhook receivers that are part of this tenant action group. :paramtype webhook_receivers: - list[~$(python-base-namespace).v2023_03_01_preview.models.WebhookReceiver] + list[~azure.mgmt.monitor.v2023_03_01_preview.models.WebhookReceiver] :keyword azure_app_push_receivers: The list of AzureAppPush receivers that are part of this tenant action group. :paramtype azure_app_push_receivers: - list[~$(python-base-namespace).v2023_03_01_preview.models.AzureAppPushReceiver] + list[~azure.mgmt.monitor.v2023_03_01_preview.models.AzureAppPushReceiver] :keyword voice_receivers: The list of voice receivers that are part of this tenant action group. - :paramtype voice_receivers: - list[~$(python-base-namespace).v2023_03_01_preview.models.VoiceReceiver] + :paramtype voice_receivers: list[~azure.mgmt.monitor.v2023_03_01_preview.models.VoiceReceiver] """ super().__init__(location=location, tags=tags, **kwargs) self.group_short_name = group_short_name diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/operations/_tenant_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/operations/_tenant_action_groups_operations.py index 554062986f9d..f9e38c81b647 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/operations/_tenant_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2023_03_01_preview/operations/_tenant_action_groups_operations.py @@ -6,7 +6,6 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -import sys from typing import Any, Callable, Dict, IO, Iterable, Optional, TypeVar, Union, overload import urllib.parse @@ -30,10 +29,6 @@ from ..._serialization import Serializer from .._vendor import _convert_request, _format_url_section -if sys.version_info >= (3, 8): - from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports -else: - from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -47,9 +42,7 @@ def build_create_or_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -83,9 +76,7 @@ def build_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -116,9 +107,7 @@ def build_delete_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -149,9 +138,7 @@ def build_update_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) accept = _headers.pop("Accept", "application/json") @@ -179,15 +166,13 @@ def build_update_request( return HttpRequest(method="PATCH", url=_url, params=_params, headers=_headers, **kwargs) -def build_list_by_management_group_id_request( +def build_list_by_management_group_id_request( # pylint: disable=name-too-long management_group_id: str, *, x_ms_client_tenant_id: str, **kwargs: Any ) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -217,7 +202,7 @@ class TenantActionGroupsOperations: **DO NOT** instantiate this class directly. Instead, you should access the following operations through - :class:`~$(python-base-namespace).v2023_03_01_preview.MonitorManagementClient`'s + :class:`~azure.mgmt.monitor.v2023_03_01_preview.MonitorManagementClient`'s :attr:`tenant_action_groups` attribute. """ @@ -250,14 +235,13 @@ def create_or_update( :param x_ms_client_tenant_id: The tenant ID of the client making the request. Required. :type x_ms_client_tenant_id: str :param action_group: The tenant action group to create or use for the update. Required. - :type action_group: - ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :type action_group: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -287,7 +271,7 @@ def create_or_update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -310,14 +294,14 @@ def create_or_update( :type x_ms_client_tenant_id: str :param action_group: The tenant action group to create or use for the update. Is either a TenantActionGroupResource type or a IO type. Required. - :type action_group: - ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource or IO + :type action_group: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource or + IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -331,9 +315,7 @@ def create_or_update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) @@ -401,7 +383,7 @@ def get( :type x_ms_client_tenant_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -415,9 +397,7 @@ def get( _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) request = build_get_request( @@ -483,9 +463,7 @@ def delete( # pylint: disable=inconsistent-return-statements _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[None] = kwargs.pop("cls", None) request = build_delete_request( @@ -541,13 +519,13 @@ def update( :type x_ms_client_tenant_id: str :param tenant_action_group_patch: Parameters supplied to the operation. Required. :type tenant_action_group_patch: - ~$(python-base-namespace).v2023_03_01_preview.models.ActionGroupPatchBody + ~azure.mgmt.monitor.v2023_03_01_preview.models.ActionGroupPatchBody :keyword content_type: Body Parameter content-type. Content type parameter for JSON body. Default value is "application/json". :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -578,7 +556,7 @@ def update( :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ @@ -603,13 +581,13 @@ def update( :param tenant_action_group_patch: Parameters supplied to the operation. Is either a ActionGroupPatchBody type or a IO type. Required. :type tenant_action_group_patch: - ~$(python-base-namespace).v2023_03_01_preview.models.ActionGroupPatchBody or IO + ~azure.mgmt.monitor.v2023_03_01_preview.models.ActionGroupPatchBody or IO :keyword content_type: Body Parameter content-type. Known values are: 'application/json'. Default value is None. :paramtype content_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: TenantActionGroupResource or the result of cls(response) - :rtype: ~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource + :rtype: ~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource :raises ~azure.core.exceptions.HttpResponseError: """ error_map = { @@ -623,9 +601,7 @@ def update( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) cls: ClsType[_models.TenantActionGroupResource] = kwargs.pop("cls", None) @@ -689,15 +665,13 @@ def list_by_management_group_id( :return: An iterator like instance of either TenantActionGroupResource or the result of cls(response) :rtype: - ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2023_03_01_preview.models.TenantActionGroupResource] + ~azure.core.paging.ItemPaged[~azure.mgmt.monitor.v2023_03_01_preview.models.TenantActionGroupResource] :raises ~azure.core.exceptions.HttpResponseError: """ _headers = kwargs.pop("headers", {}) or {} _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: Literal["2023-03-01-preview"] = kwargs.pop( - "api_version", _params.pop("api-version", "2023-03-01-preview") - ) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2023-03-01-preview")) cls: ClsType[_models.TenantActionGroupList] = kwargs.pop("cls", None) error_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/generated_samples/create_or_update_action_group.py b/sdk/monitor/azure-mgmt-monitor/generated_samples/create_or_update_action_group.py new file mode 100644 index 000000000000..4dd3d512ffb1 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/generated_samples/create_or_update_action_group.py @@ -0,0 +1,128 @@ +# 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 azure.identity import DefaultAzureCredential +from azure.mgmt.monitor import MonitorManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-monitor +# USAGE + python create_or_update_action_group.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = MonitorManagementClient( + credential=DefaultAzureCredential(), + subscription_id="187f412d-1758-44d9-b052-169e2564721d", + ) + + response = client.action_groups.create_or_update( + resource_group_name="Default-NotificationRules", + action_group_name="SampleActionGroup", + action_group={ + "location": "Global", + "properties": { + "armRoleReceivers": [ + { + "name": "Sample armRole", + "roleId": "8e3af657-a8ff-443c-a75c-2fe8c4bcb635", + "useCommonAlertSchema": True, + } + ], + "automationRunbookReceivers": [ + { + "automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", + "isGlobalRunbook": False, + "name": "testRunbook", + "runbookName": "Sample runbook", + "serviceUri": "", + "useCommonAlertSchema": True, + "webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084", + } + ], + "azureAppPushReceivers": [{"emailAddress": "johndoe@email.com", "name": "Sample azureAppPush"}], + "azureFunctionReceivers": [ + { + "functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", + "functionName": "HttpTriggerCSharp1", + "httpTriggerUrl": "http://test.me", + "name": "Sample azureFunction", + "useCommonAlertSchema": True, + } + ], + "emailReceivers": [ + {"emailAddress": "johndoe@email.com", "name": "John Doe's email", "useCommonAlertSchema": False}, + {"emailAddress": "janesmith@email.com", "name": "Jane Smith's email", "useCommonAlertSchema": True}, + ], + "enabled": True, + "eventHubReceivers": [ + { + "eventHubName": "testEventHub", + "eventHubNameSpace": "testEventHubNameSpace", + "name": "Sample eventHub", + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84", + } + ], + "groupShortName": "sample", + "itsmReceivers": [ + { + "connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", + "name": "Sample itsm", + "region": "westcentralus", + "ticketConfiguration": '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', + "workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c", + } + ], + "logicAppReceivers": [ + { + "callbackUrl": "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", + "name": "Sample logicApp", + "resourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", + "useCommonAlertSchema": False, + } + ], + "smsReceivers": [ + {"countryCode": "1", "name": "John Doe's mobile", "phoneNumber": "1234567890"}, + {"countryCode": "1", "name": "Jane Smith's mobile", "phoneNumber": "0987654321"}, + ], + "voiceReceivers": [{"countryCode": "1", "name": "Sample voice", "phoneNumber": "1234567890"}], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": True, + }, + { + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "name": "Sample webhook 2", + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "serviceUri": "http://www.example.com/webhook2", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84", + "useAadAuth": True, + "useCommonAlertSchema": True, + }, + ], + }, + "tags": {}, + }, + ) + print(response) + + +# x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2023-01-01/examples/createOrUpdateActionGroup.json +if __name__ == "__main__": + main() diff --git a/sdk/monitor/azure-mgmt-monitor/generated_samples/delete_action_group.py b/sdk/monitor/azure-mgmt-monitor/generated_samples/delete_action_group.py new file mode 100644 index 000000000000..6716be2d669f --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/generated_samples/delete_action_group.py @@ -0,0 +1,41 @@ +# 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 azure.identity import DefaultAzureCredential +from azure.mgmt.monitor import MonitorManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-monitor +# USAGE + python delete_action_group.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = MonitorManagementClient( + credential=DefaultAzureCredential(), + subscription_id="187f412d-1758-44d9-b052-169e2564721d", + ) + + response = client.action_groups.delete( + resource_group_name="Default-NotificationRules", + action_group_name="SampleActionGroup", + ) + print(response) + + +# x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2023-01-01/examples/deleteActionGroup.json +if __name__ == "__main__": + main() diff --git a/sdk/monitor/azure-mgmt-monitor/generated_samples/enable_receiver.py b/sdk/monitor/azure-mgmt-monitor/generated_samples/enable_receiver.py new file mode 100644 index 000000000000..279b1f524c9f --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/generated_samples/enable_receiver.py @@ -0,0 +1,42 @@ +# 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 azure.identity import DefaultAzureCredential +from azure.mgmt.monitor import MonitorManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-monitor +# USAGE + python enable_receiver.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = MonitorManagementClient( + credential=DefaultAzureCredential(), + subscription_id="187f412d-1758-44d9-b052-169e2564721d", + ) + + response = client.action_groups.enable_receiver( + resource_group_name="Default-NotificationRules", + action_group_name="SampleActionGroup", + enable_request={"receiverName": "John Doe's mobile"}, + ) + print(response) + + +# x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2023-01-01/examples/enableReceiver.json +if __name__ == "__main__": + main() diff --git a/sdk/monitor/azure-mgmt-monitor/generated_samples/get_action_group.py b/sdk/monitor/azure-mgmt-monitor/generated_samples/get_action_group.py new file mode 100644 index 000000000000..39ea28de7e66 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/generated_samples/get_action_group.py @@ -0,0 +1,41 @@ +# 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 azure.identity import DefaultAzureCredential +from azure.mgmt.monitor import MonitorManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-monitor +# USAGE + python get_action_group.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = MonitorManagementClient( + credential=DefaultAzureCredential(), + subscription_id="187f412d-1758-44d9-b052-169e2564721d", + ) + + response = client.action_groups.get( + resource_group_name="Default-NotificationRules", + action_group_name="SampleActionGroup", + ) + print(response) + + +# x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2023-01-01/examples/getActionGroup.json +if __name__ == "__main__": + main() diff --git a/sdk/monitor/azure-mgmt-monitor/generated_samples/get_test_notifications_at_action_group_resource_level.py b/sdk/monitor/azure-mgmt-monitor/generated_samples/get_test_notifications_at_action_group_resource_level.py new file mode 100644 index 000000000000..639516f78e98 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/generated_samples/get_test_notifications_at_action_group_resource_level.py @@ -0,0 +1,42 @@ +# 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 azure.identity import DefaultAzureCredential +from azure.mgmt.monitor import MonitorManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-monitor +# USAGE + python get_test_notifications_at_action_group_resource_level.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = MonitorManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.action_groups.get_test_notifications_at_action_group_resource_level( + resource_group_name="TestRgName", + action_group_name="TestAgName", + notification_id="11000222191287", + ) + print(response) + + +# x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2023-01-01/examples/getTestNotificationsAtActionGroupResourceLevel.json +if __name__ == "__main__": + main() diff --git a/sdk/monitor/azure-mgmt-monitor/generated_samples/list_action_groups.py b/sdk/monitor/azure-mgmt-monitor/generated_samples/list_action_groups.py new file mode 100644 index 000000000000..b9a9276dd2eb --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/generated_samples/list_action_groups.py @@ -0,0 +1,39 @@ +# 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 azure.identity import DefaultAzureCredential +from azure.mgmt.monitor import MonitorManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-monitor +# USAGE + python list_action_groups.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = MonitorManagementClient( + credential=DefaultAzureCredential(), + subscription_id="187f412d-1758-44d9-b052-169e2564721d", + ) + + response = client.action_groups.list_by_subscription_id() + for item in response: + print(item) + + +# x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2023-01-01/examples/listActionGroups.json +if __name__ == "__main__": + main() diff --git a/sdk/monitor/azure-mgmt-monitor/generated_samples/patch_action_group.py b/sdk/monitor/azure-mgmt-monitor/generated_samples/patch_action_group.py new file mode 100644 index 000000000000..ab33a88347fe --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/generated_samples/patch_action_group.py @@ -0,0 +1,42 @@ +# 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 azure.identity import DefaultAzureCredential +from azure.mgmt.monitor import MonitorManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-monitor +# USAGE + python patch_action_group.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = MonitorManagementClient( + credential=DefaultAzureCredential(), + subscription_id="187f412d-1758-44d9-b052-169e2564721d", + ) + + response = client.action_groups.update( + resource_group_name="Default-NotificationRules", + action_group_name="SampleActionGroup", + action_group_patch={"properties": {"enabled": False}, "tags": {"key1": "value1", "key2": "value2"}}, + ) + print(response) + + +# x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2023-01-01/examples/patchActionGroup.json +if __name__ == "__main__": + main() diff --git a/sdk/monitor/azure-mgmt-monitor/generated_samples/post_test_notifications_at_action_group_resource_level.py b/sdk/monitor/azure-mgmt-monitor/generated_samples/post_test_notifications_at_action_group_resource_level.py new file mode 100644 index 000000000000..1653ae8ce3cc --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/generated_samples/post_test_notifications_at_action_group_resource_level.py @@ -0,0 +1,128 @@ +# 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 azure.identity import DefaultAzureCredential +from azure.mgmt.monitor import MonitorManagementClient + +""" +# PREREQUISITES + pip install azure-identity + pip install azure-mgmt-monitor +# USAGE + python post_test_notifications_at_action_group_resource_level.py + + Before run the sample, please set the values of the client ID, tenant ID and client secret + of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, + AZURE_CLIENT_SECRET. For more info about how to get the value, please see: + https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal +""" + + +def main(): + client = MonitorManagementClient( + credential=DefaultAzureCredential(), + subscription_id="11111111-1111-1111-1111-111111111111", + ) + + response = client.action_groups.begin_create_notifications_at_action_group_resource_level( + resource_group_name="TestRgName", + action_group_name="TestAgName", + notification_request={ + "alertType": "budget", + "armRoleReceivers": [ + { + "name": "ArmRole-Common", + "roleId": "11111111-1111-1111-1111-111111111111", + "useCommonAlertSchema": True, + }, + { + "name": "ArmRole-nonCommon", + "roleId": "11111111-1111-1111-1111-111111111111", + "useCommonAlertSchema": False, + }, + ], + "automationRunbookReceivers": [ + { + "automationAccountId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest", + "isGlobalRunbook": False, + "name": "testRunbook", + "runbookName": "Sample runbook", + "serviceUri": "http://test.me", + "useCommonAlertSchema": True, + "webhookResourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/runbookTest/providers/Microsoft.Automation/automationAccounts/runbooktest/webhooks/Alert1510184037084", + } + ], + "azureAppPushReceivers": [{"emailAddress": "johndoe@email.com", "name": "Sample azureAppPush"}], + "azureFunctionReceivers": [ + { + "functionAppResourceId": "/subscriptions/5def922a-3ed4-49c1-b9fd-05ec533819a3/resourceGroups/aznsTest/providers/Microsoft.Web/sites/testFunctionApp", + "functionName": "HttpTriggerCSharp1", + "httpTriggerUrl": "http://test.me", + "name": "Sample azureFunction", + "useCommonAlertSchema": True, + } + ], + "emailReceivers": [ + {"emailAddress": "johndoe@email.com", "name": "John Doe's email", "useCommonAlertSchema": False}, + {"emailAddress": "janesmith@email.com", "name": "Jane Smith's email", "useCommonAlertSchema": True}, + ], + "eventHubReceivers": [ + { + "eventHubName": "testEventHub", + "eventHubNameSpace": "testEventHubNameSpace", + "name": "Sample eventHub", + "subscriptionId": "187f412d-1758-44d9-b052-169e2564721d", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84", + } + ], + "itsmReceivers": [ + { + "connectionId": "a3b9076c-ce8e-434e-85b4-aff10cb3c8f1", + "name": "Sample itsm", + "region": "westcentralus", + "ticketConfiguration": '{"PayloadRevision":0,"WorkItemType":"Incident","UseTemplate":false,"WorkItemData":"{}","CreateOneWIPerCI":false}', + "workspaceId": "5def922a-3ed4-49c1-b9fd-05ec533819a3|55dfd1f8-7e59-4f89-bf56-4c82f5ace23c", + } + ], + "logicAppReceivers": [ + { + "callbackUrl": "https://prod-27.northcentralus.logic.azure.com/workflows/68e572e818e5457ba898763b7db90877/triggers/manual/paths/invoke/azns/test?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=Abpsb72UYJxPPvmDo937uzofupO5r_vIeWEx7KVHo7w", + "name": "Sample logicApp", + "resourceId": "/subscriptions/187f412d-1758-44d9-b052-169e2564721d/resourceGroups/LogicApp/providers/Microsoft.Logic/workflows/testLogicApp", + "useCommonAlertSchema": False, + } + ], + "smsReceivers": [ + {"countryCode": "1", "name": "John Doe's mobile", "phoneNumber": "1234567890"}, + {"countryCode": "1", "name": "Jane Smith's mobile", "phoneNumber": "0987654321"}, + ], + "voiceReceivers": [{"countryCode": "1", "name": "Sample voice", "phoneNumber": "1234567890"}], + "webhookReceivers": [ + { + "name": "Sample webhook 1", + "serviceUri": "http://www.example.com/webhook1", + "useCommonAlertSchema": True, + }, + { + "identifierUri": "http://someidentifier/d7811ba3-7996-4a93-99b6-6b2f3f355f8a", + "name": "Sample webhook 2", + "objectId": "d3bb868c-fe44-452c-aa26-769a6538c808", + "serviceUri": "http://www.example.com/webhook2", + "tenantId": "68a4459a-ccb8-493c-b9da-dd30457d1b84", + "useAadAuth": True, + "useCommonAlertSchema": True, + }, + ], + }, + ).result() + print(response) + + +# x-ms-original-file: specification/monitor/resource-manager/Microsoft.Insights/stable/2023-01-01/examples/postTestNotificationsAtActionGroupResourceLevel.json +if __name__ == "__main__": + main()