diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/README.md b/sdk/applicationinsights/azure-mgmt-applicationinsights/README.md index aa949c52302a0..1c68178e29d37 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/README.md +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/README.md @@ -1,30 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python -This is the Microsoft Azure Application Insights Management Client -Library. +This is the Microsoft Azure Application Insights Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. +For code examples, see [Application Insights Management](https://docs.microsoft.com/python/api/overview/azure/) +on docs.microsoft.com. -For a more complete set of Azure libraries, see the -[azure sdk python release](https://aka.ms/azsdk/python/all). -## Usage +# Provide Feedback -For code examples, see [Application Insights -Management](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-applicationinsights%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-applicationinsights%2FREADME.png) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_application_insights_management_client.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_application_insights_management_client.py index d2d1abb1bbf7c..a2ca7a5756a8c 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_application_insights_management_client.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/_application_insights_management_client.py @@ -65,7 +65,8 @@ class ApplicationInsightsManagementClient(MultiApiClientMixin, SDKClient): 'ea_subscription_rollback_to_legacy_pricing_model': '2017-10-01', 'export_configurations': '2015-05-01', 'favorites': '2015-05-01', - 'operations': '2015-05-01', + 'my_workbooks': '2015-05-01', + 'operations': '2019-09-01-preview', 'proactive_detection_configurations': '2018-05-01-preview', 'queries': '2019-09-01-preview', 'query_packs': '2019-09-01-preview', @@ -331,15 +332,31 @@ def favorites(self): raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def my_workbooks(self): + """Instance depends on the API version: + + * 2015-05-01: :class:`MyWorkbooksOperations` + """ + api_version = self._get_api_version('my_workbooks') + if api_version == '2015-05-01': + from .v2015_05_01.operations import MyWorkbooksOperations as OperationClass + else: + raise NotImplementedError("APIVersion {} is not available".format(api_version)) + return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def operations(self): """Instance depends on the API version: * 2015-05-01: :class:`Operations` + * 2019-09-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2015-05-01': from .v2015_05_01.operations import Operations as OperationClass + elif api_version == '2019-09-01-preview': + from .v2019_09_01_preview.operations import Operations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/_application_insights_management_client.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/_application_insights_management_client.py index 59e90899d578e..8d89657283ea0 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/_application_insights_management_client.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/_application_insights_management_client.py @@ -29,6 +29,7 @@ from .operations import WebTestsOperations from .operations import AnalyticsItemsOperations from .operations import WorkbooksOperations +from .operations import MyWorkbooksOperations from . import models @@ -70,6 +71,8 @@ class ApplicationInsightsManagementClient(SDKClient): :vartype analytics_items: azure.mgmt.applicationinsights.v2015_05_01.operations.AnalyticsItemsOperations :ivar workbooks: Workbooks operations :vartype workbooks: azure.mgmt.applicationinsights.v2015_05_01.operations.WorkbooksOperations + :ivar my_workbooks: MyWorkbooks operations + :vartype my_workbooks: azure.mgmt.applicationinsights.v2015_05_01.operations.MyWorkbooksOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -122,3 +125,5 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.workbooks = WorkbooksOperations( self._client, self.config, self._serialize, self._deserialize) + self.my_workbooks = MyWorkbooksOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/__init__.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/__init__.py index fa8f959cc5d86..6c6e1c4361480 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/__init__.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/__init__.py @@ -39,6 +39,9 @@ from ._models_py3 import ErrorResponse, ErrorResponseException from ._models_py3 import InnerError from ._models_py3 import LinkProperties + from ._models_py3 import MyWorkbook + from ._models_py3 import MyWorkbookError, MyWorkbookErrorException + from ._models_py3 import MyWorkbookResource from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import PrivateLinkScopedResource @@ -83,6 +86,9 @@ from ._models import ErrorResponse, ErrorResponseException from ._models import InnerError from ._models import LinkProperties + from ._models import MyWorkbook + from ._models import MyWorkbookError, MyWorkbookErrorException + from ._models import MyWorkbookResource from ._models import Operation from ._models import OperationDisplay from ._models import PrivateLinkScopedResource @@ -101,6 +107,7 @@ from ._paged_models import ApplicationInsightsComponentAPIKeyPaged from ._paged_models import ApplicationInsightsComponentPaged from ._paged_models import ApplicationInsightsComponentWebTestLocationPaged +from ._paged_models import MyWorkbookPaged from ._paged_models import OperationPaged from ._paged_models import WebTestPaged from ._paged_models import WorkbookPaged @@ -109,6 +116,7 @@ ApplicationType, FlowType, RequestSource, + IngestionMode, PurgeState, FavoriteType, WebTestKind, @@ -151,6 +159,9 @@ 'ErrorResponse', 'ErrorResponseException', 'InnerError', 'LinkProperties', + 'MyWorkbook', + 'MyWorkbookError', 'MyWorkbookErrorException', + 'MyWorkbookResource', 'Operation', 'OperationDisplay', 'PrivateLinkScopedResource', @@ -173,9 +184,11 @@ 'ApplicationInsightsComponentWebTestLocationPaged', 'WebTestPaged', 'WorkbookPaged', + 'MyWorkbookPaged', 'ApplicationType', 'FlowType', 'RequestSource', + 'IngestionMode', 'PurgeState', 'FavoriteType', 'WebTestKind', diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py index 1c2f9886c3020..bd218e36d5f12 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py @@ -28,6 +28,13 @@ class RequestSource(str, Enum): rest = "rest" +class IngestionMode(str, Enum): + + application_insights = "ApplicationInsights" + application_insights_with_diagnostic_settings = "ApplicationInsightsWithDiagnosticSettings" + log_analytics = "LogAnalytics" + + class PurgeState(str, Enum): pending = "pending" diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_models.py index 472d68d450316..68cfebc653bf0 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_models.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_models.py @@ -236,6 +236,12 @@ class ApplicationInsightsComponent(ComponentsResource): resources. :vartype private_link_scoped_resources: list[~azure.mgmt.applicationinsights.v2015_05_01.models.PrivateLinkScopedResource] + :param ingestion_mode: Indicates the flow of the ingestion. Possible + values include: 'ApplicationInsights', + 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default + value: "ApplicationInsights" . + :type ingestion_mode: str or + ~azure.mgmt.applicationinsights.v2015_05_01.models.IngestionMode """ _validation = { @@ -280,6 +286,7 @@ class ApplicationInsightsComponent(ComponentsResource): 'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'}, 'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'}, 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -302,6 +309,7 @@ def __init__(self, **kwargs): self.disable_ip_masking = kwargs.get('disable_ip_masking', None) self.immediate_purge_data_on30_days = kwargs.get('immediate_purge_data_on30_days', None) self.private_link_scoped_resources = None + self.ingestion_mode = kwargs.get('ingestion_mode', "ApplicationInsights") class ApplicationInsightsComponentAnalyticsItem(Model): @@ -1381,6 +1389,162 @@ def __init__(self, **kwargs): self.category = kwargs.get('category', None) +class MyWorkbookResource(Model): + """An azure resource object. + + :param id: Azure resource Id + :type id: str + :param name: Azure resource name + :type name: str + :param type: Azure resource type + :type type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(MyWorkbookResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class MyWorkbook(MyWorkbookResource): + """An Application Insights private workbook definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Azure resource Id + :type id: str + :param name: Azure resource name + :type name: str + :param type: Azure resource type + :type type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: The kind of workbook. Choices are user and shared. Possible + values include: 'user', 'shared' + :type kind: str or + ~azure.mgmt.applicationinsights.v2015_05_01.models.SharedTypeKind + :param display_name: Required. The user-defined name of the private + workbook. + :type display_name: str + :param serialized_data: Required. Configuration of this particular private + workbook. Configuration data is a string containing valid JSON + :type serialized_data: str + :param version: This instance's version of the data model. This can change + as new features are added that can be marked private workbook. + :type version: str + :ivar time_modified: Date and time in UTC of the last modification that + was made to this private workbook definition. + :vartype time_modified: str + :param category: Required. Workbook category, as defined by the user at + creation time. + :type category: str + :param my_workbook_tags: A list of 0 or more tags that are associated with + this private workbook definition + :type my_workbook_tags: list[str] + :ivar user_id: Unique user id of the specific user that owns this private + workbook. + :vartype user_id: str + :param source_id: Optional resourceId for a source resource. + :type source_id: str + """ + + _validation = { + 'display_name': {'required': True}, + 'serialized_data': {'required': True}, + 'time_modified': {'readonly': True}, + 'category': {'required': True}, + 'user_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'time_modified': {'key': 'properties.timeModified', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'my_workbook_tags': {'key': 'properties.tags', 'type': '[str]'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + 'source_id': {'key': 'properties.sourceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(MyWorkbook, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.display_name = kwargs.get('display_name', None) + self.serialized_data = kwargs.get('serialized_data', None) + self.version = kwargs.get('version', None) + self.time_modified = None + self.category = kwargs.get('category', None) + self.my_workbook_tags = kwargs.get('my_workbook_tags', None) + self.user_id = None + self.source_id = kwargs.get('source_id', None) + + +class MyWorkbookError(Model): + """Error message body that will indicate why the operation failed. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: + list[~azure.mgmt.applicationinsights.v2015_05_01.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, **kwargs): + super(MyWorkbookError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + + +class MyWorkbookErrorException(HttpOperationError): + """Server responsed with exception of type: 'MyWorkbookError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(MyWorkbookErrorException, self).__init__(deserialize, response, 'MyWorkbookError', *args) + + class Operation(Model): """CDN REST API operation. diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_models_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_models_py3.py index 9d4210e5ffd97..91cd926e2b111 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_models_py3.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_models_py3.py @@ -236,6 +236,12 @@ class ApplicationInsightsComponent(ComponentsResource): resources. :vartype private_link_scoped_resources: list[~azure.mgmt.applicationinsights.v2015_05_01.models.PrivateLinkScopedResource] + :param ingestion_mode: Indicates the flow of the ingestion. Possible + values include: 'ApplicationInsights', + 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default + value: "ApplicationInsights" . + :type ingestion_mode: str or + ~azure.mgmt.applicationinsights.v2015_05_01.models.IngestionMode """ _validation = { @@ -280,9 +286,10 @@ class ApplicationInsightsComponent(ComponentsResource): 'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'}, 'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'}, 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, + 'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'}, } - def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, ingestion_mode="ApplicationInsights", **kwargs) -> None: super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind self.application_id = None @@ -302,6 +309,7 @@ def __init__(self, *, location: str, kind: str, tags=None, application_type="web self.disable_ip_masking = disable_ip_masking self.immediate_purge_data_on30_days = immediate_purge_data_on30_days self.private_link_scoped_resources = None + self.ingestion_mode = ingestion_mode class ApplicationInsightsComponentAnalyticsItem(Model): @@ -1381,6 +1389,162 @@ def __init__(self, *, source_id: str=None, target_id: str=None, category: str=No self.category = category +class MyWorkbookResource(Model): + """An azure resource object. + + :param id: Azure resource Id + :type id: str + :param name: Azure resource name + :type name: str + :param type: Azure resource type + :type type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, id: str=None, name: str=None, type: str=None, location: str=None, tags=None, **kwargs) -> None: + super(MyWorkbookResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.location = location + self.tags = tags + + +class MyWorkbook(MyWorkbookResource): + """An Application Insights private workbook definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Azure resource Id + :type id: str + :param name: Azure resource name + :type name: str + :param type: Azure resource type + :type type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param kind: The kind of workbook. Choices are user and shared. Possible + values include: 'user', 'shared' + :type kind: str or + ~azure.mgmt.applicationinsights.v2015_05_01.models.SharedTypeKind + :param display_name: Required. The user-defined name of the private + workbook. + :type display_name: str + :param serialized_data: Required. Configuration of this particular private + workbook. Configuration data is a string containing valid JSON + :type serialized_data: str + :param version: This instance's version of the data model. This can change + as new features are added that can be marked private workbook. + :type version: str + :ivar time_modified: Date and time in UTC of the last modification that + was made to this private workbook definition. + :vartype time_modified: str + :param category: Required. Workbook category, as defined by the user at + creation time. + :type category: str + :param my_workbook_tags: A list of 0 or more tags that are associated with + this private workbook definition + :type my_workbook_tags: list[str] + :ivar user_id: Unique user id of the specific user that owns this private + workbook. + :vartype user_id: str + :param source_id: Optional resourceId for a source resource. + :type source_id: str + """ + + _validation = { + 'display_name': {'required': True}, + 'serialized_data': {'required': True}, + 'time_modified': {'readonly': True}, + 'category': {'required': True}, + 'user_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'time_modified': {'key': 'properties.timeModified', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'my_workbook_tags': {'key': 'properties.tags', 'type': '[str]'}, + 'user_id': {'key': 'properties.userId', 'type': 'str'}, + 'source_id': {'key': 'properties.sourceId', 'type': 'str'}, + } + + def __init__(self, *, display_name: str, serialized_data: str, category: str, id: str=None, name: str=None, type: str=None, location: str=None, tags=None, kind=None, version: str=None, my_workbook_tags=None, source_id: str=None, **kwargs) -> None: + super(MyWorkbook, self).__init__(id=id, name=name, type=type, location=location, tags=tags, **kwargs) + self.kind = kind + self.display_name = display_name + self.serialized_data = serialized_data + self.version = version + self.time_modified = None + self.category = category + self.my_workbook_tags = my_workbook_tags + self.user_id = None + self.source_id = source_id + + +class MyWorkbookError(Model): + """Error message body that will indicate why the operation failed. + + :param code: Service-defined error code. This code serves as a sub-status + for the HTTP error code specified in the response. + :type code: str + :param message: Human-readable representation of the error. + :type message: str + :param details: The list of invalid fields send in request, in case of + validation error. + :type details: + list[~azure.mgmt.applicationinsights.v2015_05_01.models.ErrorFieldContract] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorFieldContract]'}, + } + + def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None: + super(MyWorkbookError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + + +class MyWorkbookErrorException(HttpOperationError): + """Server responsed with exception of type: 'MyWorkbookError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(MyWorkbookErrorException, self).__init__(deserialize, response, 'MyWorkbookError', *args) + + class Operation(Model): """CDN REST API operation. diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_paged_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_paged_models.py index 17a42d8050fca..f7a178f46b43a 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_paged_models.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/models/_paged_models.py @@ -116,3 +116,16 @@ class WorkbookPaged(Paged): def __init__(self, *args, **kwargs): super(WorkbookPaged, self).__init__(*args, **kwargs) +class MyWorkbookPaged(Paged): + """ + A paging container for iterating over a list of :class:`MyWorkbook ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[MyWorkbook]'} + } + + def __init__(self, *args, **kwargs): + + super(MyWorkbookPaged, self).__init__(*args, **kwargs) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/__init__.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/__init__.py index 3bd2ec335a098..389748afed3cc 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/__init__.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/__init__.py @@ -25,6 +25,7 @@ from ._web_tests_operations import WebTestsOperations from ._analytics_items_operations import AnalyticsItemsOperations from ._workbooks_operations import WorkbooksOperations +from ._my_workbooks_operations import MyWorkbooksOperations __all__ = [ 'Operations', @@ -43,4 +44,5 @@ 'WebTestsOperations', 'AnalyticsItemsOperations', 'WorkbooksOperations', + 'MyWorkbooksOperations', ] diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/_my_workbooks_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/_my_workbooks_operations.py new file mode 100644 index 0000000000000..fb7a0386c2f3e --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/_my_workbooks_operations.py @@ -0,0 +1,463 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class MyWorkbooksOperations(object): + """MyWorkbooksOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-05-01" + + self.config = config + + def list_by_resource_group( + self, resource_group_name, category, tags=None, can_fetch_content=None, custom_headers=None, raw=False, **operation_config): + """Get all private workbooks defined within a specified resource group and + category. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param category: Category of workbook to return. Possible values + include: 'workbook', 'TSG', 'performance', 'retention' + :type category: str or + ~azure.mgmt.applicationinsights.v2015_05_01.models.CategoryType + :param tags: Tags presents on each workbook returned. + :type tags: list[str] + :param can_fetch_content: Flag indicating whether or not to return the + full content for each applicable workbook. If false, only return + summary content for workbooks. + :type can_fetch_content: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MyWorkbook + :rtype: + ~azure.mgmt.applicationinsights.v2015_05_01.models.MyWorkbookPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.MyWorkbook] + :raises: + :class:`MyWorkbookErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['category'] = self._serialize.query("category", category, 'str') + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',') + if can_fetch_content is not None: + query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MyWorkbookErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MyWorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks'} + + def list_by_subscription( + self, category, tags=None, can_fetch_content=None, custom_headers=None, raw=False, **operation_config): + """Get all private workbooks defined within a specified subscription and + category. + + :param category: Category of workbook to return. Possible values + include: 'workbook', 'TSG', 'performance', 'retention' + :type category: str or + ~azure.mgmt.applicationinsights.v2015_05_01.models.CategoryType + :param tags: Tags presents on each workbook returned. + :type tags: list[str] + :param can_fetch_content: Flag indicating whether or not to return the + full content for each applicable workbook. If false, only return + summary content for workbooks. + :type can_fetch_content: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of MyWorkbook + :rtype: + ~azure.mgmt.applicationinsights.v2015_05_01.models.MyWorkbookPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.MyWorkbook] + :raises: + :class:`MyWorkbookErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['category'] = self._serialize.query("category", category, 'str') + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',') + if can_fetch_content is not None: + query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MyWorkbookErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.MyWorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks'} + + def get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Get a single private workbook by its resourceName. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MyWorkbook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.v2015_05_01.models.MyWorkbook + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MyWorkbookErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MyWorkbookErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MyWorkbook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}'} + + def delete( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Delete a private workbook. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MyWorkbookErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 204]: + raise models.MyWorkbookErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}'} + + def create_or_update( + self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config): + """Create a new private workbook. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param workbook_properties: Properties that need to be specified to + create a new private workbook. + :type workbook_properties: + ~azure.mgmt.applicationinsights.v2015_05_01.models.MyWorkbook + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MyWorkbook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.v2015_05_01.models.MyWorkbook + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MyWorkbookErrorException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(workbook_properties, 'MyWorkbook') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.MyWorkbookErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MyWorkbook', response) + if response.status_code == 201: + deserialized = self._deserialize('MyWorkbook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}'} + + def update( + self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config): + """Updates a private workbook that has already been added. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param workbook_properties: Properties that need to be specified to + create a new private workbook. + :type workbook_properties: + ~azure.mgmt.applicationinsights.v2015_05_01.models.MyWorkbook + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MyWorkbook or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.applicationinsights.v2015_05_01.models.MyWorkbook + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`MyWorkbookErrorException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(workbook_properties, 'MyWorkbook') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.MyWorkbookErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MyWorkbook', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/_workbooks_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/_workbooks_operations.py index 48aee77b9de67..eec756ef14e6e 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/_workbooks_operations.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/operations/_workbooks_operations.py @@ -121,7 +121,7 @@ def internal_paging(next_link=None): deserialized = models.WorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks'} def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -183,7 +183,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} def delete( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -237,7 +237,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} def create_or_update( self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config): @@ -309,7 +309,7 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} def update( self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config): @@ -379,4 +379,4 @@ def update( return client_raw_response return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/__init__.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/__init__.py index ba5030f74719d..a7a170a5aee3b 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/__init__.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/__init__.py @@ -37,6 +37,7 @@ FlowType, RequestSource, PublicNetworkAccessType, + IngestionMode, PurgeState, ) @@ -56,5 +57,6 @@ 'FlowType', 'RequestSource', 'PublicNetworkAccessType', + 'IngestionMode', 'PurgeState', ] diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_application_insights_management_client_enums.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_application_insights_management_client_enums.py index cab8df5318db9..95991581077a1 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_application_insights_management_client_enums.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_application_insights_management_client_enums.py @@ -34,6 +34,13 @@ class PublicNetworkAccessType(str, Enum): disabled = "Disabled" #: Disables public connectivity to Application Insights through public DNS. +class IngestionMode(str, Enum): + + application_insights = "ApplicationInsights" + application_insights_with_diagnostic_settings = "ApplicationInsightsWithDiagnosticSettings" + log_analytics = "LogAnalytics" + + class PurgeState(str, Enum): pending = "pending" diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_models.py index 7d95273618e2d..fea34f3457d60 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_models.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_models.py @@ -146,6 +146,12 @@ class ApplicationInsightsComponent(ComponentsResource): 'Disabled'. Default value: "Enabled" . :type public_network_access_for_query: str or ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PublicNetworkAccessType + :param ingestion_mode: Indicates the flow of the ingestion. Possible + values include: 'ApplicationInsights', + 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default + value: "ApplicationInsights" . + :type ingestion_mode: str or + ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.IngestionMode """ _validation = { @@ -192,6 +198,7 @@ class ApplicationInsightsComponent(ComponentsResource): 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -216,6 +223,7 @@ def __init__(self, **kwargs): self.private_link_scoped_resources = None self.public_network_access_for_ingestion = kwargs.get('public_network_access_for_ingestion', "Enabled") self.public_network_access_for_query = kwargs.get('public_network_access_for_query', "Enabled") + self.ingestion_mode = kwargs.get('ingestion_mode', "ApplicationInsights") class ApplicationInsightsComponentProactiveDetectionConfiguration(Model): diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_models_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_models_py3.py index ce015182f99d6..aff00d00ee4df 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_models_py3.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_05_01_preview/models/_models_py3.py @@ -146,6 +146,12 @@ class ApplicationInsightsComponent(ComponentsResource): 'Disabled'. Default value: "Enabled" . :type public_network_access_for_query: str or ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PublicNetworkAccessType + :param ingestion_mode: Indicates the flow of the ingestion. Possible + values include: 'ApplicationInsights', + 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default + value: "ApplicationInsights" . + :type ingestion_mode: str or + ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.IngestionMode """ _validation = { @@ -192,9 +198,10 @@ class ApplicationInsightsComponent(ComponentsResource): 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'}, } - def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, public_network_access_for_ingestion="Enabled", public_network_access_for_query="Enabled", **kwargs) -> None: + def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, public_network_access_for_ingestion="Enabled", public_network_access_for_query="Enabled", ingestion_mode="ApplicationInsights", **kwargs) -> None: super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind self.application_id = None @@ -216,6 +223,7 @@ def __init__(self, *, location: str, kind: str, tags=None, application_type="web self.private_link_scoped_resources = None self.public_network_access_for_ingestion = public_network_access_for_ingestion self.public_network_access_for_query = public_network_access_for_query + self.ingestion_mode = ingestion_mode class ApplicationInsightsComponentProactiveDetectionConfiguration(Model): diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/_models.py index a1c4569785959..396a912fcc5ab 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/_models.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/_models.py @@ -136,9 +136,11 @@ class Workbook(Resource): :param workbook_tags: A list of 0 or more tags that are associated with this workbook definition :type workbook_tags: list[str] - :param user_id: Required. Unique user id of the specific user that owns - this workbook. - :type user_id: str + :ivar user_id: Unique user id of the specific user that owns this + workbook. + :vartype user_id: str + :param source_id: ResourceId for a source resource. + :type source_id: str """ _validation = { @@ -150,7 +152,7 @@ class Workbook(Resource): 'serialized_data': {'required': True}, 'time_modified': {'readonly': True}, 'category': {'required': True}, - 'user_id': {'required': True}, + 'user_id': {'readonly': True}, } _attribute_map = { @@ -167,6 +169,7 @@ class Workbook(Resource): 'version': {'key': 'properties.version', 'type': 'str'}, 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'}, 'user_id': {'key': 'properties.userId', 'type': 'str'}, + 'source_id': {'key': 'properties.sourceId', 'type': 'str'}, } def __init__(self, **kwargs): @@ -177,7 +180,8 @@ def __init__(self, **kwargs): self.category = kwargs.get('category', None) self.version = kwargs.get('version', None) self.workbook_tags = kwargs.get('workbook_tags', None) - self.user_id = kwargs.get('user_id', None) + self.user_id = None + self.source_id = kwargs.get('source_id', None) class WorkbookError(Model): diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/_models_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/_models_py3.py index 59055e5e8005b..1ada400a9881e 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/_models_py3.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/models/_models_py3.py @@ -136,9 +136,11 @@ class Workbook(Resource): :param workbook_tags: A list of 0 or more tags that are associated with this workbook definition :type workbook_tags: list[str] - :param user_id: Required. Unique user id of the specific user that owns - this workbook. - :type user_id: str + :ivar user_id: Unique user id of the specific user that owns this + workbook. + :vartype user_id: str + :param source_id: ResourceId for a source resource. + :type source_id: str """ _validation = { @@ -150,7 +152,7 @@ class Workbook(Resource): 'serialized_data': {'required': True}, 'time_modified': {'readonly': True}, 'category': {'required': True}, - 'user_id': {'required': True}, + 'user_id': {'readonly': True}, } _attribute_map = { @@ -167,9 +169,10 @@ class Workbook(Resource): 'version': {'key': 'properties.version', 'type': 'str'}, 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'}, 'user_id': {'key': 'properties.userId', 'type': 'str'}, + 'source_id': {'key': 'properties.sourceId', 'type': 'str'}, } - def __init__(self, *, location: str, display_name: str, serialized_data: str, category: str, user_id: str, kind=None, tags=None, version: str=None, workbook_tags=None, **kwargs) -> None: + def __init__(self, *, location: str, display_name: str, serialized_data: str, category: str, kind=None, tags=None, version: str=None, workbook_tags=None, source_id: str=None, **kwargs) -> None: super(Workbook, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.display_name = display_name self.serialized_data = serialized_data @@ -177,7 +180,8 @@ def __init__(self, *, location: str, display_name: str, serialized_data: str, ca self.category = category self.version = version self.workbook_tags = workbook_tags - self.user_id = user_id + self.user_id = None + self.source_id = source_id class WorkbookError(Model): diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/operations/_workbooks_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/operations/_workbooks_operations.py index 18e678e06030a..33b4df62a4693 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/operations/_workbooks_operations.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2018_06_17_preview/operations/_workbooks_operations.py @@ -125,7 +125,7 @@ def internal_paging(next_link=None): deserialized = models.WorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks'} def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -188,7 +188,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} def delete( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -242,7 +242,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} def create_or_update( self, resource_group_name, resource_name, source_id, workbook_properties, custom_headers=None, raw=False, **operation_config): @@ -319,7 +319,7 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} def update( self, resource_group_name, resource_name, source_id, workbook_update_parameters=None, custom_headers=None, raw=False, **operation_config): @@ -397,4 +397,4 @@ def update( return client_raw_response return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/_application_insights_management_client.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/_application_insights_management_client.py index 97b6838e03ded..aa42278d5497a 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/_application_insights_management_client.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/_application_insights_management_client.py @@ -14,6 +14,7 @@ from ._configuration import ApplicationInsightsManagementClientConfiguration from .operations import QueriesOperations +from .operations import Operations from .operations import QueryPacksOperations from . import models @@ -26,6 +27,8 @@ class ApplicationInsightsManagementClient(SDKClient): :ivar queries: Queries operations :vartype queries: azure.mgmt.applicationinsights.v2019_09_01_preview.operations.QueriesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.applicationinsights.v2019_09_01_preview.operations.Operations :ivar query_packs: QueryPacks operations :vartype query_packs: azure.mgmt.applicationinsights.v2019_09_01_preview.operations.QueryPacksOperations @@ -50,5 +53,7 @@ def __init__( self.queries = QueriesOperations( self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) self.query_packs = QueryPacksOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/__init__.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/__init__.py index 1295c33096a1d..b6c4e74a07655 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/__init__.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/__init__.py @@ -11,31 +11,58 @@ try: from ._models_py3 import AzureResourceProperties + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorInfo from ._models_py3 import ErrorResponse, ErrorResponseException from ._models_py3 import LogAnalyticsQueryPack from ._models_py3 import LogAnalyticsQueryPackQuery + from ._models_py3 import LogAnalyticsQueryPackQueryPropertiesRelated from ._models_py3 import LogAnalyticsQueryPackQuerySearchProperties + from ._models_py3 import LogAnalyticsQueryPackQuerySearchPropertiesRelated + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay from ._models_py3 import QueryPacksResource + from ._models_py3 import SystemData from ._models_py3 import TagsResource except (SyntaxError, ImportError): from ._models import AzureResourceProperties + from ._models import ErrorDetail + from ._models import ErrorInfo from ._models import ErrorResponse, ErrorResponseException from ._models import LogAnalyticsQueryPack from ._models import LogAnalyticsQueryPackQuery + from ._models import LogAnalyticsQueryPackQueryPropertiesRelated from ._models import LogAnalyticsQueryPackQuerySearchProperties + from ._models import LogAnalyticsQueryPackQuerySearchPropertiesRelated + from ._models import Operation + from ._models import OperationDisplay from ._models import QueryPacksResource + from ._models import SystemData from ._models import TagsResource from ._paged_models import LogAnalyticsQueryPackPaged from ._paged_models import LogAnalyticsQueryPackQueryPaged +from ._paged_models import OperationPaged +from ._application_insights_management_client_enums import ( + IdentityType, +) __all__ = [ 'AzureResourceProperties', + 'ErrorDetail', + 'ErrorInfo', 'ErrorResponse', 'ErrorResponseException', 'LogAnalyticsQueryPack', 'LogAnalyticsQueryPackQuery', + 'LogAnalyticsQueryPackQueryPropertiesRelated', 'LogAnalyticsQueryPackQuerySearchProperties', + 'LogAnalyticsQueryPackQuerySearchPropertiesRelated', + 'Operation', + 'OperationDisplay', 'QueryPacksResource', + 'SystemData', 'TagsResource', 'LogAnalyticsQueryPackQueryPaged', + 'OperationPaged', 'LogAnalyticsQueryPackPaged', + 'IdentityType', ] diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_application_insights_management_client_enums.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_application_insights_management_client_enums.py new file mode 100644 index 0000000000000..5f2275cc383c4 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_application_insights_management_client_enums.py @@ -0,0 +1,20 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class IdentityType(str, Enum): + + user = "user" + application = "application" + managed_identity = "managedIdentity" + key = "key" diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_models.py index 411eceadf4d4b..00836198f83aa 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_models.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_models.py @@ -25,18 +25,23 @@ class AzureResourceProperties(Model): :vartype name: str :ivar type: Azure resource type :vartype type: str + :ivar system_data: Read only system data + :vartype system_data: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): @@ -44,6 +49,7 @@ def __init__(self, **kwargs): self.id = None self.name = None self.type = None + self.system_data = None class CloudError(Model): @@ -54,24 +60,110 @@ class CloudError(Model): } -class ErrorResponse(Model): - """Describe the format of an Error response. +class ErrorDetail(Model): + """Error details. + + All required parameters must be populated in order to send to Azure. - :param code: Error code + :param code: Required. The error's code. :type code: str - :param message: Error message indicating why the operation failed. + :param message: Required. A human readable error message. :type message: str + :param target: Indicates which property in the request is responsible for + the error. + :type target: str + :param value: Indicates which value in 'target' is responsible for the + error. + :type value: str + :param resources: Indicates resources which were responsible for the + error. + :type resources: list[str] + :param additional_properties: Additional properties that can be provided + on the error details object + :type additional_properties: object """ + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, } def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.value = kwargs.get('value', None) + self.resources = kwargs.get('resources', None) + self.additional_properties = kwargs.get('additional_properties', None) + + +class ErrorInfo(Model): + """The code and message for an error. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. A machine readable error code. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param details: error details. + :type details: + list[~azure.mgmt.applicationinsights.v2019_09_01_preview.models.ErrorDetail] + :param innererror: Inner error details if they exist. + :type innererror: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.ErrorInfo + :param additional_properties: Additional properties that can be provided + on the error info object + :type additional_properties: object + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'innererror': {'key': 'innererror', 'type': 'ErrorInfo'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ErrorInfo, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.details = kwargs.get('details', None) + self.innererror = kwargs.get('innererror', None) + self.additional_properties = kwargs.get('additional_properties', None) + + +class ErrorResponse(Model): + """Describe the format of an Error response. + + :param error: The error details. + :type error: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.ErrorInfo + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorInfo'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ErrorResponseException(HttpOperationError): @@ -209,9 +301,12 @@ class LogAnalyticsQueryPackQuery(AzureResourceProperties): :vartype name: str :ivar type: Azure resource type :vartype type: str - :ivar query_id: The unique ID of your application. This field cannot be - changed. - :vartype query_id: str + :ivar system_data: Read only system data + :vartype system_data: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.SystemData + :ivar log_analytics_query_pack_query_id: The unique ID of your + application. This field cannot be changed. + :vartype log_analytics_query_pack_query_id: str :param display_name: Required. Unique display name for your query within the Query Pack. :type display_name: str @@ -227,21 +322,21 @@ class LogAnalyticsQueryPackQuery(AzureResourceProperties): :type description: str :param body: Required. Body of the query. :type body: str - :param linked_resource_id: Resource id associated with the query. - :type linked_resource_id: str - :param categories: Categories associated with the query. - :type categories: list[str] - :param resource_types: Resource Types associated with the query. - :type resource_types: list[str] - :param labels: Labels associated with the query. - :type labels: list[str] + :param related: The related metadata items for the function. + :type related: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQueryPropertiesRelated + :param tags: Tags associated with the query. + :type tags: dict[str, list[str]] + :param properties: Additional properties that can be set for the query. + :type properties: object """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'query_id': {'readonly': True}, + 'system_data': {'readonly': True}, + 'log_analytics_query_pack_query_id': {'readonly': True}, 'display_name': {'required': True}, 'time_created': {'readonly': True}, 'time_modified': {'readonly': True}, @@ -253,56 +348,200 @@ class LogAnalyticsQueryPackQuery(AzureResourceProperties): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'log_analytics_query_pack_query_id': {'key': 'properties.id', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, 'time_modified': {'key': 'properties.timeModified', 'type': 'iso-8601'}, 'author': {'key': 'properties.author', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'body': {'key': 'properties.body', 'type': 'str'}, - 'linked_resource_id': {'key': 'properties.linkedResourceId', 'type': 'str'}, - 'categories': {'key': 'properties.categories', 'type': '[str]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[str]'}, - 'labels': {'key': 'properties.labels', 'type': '[str]'}, + 'related': {'key': 'properties.related', 'type': 'LogAnalyticsQueryPackQueryPropertiesRelated'}, + 'tags': {'key': 'properties.tags', 'type': '{[str]}'}, + 'properties': {'key': 'properties.properties', 'type': 'object'}, } def __init__(self, **kwargs): super(LogAnalyticsQueryPackQuery, self).__init__(**kwargs) - self.query_id = None + self.log_analytics_query_pack_query_id = None self.display_name = kwargs.get('display_name', None) self.time_created = None self.time_modified = None self.author = None self.description = kwargs.get('description', None) self.body = kwargs.get('body', None) - self.linked_resource_id = kwargs.get('linked_resource_id', None) + self.related = kwargs.get('related', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + + +class LogAnalyticsQueryPackQueryPropertiesRelated(Model): + """The related metadata items for the function. + + :param categories: The related categories for the function. + :type categories: list[str] + :param resource_types: The related resource types for the function. + :type resource_types: list[str] + :param solutions: The related Log Analytics solutions for the function. + :type solutions: list[str] + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[str]'}, + 'resource_types': {'key': 'resourceTypes', 'type': '[str]'}, + 'solutions': {'key': 'solutions', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsQueryPackQueryPropertiesRelated, self).__init__(**kwargs) self.categories = kwargs.get('categories', None) self.resource_types = kwargs.get('resource_types', None) - self.labels = kwargs.get('labels', None) + self.solutions = kwargs.get('solutions', None) class LogAnalyticsQueryPackQuerySearchProperties(Model): """Properties that define an Log Analytics QueryPack-Query search properties. - :param categories: Categories associated with the query. + :param related: The related metadata items for the function. + :type related: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuerySearchPropertiesRelated + :param tags: Tags associated with the query. + :type tags: dict[str, list[str]] + """ + + _attribute_map = { + 'related': {'key': 'related', 'type': 'LogAnalyticsQueryPackQuerySearchPropertiesRelated'}, + 'tags': {'key': 'tags', 'type': '{[str]}'}, + } + + def __init__(self, **kwargs): + super(LogAnalyticsQueryPackQuerySearchProperties, self).__init__(**kwargs) + self.related = kwargs.get('related', None) + self.tags = kwargs.get('tags', None) + + +class LogAnalyticsQueryPackQuerySearchPropertiesRelated(Model): + """The related metadata items for the function. + + :param categories: The related categories for the function. :type categories: list[str] - :param resource_types: Resource Types associated with the query. + :param resource_types: The related resource types for the function. :type resource_types: list[str] - :param labels: Labels associated with the query. - :type labels: list[str] + :param solutions: The related Log Analytics solutions for the function. + :type solutions: list[str] """ _attribute_map = { 'categories': {'key': 'categories', 'type': '[str]'}, 'resource_types': {'key': 'resourceTypes', 'type': '[str]'}, - 'labels': {'key': 'labels', 'type': '[str]'}, + 'solutions': {'key': 'solutions', 'type': '[str]'}, } def __init__(self, **kwargs): - super(LogAnalyticsQueryPackQuerySearchProperties, self).__init__(**kwargs) + super(LogAnalyticsQueryPackQuerySearchPropertiesRelated, self).__init__(**kwargs) self.categories = kwargs.get('categories', None) self.resource_types = kwargs.get('resource_types', None) - self.labels = kwargs.get('labels', None) + self.solutions = kwargs.get('solutions', None) + + +class Operation(Model): + """CDN REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool + :param display: Display of the operation + :type display: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.OperationDisplay + :param origin: Origin of the operation + :type origin: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + + +class OperationDisplay(Model): + """Operation display payload. + + :param provider: Resource provider of the operation + :type provider: str + :param resource: Resource of the operation + :type resource: str + :param operation: Localized friendly name for the operation + :type operation: str + :param description: Localized friendly description for the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class SystemData(Model): + """Read only system data. + + :param created_by: An identifier for the identity that created the + resource + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'user', 'application', 'managedIdentity', 'key' + :type created_by_type: str or + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.IdentityType + :param created_at: The timestamp of resource creation (UTC) + :type created_at: datetime + :param last_modified_by: An identifier for the identity that last modified + the resource + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'user', 'application', + 'managedIdentity', 'key' + :type last_modified_by_type: str or + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.IdentityType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, **kwargs): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) class TagsResource(Model): diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_models_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_models_py3.py index 53951bc79d154..0d5fa2de6b00e 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_models_py3.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_models_py3.py @@ -25,18 +25,23 @@ class AzureResourceProperties(Model): :vartype name: str :ivar type: Azure resource type :vartype type: str + :ivar system_data: Read only system data + :vartype system_data: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs) -> None: @@ -44,6 +49,7 @@ def __init__(self, **kwargs) -> None: self.id = None self.name = None self.type = None + self.system_data = None class CloudError(Model): @@ -54,24 +60,110 @@ class CloudError(Model): } -class ErrorResponse(Model): - """Describe the format of an Error response. +class ErrorDetail(Model): + """Error details. + + All required parameters must be populated in order to send to Azure. - :param code: Error code + :param code: Required. The error's code. :type code: str - :param message: Error message indicating why the operation failed. + :param message: Required. A human readable error message. :type message: str + :param target: Indicates which property in the request is responsible for + the error. + :type target: str + :param value: Indicates which value in 'target' is responsible for the + error. + :type value: str + :param resources: Indicates resources which were responsible for the + error. + :type resources: list[str] + :param additional_properties: Additional properties that can be provided + on the error details object + :type additional_properties: object """ + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'resources': {'key': 'resources', 'type': '[str]'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, } - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) + def __init__(self, *, code: str, message: str, target: str=None, value: str=None, resources=None, additional_properties=None, **kwargs) -> None: + super(ErrorDetail, self).__init__(**kwargs) self.code = code self.message = message + self.target = target + self.value = value + self.resources = resources + self.additional_properties = additional_properties + + +class ErrorInfo(Model): + """The code and message for an error. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. A machine readable error code. + :type code: str + :param message: Required. A human readable error message. + :type message: str + :param details: error details. + :type details: + list[~azure.mgmt.applicationinsights.v2019_09_01_preview.models.ErrorDetail] + :param innererror: Inner error details if they exist. + :type innererror: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.ErrorInfo + :param additional_properties: Additional properties that can be provided + on the error info object + :type additional_properties: object + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'innererror': {'key': 'innererror', 'type': 'ErrorInfo'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, + } + + def __init__(self, *, code: str, message: str, details=None, innererror=None, additional_properties=None, **kwargs) -> None: + super(ErrorInfo, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + self.innererror = innererror + self.additional_properties = additional_properties + + +class ErrorResponse(Model): + """Describe the format of an Error response. + + :param error: The error details. + :type error: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.ErrorInfo + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorInfo'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.error = error class ErrorResponseException(HttpOperationError): @@ -209,9 +301,12 @@ class LogAnalyticsQueryPackQuery(AzureResourceProperties): :vartype name: str :ivar type: Azure resource type :vartype type: str - :ivar query_id: The unique ID of your application. This field cannot be - changed. - :vartype query_id: str + :ivar system_data: Read only system data + :vartype system_data: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.SystemData + :ivar log_analytics_query_pack_query_id: The unique ID of your + application. This field cannot be changed. + :vartype log_analytics_query_pack_query_id: str :param display_name: Required. Unique display name for your query within the Query Pack. :type display_name: str @@ -227,21 +322,21 @@ class LogAnalyticsQueryPackQuery(AzureResourceProperties): :type description: str :param body: Required. Body of the query. :type body: str - :param linked_resource_id: Resource id associated with the query. - :type linked_resource_id: str - :param categories: Categories associated with the query. - :type categories: list[str] - :param resource_types: Resource Types associated with the query. - :type resource_types: list[str] - :param labels: Labels associated with the query. - :type labels: list[str] + :param related: The related metadata items for the function. + :type related: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQueryPropertiesRelated + :param tags: Tags associated with the query. + :type tags: dict[str, list[str]] + :param properties: Additional properties that can be set for the query. + :type properties: object """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'query_id': {'readonly': True}, + 'system_data': {'readonly': True}, + 'log_analytics_query_pack_query_id': {'readonly': True}, 'display_name': {'required': True}, 'time_created': {'readonly': True}, 'time_modified': {'readonly': True}, @@ -253,56 +348,200 @@ class LogAnalyticsQueryPackQuery(AzureResourceProperties): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'query_id': {'key': 'properties.queryId', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'log_analytics_query_pack_query_id': {'key': 'properties.id', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, 'time_modified': {'key': 'properties.timeModified', 'type': 'iso-8601'}, 'author': {'key': 'properties.author', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'body': {'key': 'properties.body', 'type': 'str'}, - 'linked_resource_id': {'key': 'properties.linkedResourceId', 'type': 'str'}, - 'categories': {'key': 'properties.categories', 'type': '[str]'}, - 'resource_types': {'key': 'properties.resourceTypes', 'type': '[str]'}, - 'labels': {'key': 'properties.labels', 'type': '[str]'}, + 'related': {'key': 'properties.related', 'type': 'LogAnalyticsQueryPackQueryPropertiesRelated'}, + 'tags': {'key': 'properties.tags', 'type': '{[str]}'}, + 'properties': {'key': 'properties.properties', 'type': 'object'}, } - def __init__(self, *, display_name: str, body: str, description: str=None, linked_resource_id: str=None, categories=None, resource_types=None, labels=None, **kwargs) -> None: + def __init__(self, *, display_name: str, body: str, description: str=None, related=None, tags=None, properties=None, **kwargs) -> None: super(LogAnalyticsQueryPackQuery, self).__init__(**kwargs) - self.query_id = None + self.log_analytics_query_pack_query_id = None self.display_name = display_name self.time_created = None self.time_modified = None self.author = None self.description = description self.body = body - self.linked_resource_id = linked_resource_id + self.related = related + self.tags = tags + self.properties = properties + + +class LogAnalyticsQueryPackQueryPropertiesRelated(Model): + """The related metadata items for the function. + + :param categories: The related categories for the function. + :type categories: list[str] + :param resource_types: The related resource types for the function. + :type resource_types: list[str] + :param solutions: The related Log Analytics solutions for the function. + :type solutions: list[str] + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[str]'}, + 'resource_types': {'key': 'resourceTypes', 'type': '[str]'}, + 'solutions': {'key': 'solutions', 'type': '[str]'}, + } + + def __init__(self, *, categories=None, resource_types=None, solutions=None, **kwargs) -> None: + super(LogAnalyticsQueryPackQueryPropertiesRelated, self).__init__(**kwargs) self.categories = categories self.resource_types = resource_types - self.labels = labels + self.solutions = solutions class LogAnalyticsQueryPackQuerySearchProperties(Model): """Properties that define an Log Analytics QueryPack-Query search properties. - :param categories: Categories associated with the query. + :param related: The related metadata items for the function. + :type related: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuerySearchPropertiesRelated + :param tags: Tags associated with the query. + :type tags: dict[str, list[str]] + """ + + _attribute_map = { + 'related': {'key': 'related', 'type': 'LogAnalyticsQueryPackQuerySearchPropertiesRelated'}, + 'tags': {'key': 'tags', 'type': '{[str]}'}, + } + + def __init__(self, *, related=None, tags=None, **kwargs) -> None: + super(LogAnalyticsQueryPackQuerySearchProperties, self).__init__(**kwargs) + self.related = related + self.tags = tags + + +class LogAnalyticsQueryPackQuerySearchPropertiesRelated(Model): + """The related metadata items for the function. + + :param categories: The related categories for the function. :type categories: list[str] - :param resource_types: Resource Types associated with the query. + :param resource_types: The related resource types for the function. :type resource_types: list[str] - :param labels: Labels associated with the query. - :type labels: list[str] + :param solutions: The related Log Analytics solutions for the function. + :type solutions: list[str] """ _attribute_map = { 'categories': {'key': 'categories', 'type': '[str]'}, 'resource_types': {'key': 'resourceTypes', 'type': '[str]'}, - 'labels': {'key': 'labels', 'type': '[str]'}, + 'solutions': {'key': 'solutions', 'type': '[str]'}, } - def __init__(self, *, categories=None, resource_types=None, labels=None, **kwargs) -> None: - super(LogAnalyticsQueryPackQuerySearchProperties, self).__init__(**kwargs) + def __init__(self, *, categories=None, resource_types=None, solutions=None, **kwargs) -> None: + super(LogAnalyticsQueryPackQuerySearchPropertiesRelated, self).__init__(**kwargs) self.categories = categories self.resource_types = resource_types - self.labels = labels + self.solutions = solutions + + +class Operation(Model): + """CDN REST API operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool + :param display: Display of the operation + :type display: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.OperationDisplay + :param origin: Origin of the operation + :type origin: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, is_data_action: bool=None, display=None, origin: str=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.is_data_action = is_data_action + self.display = display + self.origin = origin + + +class OperationDisplay(Model): + """Operation display payload. + + :param provider: Resource provider of the operation + :type provider: str + :param resource: Resource of the operation + :type resource: str + :param operation: Localized friendly name for the operation + :type operation: str + :param description: Localized friendly description for the operation + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class SystemData(Model): + """Read only system data. + + :param created_by: An identifier for the identity that created the + resource + :type created_by: str + :param created_by_type: The type of identity that created the resource. + Possible values include: 'user', 'application', 'managedIdentity', 'key' + :type created_by_type: str or + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.IdentityType + :param created_at: The timestamp of resource creation (UTC) + :type created_at: datetime + :param last_modified_by: An identifier for the identity that last modified + the resource + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. Possible values include: 'user', 'application', + 'managedIdentity', 'key' + :type last_modified_by_type: str or + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.IdentityType + :param last_modified_at: The timestamp of resource last modification (UTC) + :type last_modified_at: datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__(self, *, created_by: str=None, created_by_type=None, created_at=None, last_modified_by: str=None, last_modified_by_type=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at class TagsResource(Model): diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_paged_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_paged_models.py index aa3deeaa63316..e40109f265ac1 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_paged_models.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/models/_paged_models.py @@ -25,6 +25,19 @@ class LogAnalyticsQueryPackQueryPaged(Paged): def __init__(self, *args, **kwargs): super(LogAnalyticsQueryPackQueryPaged, self).__init__(*args, **kwargs) +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) class LogAnalyticsQueryPackPaged(Paged): """ A paging container for iterating over a list of :class:`LogAnalyticsQueryPack ` object diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/__init__.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/__init__.py index d7a4805c2c63a..67e1a685617e1 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/__init__.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/__init__.py @@ -10,9 +10,11 @@ # -------------------------------------------------------------------------- from ._queries_operations import QueriesOperations +from ._operations import Operations from ._query_packs_operations import QueryPacksOperations __all__ = [ 'QueriesOperations', + 'Operations', 'QueryPacksOperations', ] diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_operations.py new file mode 100644 index 0000000000000..eabb67d077848 --- /dev/null +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_operations.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-09-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available insights REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.OperationPaged[~azure.mgmt.applicationinsights.v2019_09_01_preview.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Insights/operations'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_queries_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_queries_operations.py index cc037bf33babc..4f95008fcd899 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_queries_operations.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_queries_operations.py @@ -123,10 +123,10 @@ def internal_paging(next_link=None): deserialized = models.LogAnalyticsQueryPackQueryPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}/queries'} def search( - self, resource_group_name, query_pack_name, query_search_properties, top=None, include_body=None, skip_token=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, query_pack_name, top=None, include_body=None, skip_token=None, related=None, tags=None, custom_headers=None, raw=False, **operation_config): """Search a list of Queries defined within a Log Analytics QueryPack according to given search properties. @@ -136,10 +136,6 @@ def search( :param query_pack_name: The name of the Log Analytics QueryPack resource. :type query_pack_name: str - :param query_search_properties: Properties by which to search queries - in the given Log Analytics QueryPack. - :type query_search_properties: - ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuerySearchProperties :param top: Maximum items returned in page. :type top: int :param include_body: Flag indicating whether or not to return the body @@ -148,6 +144,11 @@ def search( :param skip_token: Base64 encoded token used to fetch the next page of items. Default is null. :type skip_token: str + :param related: The related metadata items for the function. + :type related: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuerySearchPropertiesRelated + :param tags: Tags associated with the query. + :type tags: dict[str, list[str]] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -159,6 +160,8 @@ def search( :raises: :class:`ErrorResponseException` """ + query_search_properties = models.LogAnalyticsQueryPackQuerySearchProperties(related=related, tags=tags) + def prepare_request(next_link=None): if not next_link: # Construct URL @@ -219,10 +222,10 @@ def internal_paging(next_link=None): deserialized = models.LogAnalyticsQueryPackQueryPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - search.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/search'} + search.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}/queries/search'} def get( - self, resource_group_name, query_pack_name, query_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, query_pack_name, id, custom_headers=None, raw=False, **operation_config): """Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. @@ -232,9 +235,9 @@ def get( :param query_pack_name: The name of the Log Analytics QueryPack resource. :type query_pack_name: str - :param query_id: The id of a specific query defined in the Log - Analytics QueryPack - :type query_id: str + :param id: The id of a specific query defined in the Log Analytics + QueryPack + :type id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -253,7 +256,7 @@ def get( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str'), - 'queryId': self._serialize.url("query_id", query_id, 'str') + 'id': self._serialize.url("id", id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -287,10 +290,10 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/{queryId}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}/queries/{id}'} def put( - self, resource_group_name, query_pack_name, query_id, query_payload, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, query_pack_name, id, query_payload, custom_headers=None, raw=False, **operation_config): """Adds or Updates a specific Query within a Log Analytics QueryPack. :param resource_group_name: The name of the resource group. The name @@ -299,9 +302,9 @@ def put( :param query_pack_name: The name of the Log Analytics QueryPack resource. :type query_pack_name: str - :param query_id: The id of a specific query defined in the Log - Analytics QueryPack - :type query_id: str + :param id: The id of a specific query defined in the Log Analytics + QueryPack + :type id: str :param query_payload: Properties that need to be specified to create a new query and add it to a Log Analytics QueryPack. :type query_payload: @@ -324,7 +327,7 @@ def put( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str'), - 'queryId': self._serialize.url("query_id", query_id, 'str') + 'id': self._serialize.url("id", id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -362,10 +365,85 @@ def put( return client_raw_response return deserialized - put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/{queryId}'} + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}/queries/{id}'} + + def update( + self, resource_group_name, query_pack_name, id, query_payload, custom_headers=None, raw=False, **operation_config): + """Adds or Updates a specific Query within a Log Analytics QueryPack. + + :param resource_group_name: The name of the resource group. The name + is case insensitive. + :type resource_group_name: str + :param query_pack_name: The name of the Log Analytics QueryPack + resource. + :type query_pack_name: str + :param id: The id of a specific query defined in the Log Analytics + QueryPack + :type id: str + :param query_payload: Properties that need to be specified to create a + new query and add it to a Log Analytics QueryPack. + :type query_payload: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuery + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: LogAnalyticsQueryPackQuery or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuery + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str'), + 'id': self._serialize.url("id", id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(query_payload, 'LogAnalyticsQueryPackQuery') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LogAnalyticsQueryPackQuery', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}/queries/{id}'} def delete( - self, resource_group_name, query_pack_name, query_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, query_pack_name, id, custom_headers=None, raw=False, **operation_config): """Deletes a specific Query defined within an Log Analytics QueryPack. :param resource_group_name: The name of the resource group. The name @@ -374,9 +452,9 @@ def delete( :param query_pack_name: The name of the Log Analytics QueryPack resource. :type query_pack_name: str - :param query_id: The id of a specific query defined in the Log - Analytics QueryPack - :type query_id: str + :param id: The id of a specific query defined in the Log Analytics + QueryPack + :type id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -393,7 +471,7 @@ def delete( 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str'), - 'queryId': self._serialize.url("query_id", query_id, 'str') + 'id': self._serialize.url("id", id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -420,4 +498,4 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/{queryId}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}/queries/{id}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_query_packs_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_query_packs_operations.py index 3eaaddab0aed6..cfe80b3c0b299 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_query_packs_operations.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_09_01_preview/operations/_query_packs_operations.py @@ -101,7 +101,7 @@ def internal_paging(next_link=None): deserialized = models.LogAnalyticsQueryPackPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/queryPacks'} + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/queryPacks'} def list_by_resource_group( self, resource_group_name, custom_headers=None, raw=False, **operation_config): @@ -170,7 +170,7 @@ def internal_paging(next_link=None): deserialized = models.LogAnalyticsQueryPackPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks'} def delete( self, resource_group_name, query_pack_name, custom_headers=None, raw=False, **operation_config): @@ -224,7 +224,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}'} def get( self, resource_group_name, query_pack_name, custom_headers=None, raw=False, **operation_config): @@ -287,7 +287,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}'} def create_or_update( self, resource_group_name, query_pack_name, location, tags=None, custom_headers=None, raw=False, **operation_config): @@ -362,7 +362,7 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}'} def update_tags( self, resource_group_name, query_pack_name, tags=None, custom_headers=None, raw=False, **operation_config): @@ -434,4 +434,4 @@ def update_tags( return client_raw_response return deserialized - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}'} + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/queryPacks/{queryPackName}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_10_17_preview/operations/_workbook_templates_operations.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_10_17_preview/operations/_workbook_templates_operations.py index 17066285b1a81..d639ac3719f51 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_10_17_preview/operations/_workbook_templates_operations.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2019_10_17_preview/operations/_workbook_templates_operations.py @@ -105,7 +105,7 @@ def internal_paging(next_link=None): deserialized = models.WorkbookTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooktemplates'} + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooktemplates'} def get( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -168,7 +168,7 @@ def get( return client_raw_response return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'} + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'} def delete( self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): @@ -222,7 +222,7 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'} + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'} def create_or_update( self, resource_group_name, resource_name, workbook_template_properties, custom_headers=None, raw=False, **operation_config): @@ -295,7 +295,7 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'} + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'} def update( self, resource_group_name, resource_name, workbook_template_update_parameters=None, custom_headers=None, raw=False, **operation_config): @@ -369,4 +369,4 @@ def update( return client_raw_response return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'} diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/__init__.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/__init__.py index cbde4cca8f30a..e354b6a664ac3 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/__init__.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/__init__.py @@ -33,6 +33,7 @@ FlowType, RequestSource, PublicNetworkAccessType, + IngestionMode, PurgeState, ) @@ -50,5 +51,6 @@ 'FlowType', 'RequestSource', 'PublicNetworkAccessType', + 'IngestionMode', 'PurgeState', ] diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_application_insights_management_client_enums.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_application_insights_management_client_enums.py index cab8df5318db9..95991581077a1 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_application_insights_management_client_enums.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_application_insights_management_client_enums.py @@ -34,6 +34,13 @@ class PublicNetworkAccessType(str, Enum): disabled = "Disabled" #: Disables public connectivity to Application Insights through public DNS. +class IngestionMode(str, Enum): + + application_insights = "ApplicationInsights" + application_insights_with_diagnostic_settings = "ApplicationInsightsWithDiagnosticSettings" + log_analytics = "LogAnalytics" + + class PurgeState(str, Enum): pending = "pending" diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_models.py index 256b50e40b1e3..b8951324e1224 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_models.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_models.py @@ -135,6 +135,9 @@ class ApplicationInsightsComponent(ComponentsResource): :param workspace_resource_id: Required. ResourceId of the log analytics workspace which the data will be ingested to. :type workspace_resource_id: str + :ivar la_migration_date: The date which the component got migrated to LA, + in ISO 8601 format. + :vartype la_migration_date: datetime :ivar private_link_scoped_resources: List of linked private link scope resources. :vartype private_link_scoped_resources: @@ -149,6 +152,12 @@ class ApplicationInsightsComponent(ComponentsResource): 'Disabled'. Default value: "Enabled" . :type public_network_access_for_query: str or ~azure.mgmt.applicationinsights.v2020_02_02_preview.models.PublicNetworkAccessType + :param ingestion_mode: Indicates the flow of the ingestion. Possible + values include: 'ApplicationInsights', + 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default + value: "LogAnalytics" . + :type ingestion_mode: str or + ~azure.mgmt.applicationinsights.v2020_02_02_preview.models.IngestionMode """ _validation = { @@ -168,6 +177,7 @@ class ApplicationInsightsComponent(ComponentsResource): 'connection_string': {'readonly': True}, 'retention_in_days': {'readonly': True}, 'workspace_resource_id': {'required': True}, + 'la_migration_date': {'readonly': True}, 'private_link_scoped_resources': {'readonly': True}, } @@ -195,9 +205,11 @@ class ApplicationInsightsComponent(ComponentsResource): 'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'}, 'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'}, 'workspace_resource_id': {'key': 'properties.WorkspaceResourceId', 'type': 'str'}, + 'la_migration_date': {'key': 'properties.LaMigrationDate', 'type': 'iso-8601'}, 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -220,9 +232,11 @@ def __init__(self, **kwargs): self.disable_ip_masking = kwargs.get('disable_ip_masking', None) self.immediate_purge_data_on30_days = kwargs.get('immediate_purge_data_on30_days', None) self.workspace_resource_id = kwargs.get('workspace_resource_id', None) + self.la_migration_date = None self.private_link_scoped_resources = None self.public_network_access_for_ingestion = kwargs.get('public_network_access_for_ingestion', "Enabled") self.public_network_access_for_query = kwargs.get('public_network_access_for_query', "Enabled") + self.ingestion_mode = kwargs.get('ingestion_mode', "LogAnalytics") class CloudError(Model): diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_models_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_models_py3.py index 9b8fcb866f9bf..fbb2aaaf29dde 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_models_py3.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_02_02_preview/models/_models_py3.py @@ -135,6 +135,9 @@ class ApplicationInsightsComponent(ComponentsResource): :param workspace_resource_id: Required. ResourceId of the log analytics workspace which the data will be ingested to. :type workspace_resource_id: str + :ivar la_migration_date: The date which the component got migrated to LA, + in ISO 8601 format. + :vartype la_migration_date: datetime :ivar private_link_scoped_resources: List of linked private link scope resources. :vartype private_link_scoped_resources: @@ -149,6 +152,12 @@ class ApplicationInsightsComponent(ComponentsResource): 'Disabled'. Default value: "Enabled" . :type public_network_access_for_query: str or ~azure.mgmt.applicationinsights.v2020_02_02_preview.models.PublicNetworkAccessType + :param ingestion_mode: Indicates the flow of the ingestion. Possible + values include: 'ApplicationInsights', + 'ApplicationInsightsWithDiagnosticSettings', 'LogAnalytics'. Default + value: "LogAnalytics" . + :type ingestion_mode: str or + ~azure.mgmt.applicationinsights.v2020_02_02_preview.models.IngestionMode """ _validation = { @@ -168,6 +177,7 @@ class ApplicationInsightsComponent(ComponentsResource): 'connection_string': {'readonly': True}, 'retention_in_days': {'readonly': True}, 'workspace_resource_id': {'required': True}, + 'la_migration_date': {'readonly': True}, 'private_link_scoped_resources': {'readonly': True}, } @@ -195,12 +205,14 @@ class ApplicationInsightsComponent(ComponentsResource): 'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'}, 'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'}, 'workspace_resource_id': {'key': 'properties.WorkspaceResourceId', 'type': 'str'}, + 'la_migration_date': {'key': 'properties.LaMigrationDate', 'type': 'iso-8601'}, 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'}, 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'}, 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'}, + 'ingestion_mode': {'key': 'properties.IngestionMode', 'type': 'str'}, } - def __init__(self, *, location: str, kind: str, workspace_resource_id: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, public_network_access_for_ingestion="Enabled", public_network_access_for_query="Enabled", **kwargs) -> None: + def __init__(self, *, location: str, kind: str, workspace_resource_id: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, public_network_access_for_ingestion="Enabled", public_network_access_for_query="Enabled", ingestion_mode="LogAnalytics", **kwargs) -> None: super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs) self.kind = kind self.application_id = None @@ -220,9 +232,11 @@ def __init__(self, *, location: str, kind: str, workspace_resource_id: str, tags self.disable_ip_masking = disable_ip_masking self.immediate_purge_data_on30_days = immediate_purge_data_on30_days self.workspace_resource_id = workspace_resource_id + self.la_migration_date = None self.private_link_scoped_resources = None self.public_network_access_for_ingestion = public_network_access_for_ingestion self.public_network_access_for_query = public_network_access_for_query + self.ingestion_mode = ingestion_mode class CloudError(Model): diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_03_01_preview/models/_models.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_03_01_preview/models/_models.py index 1d6c7cfb916b5..8d9c23595fcac 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_03_01_preview/models/_models.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_03_01_preview/models/_models.py @@ -16,16 +16,19 @@ class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -49,19 +52,21 @@ def __init__(self, **kwargs): class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -95,19 +100,21 @@ class CloudError(Model): class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -133,13 +140,13 @@ class ComponentLinkedStorageAccounts(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param linked_storage_account: Linked storage account resource ID :type linked_storage_account: str @@ -180,9 +187,10 @@ def __init__(self, **kwargs): class ErrorResponse(Model): - """Describe the format of an Error response. + """Error response indicates Insights service is not able to process the + incoming request. The reason is provided in the error message. - :param code: Error code + :param code: Error code. :type code: str :param message: Error message indicating why the operation failed. :type message: str @@ -212,20 +220,23 @@ def __init__(self, deserialize, response, *args): class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_03_01_preview/models/_models_py3.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_03_01_preview/models/_models_py3.py index 887bad54fdf99..e2be79c550e02 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_03_01_preview/models/_models_py3.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2020_03_01_preview/models/_models_py3.py @@ -16,16 +16,19 @@ class Resource(Model): """Resource. + Common fields that are returned in the response for all Azure Resource + Manager resources. + Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -49,19 +52,21 @@ def __init__(self, **kwargs) -> None: class AzureEntityResource(Resource): - """The resource model definition for a Azure Resource Manager resource with an - etag. + """Entity Resource. + + The resource model definition for an Azure Resource Manager resource with + an etag. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :ivar etag: Resource Etag. :vartype etag: str @@ -95,19 +100,21 @@ class CloudError(Model): class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have - everything other than required location and tags. + """Proxy Resource. + + The resource model definition for a Azure Resource Manager proxy resource. + It will not have tags and a location. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str """ @@ -133,13 +140,13 @@ class ComponentLinkedStorageAccounts(ProxyResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param linked_storage_account: Linked storage account resource ID :type linked_storage_account: str @@ -180,9 +187,10 @@ def __init__(self, *, linked_storage_account: str=None, **kwargs) -> None: class ErrorResponse(Model): - """Describe the format of an Error response. + """Error response indicates Insights service is not able to process the + incoming request. The reason is provided in the error message. - :param code: Error code + :param code: Error code. :type code: str :param message: Error message indicating why the operation failed. :type message: str @@ -212,20 +220,23 @@ def __init__(self, deserialize, response, *args): class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """Tracked Resource. + + The resource model definition for an Azure Resource Manager tracked top + level resource which has 'tags' and a 'location'. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} :vartype id: str :ivar name: The name of the resource :vartype name: str - :ivar type: The type of the resource. Ex- - Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. + "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] diff --git a/sdk/applicationinsights/azure-mgmt-applicationinsights/setup.py b/sdk/applicationinsights/azure-mgmt-applicationinsights/setup.py index 76f07ebb75aa1..023d9e434afb9 100644 --- a/sdk/applicationinsights/azure-mgmt-applicationinsights/setup.py +++ b/sdk/applicationinsights/azure-mgmt-applicationinsights/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -64,10 +66,10 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,