From 001f735fef8fbba87367e85343d81f780511a168 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Fri, 23 Feb 2018 18:23:38 +0000 Subject: [PATCH] Rebuild by https://github.com/Azure/azure-sdk-for-python/pull/2022 --- .../application_insights_management_client.py | 57 ++-- .../applicationinsights/models/__init__.py | 82 +++-- ...application_insights_component_favorite.py | 91 +++++ ...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 | 26 +- .../operations/favorite_operations.py | 323 ++++++++++++++++++ .../operations/favorites_operations.py | 127 +++++++ .../web_test_locations_operations.py | 112 ++++++ .../azure/mgmt/applicationinsights/version.py | 2 +- 11 files changed, 838 insertions(+), 68 deletions(-) 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_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/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/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 c28978b75d22..200d916f2e80 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,17 +14,20 @@ 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.annotations_operations import AnnotationsOperations +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.component_feature_capabilities_operations import ComponentFeatureCapabilitiesOperations from .operations.component_available_features_operations import ComponentAvailableFeaturesOperations -from .operations.api_keys_operations import APIKeysOperations -from .operations.annotations_operations import AnnotationsOperations +from .operations.proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations +from .operations.components_operations import ComponentsOperations from .operations.work_item_configurations_operations import WorkItemConfigurationsOperations +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 @@ -74,14 +77,12 @@ 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 annotations: Annotations operations + :vartype annotations: azure.mgmt.applicationinsights.operations.AnnotationsOperations + :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 @@ -90,12 +91,20 @@ class ApplicationInsightsManagementClient(object): :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 api_keys: APIKeys operations - :vartype api_keys: azure.mgmt.applicationinsights.operations.APIKeysOperations - :ivar annotations: Annotations operations - :vartype annotations: azure.mgmt.applicationinsights.operations.AnnotationsOperations + :ivar proactive_detection_configurations: ProactiveDetectionConfigurations operations + :vartype proactive_detection_configurations: azure.mgmt.applicationinsights.operations.ProactiveDetectionConfigurationsOperations + :ivar components: Components operations + :vartype components: azure.mgmt.applicationinsights.operations.ComponentsOperations :ivar work_item_configurations: WorkItemConfigurations operations :vartype work_item_configurations: azure.mgmt.applicationinsights.operations.WorkItemConfigurationsOperations + :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 @@ -121,14 +130,12 @@ def __init__( self.operations = Operations( self._client, self.config, self._serialize, self._deserialize) - self.components = ComponentsOperations( + self.annotations = AnnotationsOperations( 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( @@ -137,9 +144,17 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.component_available_features = ComponentAvailableFeaturesOperations( self._client, self.config, self._serialize, self._deserialize) - self.api_keys = APIKeysOperations( + self.proactive_detection_configurations = ProactiveDetectionConfigurationsOperations( self._client, self.config, self._serialize, self._deserialize) - self.annotations = AnnotationsOperations( + self.components = ComponentsOperations( self._client, self.config, self._serialize, self._deserialize) self.work_item_configurations = WorkItemConfigurationsOperations( 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 ec6e292b5719..e794f75607f8 100644 --- a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/models/__init__.py @@ -12,20 +12,13 @@ from .error_response import ErrorResponse, ErrorResponseException from .operation_display import OperationDisplay from .operation import Operation -from .resource import Resource -from .tags_resource import TagsResource -from .application_insights_component import ApplicationInsightsComponent -from .component_purge_body_filters import ComponentPurgeBodyFilters -from .component_purge_body import ComponentPurgeBody -from .component_purge_response import ComponentPurgeResponse -from .component_purge_status_response import ComponentPurgeStatusResponse -from .web_test_geolocation import WebTestGeolocation -from .web_test_properties_configuration import WebTestPropertiesConfiguration -from .web_test import WebTest +from .annotation import Annotation +from .inner_error import InnerError +from .annotation_error import AnnotationError, AnnotationErrorException +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 @@ -33,44 +26,49 @@ from .application_insights_component_feature_capability import ApplicationInsightsComponentFeatureCapability from .application_insights_component_feature import ApplicationInsightsComponentFeature from .application_insights_component_available_features import ApplicationInsightsComponentAvailableFeatures -from .api_key_request import APIKeyRequest -from .application_insights_component_api_key import ApplicationInsightsComponentAPIKey -from .annotation import Annotation -from .inner_error import InnerError -from .annotation_error import AnnotationError, AnnotationErrorException +from .application_insights_component_proactive_detection_configuration_rule_definitions import ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions +from .application_insights_component_proactive_detection_configuration import ApplicationInsightsComponentProactiveDetectionConfiguration +from .resource import Resource +from .tags_resource import TagsResource +from .application_insights_component import ApplicationInsightsComponent +from .component_purge_body_filters import ComponentPurgeBodyFilters +from .component_purge_body import ComponentPurgeBody +from .component_purge_response import ComponentPurgeResponse +from .component_purge_status_response import ComponentPurgeStatusResponse from .work_item_configuration import WorkItemConfiguration from .work_item_create_configuration import WorkItemCreateConfiguration from .work_item_configuration_error import WorkItemConfigurationError, WorkItemConfigurationErrorException +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 .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, PurgeState, + FavoriteType, WebTestKind, + FavoriteSourceType, ) __all__ = [ 'ErrorResponse', 'ErrorResponseException', 'OperationDisplay', 'Operation', - 'Resource', - 'TagsResource', - 'ApplicationInsightsComponent', - 'ComponentPurgeBodyFilters', - 'ComponentPurgeBody', - 'ComponentPurgeResponse', - 'ComponentPurgeStatusResponse', - 'WebTestGeolocation', - 'WebTestPropertiesConfiguration', - 'WebTest', + 'Annotation', + 'InnerError', + 'AnnotationError', 'AnnotationErrorException', + 'APIKeyRequest', + 'ApplicationInsightsComponentAPIKey', 'ApplicationInsightsComponentExportRequest', 'ApplicationInsightsComponentExportConfiguration', - 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions', - 'ApplicationInsightsComponentProactiveDetectionConfiguration', 'ApplicationInsightsComponentDataVolumeCap', 'ApplicationInsightsComponentBillingFeatures', 'ApplicationInsightsComponentQuotaStatus', @@ -78,21 +76,33 @@ 'ApplicationInsightsComponentFeatureCapability', 'ApplicationInsightsComponentFeature', 'ApplicationInsightsComponentAvailableFeatures', - 'APIKeyRequest', - 'ApplicationInsightsComponentAPIKey', - 'Annotation', - 'InnerError', - 'AnnotationError', 'AnnotationErrorException', + 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions', + 'ApplicationInsightsComponentProactiveDetectionConfiguration', + 'Resource', + 'TagsResource', + 'ApplicationInsightsComponent', + 'ComponentPurgeBodyFilters', + 'ComponentPurgeBody', + 'ComponentPurgeResponse', + 'ComponentPurgeStatusResponse', 'WorkItemConfiguration', 'WorkItemCreateConfiguration', 'WorkItemConfigurationError', 'WorkItemConfigurationErrorException', + 'ApplicationInsightsComponentFavorite', + 'ApplicationInsightsComponentWebTestLocation', + 'WebTestGeolocation', + 'WebTestPropertiesConfiguration', + 'WebTest', 'OperationPaged', + 'ApplicationInsightsComponentAPIKeyPaged', 'ApplicationInsightsComponentPaged', + 'ApplicationInsightsComponentWebTestLocationPaged', 'WebTestPaged', - 'ApplicationInsightsComponentAPIKeyPaged', 'ApplicationType', 'FlowType', 'RequestSource', 'PurgeState', + 'FavoriteType', 'WebTestKind', + 'FavoriteSourceType', ] 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_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 2b004aaa1029..c97aa116b0f0 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 @@ -34,7 +34,25 @@ class PurgeState(Enum): completed = "Completed" +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 c2b3367f2ad2..21a96abfc775 100644 --- a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/__init__.py @@ -10,29 +10,35 @@ # -------------------------------------------------------------------------- from .operations import Operations -from .components_operations import ComponentsOperations -from .web_tests_operations import WebTestsOperations +from .annotations_operations import AnnotationsOperations +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 .component_feature_capabilities_operations import ComponentFeatureCapabilitiesOperations from .component_available_features_operations import ComponentAvailableFeaturesOperations -from .api_keys_operations import APIKeysOperations -from .annotations_operations import AnnotationsOperations +from .proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations +from .components_operations import ComponentsOperations from .work_item_configurations_operations import WorkItemConfigurationsOperations +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', + 'AnnotationsOperations', + 'APIKeysOperations', 'ExportConfigurationsOperations', - 'ProactiveDetectionConfigurationsOperations', 'ComponentCurrentBillingFeaturesOperations', 'ComponentQuotaStatusOperations', 'ComponentFeatureCapabilitiesOperations', 'ComponentAvailableFeaturesOperations', - 'APIKeysOperations', - 'AnnotationsOperations', + 'ProactiveDetectionConfigurationsOperations', + 'ComponentsOperations', 'WorkItemConfigurationsOperations', + 'FavoritesOperations', + 'FavoriteOperations', + 'WebTestLocationsOperations', + 'WebTestsOperations', ] 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..5ec2b842628c --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorite_operations.py @@ -0,0 +1,323 @@ +# 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 object 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 = self.get.metadata['url'] + 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 + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites/{favoriteId}'} + + 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 = self.add.metadata['url'] + 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 + add.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites/{favoriteId}'} + + 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 = self.update.metadata['url'] + 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 + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites/{favoriteId}'} + + 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 = self.delete.metadata['url'] + 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 + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites/{favoriteId}'} 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..9367c1413777 --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/favorites_operations.py @@ -0,0 +1,127 @@ +# 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 object 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 or + ~azure.mgmt.applicationinsights.models.FavoriteType + :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: list or ClientRawResponse if raw=true + :rtype: + list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentFavorite] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.list.metadata['url'] + 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, 'FavoriteType') + if source_type is not None: + query_parameters['sourceType'] = self._serialize.query("source_type", source_type, 'str') + 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=',') + + # 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 + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/favorites'} 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..5697b254557e --- /dev/null +++ b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/operations/web_test_locations_operations.py @@ -0,0 +1,112 @@ +# 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 object 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 = self.list.metadata['url'] + 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 + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/syntheticmonitorlocations'} diff --git a/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/version.py b/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/version.py index e7efe25ea7e0..e0ec669828cb 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.1" +VERSION = "0.1.0"