From c184e9cc61828b665753770cdc9190346f5490fd Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Sun, 4 Feb 2018 07:33:19 +0000 Subject: [PATCH 1/2] Generated from 0b82ba534dc6251cb7eeb885072e59254c59d54e Add collectionFormat to comma-separated tags list parameter for favorites - generating API in CSharp generated errors --- .../application_insights_management_client.py | 56 ++- .../applicationinsights/models/__init__.py | 54 ++- ...n_insights_component_available_features.py | 36 ++ ...application_insights_component_favorite.py | 91 +++++ .../application_insights_component_feature.py | 77 +++++ ...insights_component_feature_capabilities.py | 113 +++++++ ...n_insights_component_feature_capability.py | 60 ++++ ...onent_proactive_detection_configuration.py | 52 +++ ...etection_configuration_rule_definitions.py | 61 ++++ ...on_insights_component_web_test_location.py | 41 +++ ...ights_component_web_test_location_paged.py | 27 ++ ...cation_insights_management_client_enums.py | 18 + .../operations/__init__.py | 24 +- ...component_available_features_operations.py | 102 ++++++ ...mponent_feature_capabilities_operations.py | 102 ++++++ .../operations/favorite_operations.py | 319 ++++++++++++++++++ .../operations/favorites_operations.py | 133 ++++++++ ...ive_detection_configurations_operations.py | 246 ++++++++++++++ .../web_test_locations_operations.py | 111 ++++++ 19 files changed, 1688 insertions(+), 35 deletions(-) create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_paged.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_available_features_operations.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_feature_capabilities_operations.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorite_operations.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorites_operations.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/proactive_detection_configurations_operations.py create mode 100644 azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_test_locations_operations.py diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/application_insights_management_client.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/application_insights_management_client.py index 62b9c2aaf442..77e6fbe23a34 100644 --- a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/application_insights_management_client.py +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/application_insights_management_client.py @@ -14,12 +14,18 @@ from msrestazure import AzureConfiguration from .version import VERSION from .operations.operations import Operations -from .operations.components_operations import ComponentsOperations -from .operations.web_tests_operations import WebTestsOperations +from .operations.api_keys_operations import APIKeysOperations from .operations.export_configurations_operations import ExportConfigurationsOperations +from .operations.proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations from .operations.component_current_billing_features_operations import ComponentCurrentBillingFeaturesOperations from .operations.component_quota_status_operations import ComponentQuotaStatusOperations -from .operations.api_keys_operations import APIKeysOperations +from .operations.component_feature_capabilities_operations import ComponentFeatureCapabilitiesOperations +from .operations.component_available_features_operations import ComponentAvailableFeaturesOperations +from .operations.components_operations import ComponentsOperations +from .operations.favorites_operations import FavoritesOperations +from .operations.favorite_operations import FavoriteOperations +from .operations.web_test_locations_operations import WebTestLocationsOperations +from .operations.web_tests_operations import WebTestsOperations from . import models @@ -63,18 +69,30 @@ class ApplicationInsightsManagementClient(object): :ivar operations: Operations operations :vartype operations: azure.mgmt.applicationinsights.operations.Operations - :ivar components: Components operations - :vartype components: azure.mgmt.applicationinsights.operations.ComponentsOperations - :ivar web_tests: WebTests operations - :vartype web_tests: azure.mgmt.applicationinsights.operations.WebTestsOperations + :ivar api_keys: APIKeys operations + :vartype api_keys: azure.mgmt.applicationinsights.operations.APIKeysOperations :ivar export_configurations: ExportConfigurations operations :vartype export_configurations: azure.mgmt.applicationinsights.operations.ExportConfigurationsOperations + :ivar proactive_detection_configurations: ProactiveDetectionConfigurations operations + :vartype proactive_detection_configurations: azure.mgmt.applicationinsights.operations.ProactiveDetectionConfigurationsOperations :ivar component_current_billing_features: ComponentCurrentBillingFeatures operations :vartype component_current_billing_features: azure.mgmt.applicationinsights.operations.ComponentCurrentBillingFeaturesOperations :ivar component_quota_status: ComponentQuotaStatus operations :vartype component_quota_status: azure.mgmt.applicationinsights.operations.ComponentQuotaStatusOperations - :ivar api_keys: APIKeys operations - :vartype api_keys: azure.mgmt.applicationinsights.operations.APIKeysOperations + :ivar component_feature_capabilities: ComponentFeatureCapabilities operations + :vartype component_feature_capabilities: azure.mgmt.applicationinsights.operations.ComponentFeatureCapabilitiesOperations + :ivar component_available_features: ComponentAvailableFeatures operations + :vartype component_available_features: azure.mgmt.applicationinsights.operations.ComponentAvailableFeaturesOperations + :ivar components: Components operations + :vartype components: azure.mgmt.applicationinsights.operations.ComponentsOperations + :ivar favorites: Favorites operations + :vartype favorites: azure.mgmt.applicationinsights.operations.FavoritesOperations + :ivar favorite: Favorite operations + :vartype favorite: azure.mgmt.applicationinsights.operations.FavoriteOperations + :ivar web_test_locations: WebTestLocations operations + :vartype web_test_locations: azure.mgmt.applicationinsights.operations.WebTestLocationsOperations + :ivar web_tests: WebTests operations + :vartype web_tests: azure.mgmt.applicationinsights.operations.WebTestsOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -97,15 +115,27 @@ def __init__( self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) - self.components = ComponentsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.web_tests = WebTestsOperations( + self.api_keys = APIKeysOperations( self._client, self.config, self._serialize, self._deserialize) self.export_configurations = ExportConfigurationsOperations( self._client, self.config, self._serialize, self._deserialize) + self.proactive_detection_configurations = ProactiveDetectionConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) self.component_current_billing_features = ComponentCurrentBillingFeaturesOperations( self._client, self.config, self._serialize, self._deserialize) self.component_quota_status = ComponentQuotaStatusOperations( self._client, self.config, self._serialize, self._deserialize) - self.api_keys = APIKeysOperations( + self.component_feature_capabilities = ComponentFeatureCapabilitiesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.component_available_features = ComponentAvailableFeaturesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.components = ComponentsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.favorites = FavoritesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.favorite = FavoriteOperations( + self._client, self.config, self._serialize, self._deserialize) + self.web_test_locations = WebTestLocationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.web_tests = WebTestsOperations( self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py index 8318a9567e80..dfe7cb22dc40 100644 --- a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py @@ -12,53 +12,75 @@ from .error_response import ErrorResponse, ErrorResponseException from .operation_display import OperationDisplay from .operation import Operation +from .api_key_request import APIKeyRequest +from .application_insights_component_api_key import ApplicationInsightsComponentAPIKey +from .application_insights_component_export_request import ApplicationInsightsComponentExportRequest +from .application_insights_component_export_configuration import ApplicationInsightsComponentExportConfiguration +from .application_insights_component_proactive_detection_configuration_rule_definitions import ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions +from .application_insights_component_proactive_detection_configuration import ApplicationInsightsComponentProactiveDetectionConfiguration +from .application_insights_component_data_volume_cap import ApplicationInsightsComponentDataVolumeCap +from .application_insights_component_billing_features import ApplicationInsightsComponentBillingFeatures +from .application_insights_component_quota_status import ApplicationInsightsComponentQuotaStatus +from .application_insights_component_feature_capabilities import ApplicationInsightsComponentFeatureCapabilities +from .application_insights_component_feature_capability import ApplicationInsightsComponentFeatureCapability +from .application_insights_component_feature import ApplicationInsightsComponentFeature +from .application_insights_component_available_features import ApplicationInsightsComponentAvailableFeatures from .resource import Resource from .tags_resource import TagsResource from .application_insights_component import ApplicationInsightsComponent +from .application_insights_component_favorite import ApplicationInsightsComponentFavorite +from .application_insights_component_web_test_location import ApplicationInsightsComponentWebTestLocation from .web_test_geolocation import WebTestGeolocation from .web_test_properties_configuration import WebTestPropertiesConfiguration from .web_test import WebTest -from .application_insights_component_export_request import ApplicationInsightsComponentExportRequest -from .application_insights_component_export_configuration import ApplicationInsightsComponentExportConfiguration -from .application_insights_component_data_volume_cap import ApplicationInsightsComponentDataVolumeCap -from .application_insights_component_billing_features import ApplicationInsightsComponentBillingFeatures -from .application_insights_component_quota_status import ApplicationInsightsComponentQuotaStatus -from .api_key_request import APIKeyRequest -from .application_insights_component_api_key import ApplicationInsightsComponentAPIKey from .operation_paged import OperationPaged +from .application_insights_component_api_key_paged import ApplicationInsightsComponentAPIKeyPaged from .application_insights_component_paged import ApplicationInsightsComponentPaged +from .application_insights_component_web_test_location_paged import ApplicationInsightsComponentWebTestLocationPaged from .web_test_paged import WebTestPaged -from .application_insights_component_api_key_paged import ApplicationInsightsComponentAPIKeyPaged from .application_insights_management_client_enums import ( ApplicationType, FlowType, RequestSource, + FavoriteType, WebTestKind, + FavoriteSourceType, ) __all__ = [ 'ErrorResponse', 'ErrorResponseException', 'OperationDisplay', 'Operation', + 'APIKeyRequest', + 'ApplicationInsightsComponentAPIKey', + 'ApplicationInsightsComponentExportRequest', + 'ApplicationInsightsComponentExportConfiguration', + 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions', + 'ApplicationInsightsComponentProactiveDetectionConfiguration', + 'ApplicationInsightsComponentDataVolumeCap', + 'ApplicationInsightsComponentBillingFeatures', + 'ApplicationInsightsComponentQuotaStatus', + 'ApplicationInsightsComponentFeatureCapabilities', + 'ApplicationInsightsComponentFeatureCapability', + 'ApplicationInsightsComponentFeature', + 'ApplicationInsightsComponentAvailableFeatures', 'Resource', 'TagsResource', 'ApplicationInsightsComponent', + 'ApplicationInsightsComponentFavorite', + 'ApplicationInsightsComponentWebTestLocation', 'WebTestGeolocation', 'WebTestPropertiesConfiguration', 'WebTest', - 'ApplicationInsightsComponentExportRequest', - 'ApplicationInsightsComponentExportConfiguration', - 'ApplicationInsightsComponentDataVolumeCap', - 'ApplicationInsightsComponentBillingFeatures', - 'ApplicationInsightsComponentQuotaStatus', - 'APIKeyRequest', - 'ApplicationInsightsComponentAPIKey', 'OperationPaged', + 'ApplicationInsightsComponentAPIKeyPaged', 'ApplicationInsightsComponentPaged', + 'ApplicationInsightsComponentWebTestLocationPaged', 'WebTestPaged', - 'ApplicationInsightsComponentAPIKeyPaged', 'ApplicationType', 'FlowType', 'RequestSource', + 'FavoriteType', 'WebTestKind', + 'FavoriteSourceType', ] diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features.py new file mode 100644 index 000000000000..a7ee7642f5e6 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_available_features.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class ApplicationInsightsComponentAvailableFeatures(Model): + """An Application Insights component available features. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar result: A list of Application Insigths component feature. + :vartype result: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeature] + """ + + _validation = { + 'result': {'readonly': True}, + } + + _attribute_map = { + 'result': {'key': 'Result', 'type': '[ApplicationInsightsComponentFeature]'}, + } + + def __init__(self): + super(ApplicationInsightsComponentAvailableFeatures, self).__init__() + self.result = None diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite.py new file mode 100644 index 000000000000..cf920af7b9d9 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_favorite.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationInsightsComponentFavorite(Model): + """Properties that define a favorite that is associated to an Application + Insights component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The user-defined name of the favorite. + :type name: str + :param config: Configuration of this particular favorite, which are driven + by the Azure portal UX. Configuration data is a string containing valid + JSON + :type config: str + :param version: This instance's version of the data model. This can change + as new features are added that can be marked favorite. Current examples + include MetricsExplorer (ME) and Search. + :type version: str + :ivar favorite_id: Internally assigned unique id of the favorite + definition. + :vartype favorite_id: str + :param favorite_type: Enum indicating if this favorite definition is owned + by a specific user or is shared between all users with access to the + Application Insights component. Possible values include: 'shared', 'user' + :type favorite_type: str or + ~azure.mgmt.applicationinsights.models.FavoriteType + :param source_type: The source of the favorite definition. + :type source_type: str + :ivar time_modified: Date and time in UTC of the last modification that + was made to this favorite definition. + :vartype time_modified: str + :param tags: A list of 0 or more tags that are associated with this + favorite definition + :type tags: list[str] + :param category: Favorite category, as defined by the user at creation + time. + :type category: str + :param is_generated_from_template: Flag denoting wether or not this + favorite was generated from a template. + :type is_generated_from_template: bool + :ivar user_id: Unique user id of the specific user that owns this + favorite. + :vartype user_id: str + """ + + _validation = { + 'favorite_id': {'readonly': True}, + 'time_modified': {'readonly': True}, + 'user_id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'config': {'key': 'Config', 'type': 'str'}, + 'version': {'key': 'Version', 'type': 'str'}, + 'favorite_id': {'key': 'FavoriteId', 'type': 'str'}, + 'favorite_type': {'key': 'FavoriteType', 'type': 'FavoriteType'}, + 'source_type': {'key': 'SourceType', 'type': 'str'}, + 'time_modified': {'key': 'TimeModified', 'type': 'str'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + 'category': {'key': 'Category', 'type': 'str'}, + 'is_generated_from_template': {'key': 'IsGeneratedFromTemplate', 'type': 'bool'}, + 'user_id': {'key': 'UserId', 'type': 'str'}, + } + + def __init__(self, name=None, config=None, version=None, favorite_type=None, source_type=None, tags=None, category=None, is_generated_from_template=None): + super(ApplicationInsightsComponentFavorite, self).__init__() + self.name = name + self.config = config + self.version = version + self.favorite_id = None + self.favorite_type = favorite_type + self.source_type = source_type + self.time_modified = None + self.tags = tags + self.category = category + self.is_generated_from_template = is_generated_from_template + self.user_id = None diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature.py new file mode 100644 index 000000000000..c0eaaa378b9d --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature.py @@ -0,0 +1,77 @@ +# 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 msrest.serialization import Model + + +class ApplicationInsightsComponentFeature(Model): + """An Application Insights component daily data volume cap status. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar feature_name: The pricing feature name. + :vartype feature_name: str + :ivar meter_id: The meter id used for the feature. + :vartype meter_id: str + :ivar meter_rate_frequency: The meter meter rate for the feature's meter. + :vartype meter_rate_frequency: str + :ivar resouce_id: Reserved, not used now. + :vartype resouce_id: str + :ivar is_hidden: Reserved, not used now. + :vartype is_hidden: bool + :ivar capabilities: A list of Application Insigths component feature + capability. + :vartype capabilities: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeatureCapability] + :ivar title: Desplay name of the feature. + :vartype title: str + :ivar is_main_feature: Whether can apply addon feature on to it. + :vartype is_main_feature: bool + :ivar supported_addon_features: The add on features on main feature. + :vartype supported_addon_features: str + """ + + _validation = { + 'feature_name': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_rate_frequency': {'readonly': True}, + 'resouce_id': {'readonly': True}, + 'is_hidden': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'title': {'readonly': True}, + 'is_main_feature': {'readonly': True}, + 'supported_addon_features': {'readonly': True}, + } + + _attribute_map = { + 'feature_name': {'key': 'FeatureName', 'type': 'str'}, + 'meter_id': {'key': 'MeterId', 'type': 'str'}, + 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, + 'resouce_id': {'key': 'ResouceId', 'type': 'str'}, + 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, + 'capabilities': {'key': 'Capabilities', 'type': '[ApplicationInsightsComponentFeatureCapability]'}, + 'title': {'key': 'Title', 'type': 'str'}, + 'is_main_feature': {'key': 'IsMainFeature', 'type': 'bool'}, + 'supported_addon_features': {'key': 'SupportedAddonFeatures', 'type': 'str'}, + } + + def __init__(self): + super(ApplicationInsightsComponentFeature, self).__init__() + self.feature_name = None + self.meter_id = None + self.meter_rate_frequency = None + self.resouce_id = None + self.is_hidden = None + self.capabilities = None + self.title = None + self.is_main_feature = None + self.supported_addon_features = None diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities.py new file mode 100644 index 000000000000..fd8c809e15d5 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capabilities.py @@ -0,0 +1,113 @@ +# 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 msrest.serialization import Model + + +class ApplicationInsightsComponentFeatureCapabilities(Model): + """An Application Insights component feature capabilities. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar support_export_data: Whether allow to use continuous export feature. + :vartype support_export_data: bool + :ivar burst_throttle_policy: Reserved, not used now. + :vartype burst_throttle_policy: str + :ivar metadata_class: Reserved, not used now. + :vartype metadata_class: str + :ivar live_stream_metrics: Reserved, not used now. + :vartype live_stream_metrics: bool + :ivar application_map: Reserved, not used now. + :vartype application_map: bool + :ivar work_item_integration: Whether allow to use work item integration + feature. + :vartype work_item_integration: bool + :ivar power_bi_integration: Reserved, not used now. + :vartype power_bi_integration: bool + :ivar open_schema: Reserved, not used now. + :vartype open_schema: bool + :ivar proactive_detection: Reserved, not used now. + :vartype proactive_detection: bool + :ivar analytics_integration: Reserved, not used now. + :vartype analytics_integration: bool + :ivar multiple_step_web_test: Whether allow to use multiple steps web test + feature. + :vartype multiple_step_web_test: bool + :ivar api_access_level: Reserved, not used now. + :vartype api_access_level: str + :ivar tracking_type: The applciation insights component used tracking + type. + :vartype tracking_type: str + :ivar daily_cap: Daily data volume cap in GB. + :vartype daily_cap: float + :ivar daily_cap_reset_time: Daily data volume cap UTC reset hour. + :vartype daily_cap_reset_time: float + :ivar throttle_rate: Reserved, not used now. + :vartype throttle_rate: float + """ + + _validation = { + 'support_export_data': {'readonly': True}, + 'burst_throttle_policy': {'readonly': True}, + 'metadata_class': {'readonly': True}, + 'live_stream_metrics': {'readonly': True}, + 'application_map': {'readonly': True}, + 'work_item_integration': {'readonly': True}, + 'power_bi_integration': {'readonly': True}, + 'open_schema': {'readonly': True}, + 'proactive_detection': {'readonly': True}, + 'analytics_integration': {'readonly': True}, + 'multiple_step_web_test': {'readonly': True}, + 'api_access_level': {'readonly': True}, + 'tracking_type': {'readonly': True}, + 'daily_cap': {'readonly': True}, + 'daily_cap_reset_time': {'readonly': True}, + 'throttle_rate': {'readonly': True}, + } + + _attribute_map = { + 'support_export_data': {'key': 'SupportExportData', 'type': 'bool'}, + 'burst_throttle_policy': {'key': 'BurstThrottlePolicy', 'type': 'str'}, + 'metadata_class': {'key': 'MetadataClass', 'type': 'str'}, + 'live_stream_metrics': {'key': 'LiveStreamMetrics', 'type': 'bool'}, + 'application_map': {'key': 'ApplicationMap', 'type': 'bool'}, + 'work_item_integration': {'key': 'WorkItemIntegration', 'type': 'bool'}, + 'power_bi_integration': {'key': 'PowerBIIntegration', 'type': 'bool'}, + 'open_schema': {'key': 'OpenSchema', 'type': 'bool'}, + 'proactive_detection': {'key': 'ProactiveDetection', 'type': 'bool'}, + 'analytics_integration': {'key': 'AnalyticsIntegration', 'type': 'bool'}, + 'multiple_step_web_test': {'key': 'MultipleStepWebTest', 'type': 'bool'}, + 'api_access_level': {'key': 'ApiAccessLevel', 'type': 'str'}, + 'tracking_type': {'key': 'TrackingType', 'type': 'str'}, + 'daily_cap': {'key': 'DailyCap', 'type': 'float'}, + 'daily_cap_reset_time': {'key': 'DailyCapResetTime', 'type': 'float'}, + 'throttle_rate': {'key': 'ThrottleRate', 'type': 'float'}, + } + + def __init__(self): + super(ApplicationInsightsComponentFeatureCapabilities, self).__init__() + self.support_export_data = None + self.burst_throttle_policy = None + self.metadata_class = None + self.live_stream_metrics = None + self.application_map = None + self.work_item_integration = None + self.power_bi_integration = None + self.open_schema = None + self.proactive_detection = None + self.analytics_integration = None + self.multiple_step_web_test = None + self.api_access_level = None + self.tracking_type = None + self.daily_cap = None + self.daily_cap_reset_time = None + self.throttle_rate = None diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability.py new file mode 100644 index 000000000000..81693f1a745e --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_feature_capability.py @@ -0,0 +1,60 @@ +# 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 msrest.serialization import Model + + +class ApplicationInsightsComponentFeatureCapability(Model): + """An Application Insights component feature capability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the capability. + :vartype name: str + :ivar description: The description of the capability. + :vartype description: str + :ivar value: The vaule of the capability. + :vartype value: str + :ivar unit: The unit of the capability. + :vartype unit: str + :ivar meter_id: The meter used for the capability. + :vartype meter_id: str + :ivar meter_rate_frequency: The meter rate of the meter. + :vartype meter_rate_frequency: str + """ + + _validation = { + 'name': {'readonly': True}, + 'description': {'readonly': True}, + 'value': {'readonly': True}, + 'unit': {'readonly': True}, + 'meter_id': {'readonly': True}, + 'meter_rate_frequency': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'str'}, + 'unit': {'key': 'Unit', 'type': 'str'}, + 'meter_id': {'key': 'MeterId', 'type': 'str'}, + 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'}, + } + + def __init__(self): + super(ApplicationInsightsComponentFeatureCapability, self).__init__() + self.name = None + self.description = None + self.value = None + self.unit = None + self.meter_id = None + self.meter_rate_frequency = None diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration.py new file mode 100644 index 000000000000..14734b3c0f68 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration.py @@ -0,0 +1,52 @@ +# 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 msrest.serialization import Model + + +class ApplicationInsightsComponentProactiveDetectionConfiguration(Model): + """Properties that define a ProactiveDetection configuration. + + :param name: The rule name + :type name: str + :param enabled: A flag that indicates whether this rule is enabled by the + user + :type enabled: bool + :param send_emails_to_subscription_owners: A flag that indicated whether + notifications on this rule should be sent to subscription owners + :type send_emails_to_subscription_owners: bool + :param custom_emails: Custom email addresses for this rule notifications + :type custom_emails: list[str] + :param last_updated_time: The last time this rule was updated + :type last_updated_time: str + :param rule_definitions: Static definitions of the ProactiveDetection + configuration rule (same values for all components). + :type rule_definitions: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'enabled': {'key': 'Enabled', 'type': 'bool'}, + 'send_emails_to_subscription_owners': {'key': 'SendEmailsToSubscriptionOwners', 'type': 'bool'}, + 'custom_emails': {'key': 'CustomEmails', 'type': '[str]'}, + 'last_updated_time': {'key': 'LastUpdatedTime', 'type': 'str'}, + 'rule_definitions': {'key': 'RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions'}, + } + + def __init__(self, name=None, enabled=None, send_emails_to_subscription_owners=None, custom_emails=None, last_updated_time=None, rule_definitions=None): + super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__() + self.name = name + self.enabled = enabled + self.send_emails_to_subscription_owners = send_emails_to_subscription_owners + self.custom_emails = custom_emails + self.last_updated_time = last_updated_time + self.rule_definitions = rule_definitions diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py new file mode 100644 index 000000000000..8fafb0a49a27 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions(Model): + """Static definitions of the ProactiveDetection configuration rule (same + values for all components). + + :param name: The rule name + :type name: str + :param display_name: The rule name as it is displayed in UI + :type display_name: str + :param description: The rule description + :type description: str + :param help_url: URL which displays aditional info about the proactive + detection rule + :type help_url: str + :param is_hidden: A flag indicating whether the rule is hidden (from the + UI) + :type is_hidden: bool + :param is_enabled_by_default: A flag indicating whether the rule is + enabled by default + :type is_enabled_by_default: bool + :param is_in_preview: A flag indicating whether the rule is in preview + :type is_in_preview: bool + :param supports_email_notifications: A flag indicating whether email + notifications are supported for detections for this rule + :type supports_email_notifications: bool + """ + + _attribute_map = { + 'name': {'key': 'Name', 'type': 'str'}, + 'display_name': {'key': 'DisplayName', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'help_url': {'key': 'HelpUrl', 'type': 'str'}, + 'is_hidden': {'key': 'IsHidden', 'type': 'bool'}, + 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'}, + 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'}, + 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'}, + } + + def __init__(self, name=None, display_name=None, description=None, help_url=None, is_hidden=None, is_enabled_by_default=None, is_in_preview=None, supports_email_notifications=None): + super(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, self).__init__() + self.name = name + self.display_name = display_name + self.description = description + self.help_url = help_url + self.is_hidden = is_hidden + self.is_enabled_by_default = is_enabled_by_default + self.is_in_preview = is_in_preview + self.supports_email_notifications = supports_email_notifications diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location.py new file mode 100644 index 000000000000..3b9a9dd95b92 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationInsightsComponentWebTestLocation(Model): + """Properties that define a web test location available to an Application + Insights Component. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar display_name: The display name of the web test location. + :vartype display_name: str + :ivar tag: Internally defined geographic location tag. + :vartype tag: str + """ + + _validation = { + 'display_name': {'readonly': True}, + 'tag': {'readonly': True}, + } + + _attribute_map = { + 'display_name': {'key': 'DisplayName', 'type': 'str'}, + 'tag': {'key': 'Tag', 'type': 'str'}, + } + + def __init__(self): + super(ApplicationInsightsComponentWebTestLocation, self).__init__() + self.display_name = None + self.tag = None diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_paged.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_paged.py new file mode 100644 index 000000000000..7cfba600f3f5 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_component_web_test_location_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ApplicationInsightsComponentWebTestLocationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ApplicationInsightsComponentWebTestLocation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponentWebTestLocation]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationInsightsComponentWebTestLocationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_management_client_enums.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_management_client_enums.py index fdb344ca6bf3..3312a738dba9 100644 --- a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_management_client_enums.py +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/application_insights_management_client_enums.py @@ -28,7 +28,25 @@ class RequestSource(Enum): rest = "rest" +class FavoriteType(Enum): + + shared = "shared" + user = "user" + + class WebTestKind(Enum): ping = "ping" multistep = "multistep" + + +class FavoriteSourceType(Enum): + + retention = "retention" + notebook = "notebook" + sessions = "sessions" + events = "events" + userflows = "userflows" + funnel = "funnel" + impact = "impact" + segmentation = "segmentation" diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py index 7be29002d55c..3eec926f74bb 100644 --- a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py @@ -10,19 +10,31 @@ # -------------------------------------------------------------------------- from .operations import Operations -from .components_operations import ComponentsOperations -from .web_tests_operations import WebTestsOperations +from .api_keys_operations import APIKeysOperations from .export_configurations_operations import ExportConfigurationsOperations +from .proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations from .component_current_billing_features_operations import ComponentCurrentBillingFeaturesOperations from .component_quota_status_operations import ComponentQuotaStatusOperations -from .api_keys_operations import APIKeysOperations +from .component_feature_capabilities_operations import ComponentFeatureCapabilitiesOperations +from .component_available_features_operations import ComponentAvailableFeaturesOperations +from .components_operations import ComponentsOperations +from .favorites_operations import FavoritesOperations +from .favorite_operations import FavoriteOperations +from .web_test_locations_operations import WebTestLocationsOperations +from .web_tests_operations import WebTestsOperations __all__ = [ 'Operations', - 'ComponentsOperations', - 'WebTestsOperations', + 'APIKeysOperations', 'ExportConfigurationsOperations', + 'ProactiveDetectionConfigurationsOperations', 'ComponentCurrentBillingFeaturesOperations', 'ComponentQuotaStatusOperations', - 'APIKeysOperations', + 'ComponentFeatureCapabilitiesOperations', + 'ComponentAvailableFeaturesOperations', + 'ComponentsOperations', + 'FavoritesOperations', + 'FavoriteOperations', + 'WebTestLocationsOperations', + 'WebTestsOperations', ] diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_available_features_operations.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_available_features_operations.py new file mode 100644 index 000000000000..d64a794c6d11 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_available_features_operations.py @@ -0,0 +1,102 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ComponentAvailableFeaturesOperations(object): + """ComponentAvailableFeaturesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client Api Version. 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 get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Returns all available features of the application insights component. + + :param resource_group_name: The name of the resource group. + :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: ApplicationInsightsComponentAvailableFeatures or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAvailableFeatures + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/getavailablebillingfeatures' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + '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') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentAvailableFeatures', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_feature_capabilities_operations.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_feature_capabilities_operations.py new file mode 100644 index 000000000000..7728ac63fd90 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/component_feature_capabilities_operations.py @@ -0,0 +1,102 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ComponentFeatureCapabilitiesOperations(object): + """ComponentFeatureCapabilitiesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client Api Version. 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 get( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Returns feature capabilites of the application insights component. + + :param resource_group_name: The name of the resource group. + :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: ApplicationInsightsComponentFeatureCapabilities or + ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFeatureCapabilities + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/featurecapabilities' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + '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') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentFeatureCapabilities', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorite_operations.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorite_operations.py new file mode 100644 index 000000000000..a2f5f57d58e8 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorite_operations.py @@ -0,0 +1,319 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class FavoriteOperations(object): + """FavoriteOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client Api Version. 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 get( + self, resource_group_name, resource_name, favorite_id, custom_headers=None, raw=False, **operation_config): + """Get a single favorite by its FavoriteId, defined within an Application + Insights component. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_id: The Id of a specific favorite defined in the + Application Insights component + :type favorite_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentFavorite or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites/{favoriteId}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'favoriteId': self._serialize.url("favorite_id", favorite_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') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def add( + self, resource_group_name, resource_name, favorite_id, favorite_properties, custom_headers=None, raw=False, **operation_config): + """Adds a new favorites to an Application Insights component. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_id: The Id of a specific favorite defined in the + Application Insights component + :type favorite_id: str + :param favorite_properties: Properties that need to be specified to + create a new favorite and add it to an Application Insights component. + :type favorite_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + :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: ApplicationInsightsComponentFavorite or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites/{favoriteId}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'favoriteId': self._serialize.url("favorite_id", favorite_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') + + # Construct headers + header_parameters = {} + 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(favorite_properties, 'ApplicationInsightsComponentFavorite') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, resource_name, favorite_id, favorite_properties, custom_headers=None, raw=False, **operation_config): + """Updates a favorite that has already been added to an Application + Insights component. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_id: The Id of a specific favorite defined in the + Application Insights component + :type favorite_id: str + :param favorite_properties: Properties that need to be specified to + update the existing favorite. + :type favorite_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + :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: ApplicationInsightsComponentFavorite or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites/{favoriteId}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'favoriteId': self._serialize.url("favorite_id", favorite_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') + + # Construct headers + header_parameters = {} + 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(favorite_properties, 'ApplicationInsightsComponentFavorite') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete( + self, resource_group_name, resource_name, favorite_id, custom_headers=None, raw=False, **operation_config): + """Remove a favorite that is associated to an Application Insights + component. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_id: The Id of a specific favorite defined in the + Application Insights component + :type favorite_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites/{favoriteId}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'favoriteId': self._serialize.url("favorite_id", favorite_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') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorites_operations.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorites_operations.py new file mode 100644 index 000000000000..3017dd815c7d --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorites_operations.py @@ -0,0 +1,133 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class FavoritesOperations(object): + """FavoritesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client Api Version. 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( + self, resource_group_name, resource_name, favorite_type="shared", source_type=None, can_fetch_content=None, tags=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of favorites defined within an Application Insights + component. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param favorite_type: The type of favorite. Value can be either shared + or user. Possible values include: 'shared', 'user' + :type favorite_type: str + :param source_type: Source type of favorite to return. When left out, + the source type defaults to 'other' (not present in this enum). + Possible values include: 'retention', 'notebook', 'sessions', + 'events', 'userflows', 'funnel', 'impact', 'segmentation' + :type source_type: str or + ~azure.mgmt.applicationinsights.models.FavoriteSourceType + :param can_fetch_content: Flag indicating whether or not to return the + full content for each applicable favorite. If false, only return + summary content for favorites. + :type can_fetch_content: bool + :param tags: Tags that must be present on each favorite returned. + :type tags: 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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of None + :rtype: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite][None] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + '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') + if favorite_type is not None: + query_parameters['favoriteType'] = self._serialize.query("favorite_type", favorite_type, 'str') + if source_type is not None: + query_parameters['sourceType'] = self._serialize.query("source_type", source_type, 'FavoriteSourceType') + if can_fetch_content is not None: + query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool') + if tags is not None: + query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.list(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.list(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/proactive_detection_configurations_operations.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/proactive_detection_configurations_operations.py new file mode 100644 index 000000000000..3a5f0b763667 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/proactive_detection_configurations_operations.py @@ -0,0 +1,246 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class ProactiveDetectionConfigurationsOperations(object): + """ProactiveDetectionConfigurationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client Api Version. 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( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of ProactiveDetection configurations of an Application + Insights component. + + :param resource_group_name: The name of the resource group. + :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: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ProactiveDetectionConfigs' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + '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') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[ApplicationInsightsComponentProactiveDetectionConfiguration]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def get( + self, resource_group_name, resource_name, configuration_id, custom_headers=None, raw=False, **operation_config): + """Get the ProactiveDetection configuration for this configuration id. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param configuration_id: The ProactiveDetection configuration ID. This + is unique within a Application Insights component. + :type configuration_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ApplicationInsightsComponentProactiveDetectionConfiguration + or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'ConfigurationId': self._serialize.url("configuration_id", configuration_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') + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, resource_name, configuration_id, proactive_detection_properties, custom_headers=None, raw=False, **operation_config): + """Update the ProactiveDetection configuration for this configuration id. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the Application Insights component + resource. + :type resource_name: str + :param configuration_id: The ProactiveDetection configuration ID. This + is unique within a Application Insights component. + :type configuration_id: str + :param proactive_detection_properties: Properties that need to be + specified to update the ProactiveDetection configuration. + :type proactive_detection_properties: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration + :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: ApplicationInsightsComponentProactiveDetectionConfiguration + or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + 'ConfigurationId': self._serialize.url("configuration_id", configuration_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') + + # Construct headers + header_parameters = {} + 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(proactive_detection_properties, 'ApplicationInsightsComponentProactiveDetectionConfiguration') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_test_locations_operations.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_test_locations_operations.py new file mode 100644 index 000000000000..b4779fd325f0 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_test_locations_operations.py @@ -0,0 +1,111 @@ +# 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 msrestazure.azure_exceptions import CloudError + +from .. import models + + +class WebTestLocationsOperations(object): + """WebTestLocationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: Client Api Version. 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( + self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config): + """Gets a list of web test locations available to this Application + Insights component. + + :param resource_group_name: The name of the resource group. + :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: An iterator like instance of + ApplicationInsightsComponentWebTestLocation + :rtype: + ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentWebTestLocationPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentWebTestLocation] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/syntheticmonitorlocations' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + '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') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + 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 and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ApplicationInsightsComponentWebTestLocationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ApplicationInsightsComponentWebTestLocationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized From 25f3e2bdc548880a88ff1955643a9f95f7ca7a3e Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Tue, 6 Feb 2018 16:12:44 -0800 Subject: [PATCH 2/2] Prepare appinsights 0.2.0 --- azure-mgmt-applicationinsights/HISTORY.rst | 10 ++++++++++ .../azure/mgmt/applicationinsights/version.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/azure-mgmt-applicationinsights/HISTORY.rst b/azure-mgmt-applicationinsights/HISTORY.rst index cacff9944559..7d6b1a69ee3e 100644 --- a/azure-mgmt-applicationinsights/HISTORY.rst +++ b/azure-mgmt-applicationinsights/HISTORY.rst @@ -3,6 +3,16 @@ Release History =============== +0.2.0 (2018-XXXXX) +++++++++++++++++++ + +* Add component_feature_capabilities operation group +* Add component_available_features operation group +* Add favorites operation group +* Add favorite operation group +* Add web_test_locations operation group +* Add proactive_detection_configurations operation group + 0.1.0 (2018-01-17) ++++++++++++++++++ diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/version.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/version.py index e0ec669828cb..9bd1dfac7ecb 100644 --- a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/version.py +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.2.0"