From 807f634534f8b9e0c155a3ab919340e7ad956331 Mon Sep 17 00:00:00 2001 From: AllyW Date: Tue, 8 Apr 2025 17:45:54 +0800 Subject: [PATCH 01/12] migrate app-insights data-plane --- .../aaz/latest/__init__.py | 1 + .../aaz/latest/_clients.py | 49 + .../monitor/app_insights/__cmd_group.py | 2 +- .../app_insights/events/__cmd_group.py | 23 + .../monitor/app_insights/events/__init__.py | 12 + .../monitor/app_insights/events/_show.py | 975 ++++++++++++++++++ .../app_insights/metrics/__cmd_group.py | 23 + .../monitor/app_insights/metrics/__init__.py | 13 + .../app_insights/metrics/_get_metadata.py | 140 +++ .../monitor/app_insights/metrics/_show.py | 231 +++++ .../monitor/app_insights/query/__cmd_group.py | 23 + .../monitor/app_insights/query/__init__.py | 13 + .../monitor/app_insights/query/_execute.py | 212 ++++ .../monitor/app_insights/query/_show.py | 191 ++++ .../azext_metadata.json | 2 +- 15 files changed, 1908 insertions(+), 2 deletions(-) create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/_clients.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__cmd_group.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__init__.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__cmd_group.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__init__.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_get_metadata.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_show.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__cmd_group.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__init__.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_execute.py create mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_show.py diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/__init__.py b/src/application-insights/azext_applicationinsights/aaz/latest/__init__.py index f6acc11aa4e..6439dd20eb7 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/__init__.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/__init__.py @@ -8,3 +8,4 @@ # pylint: skip-file # flake8: noqa +from ._clients import * diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/_clients.py b/src/application-insights/azext_applicationinsights/aaz/latest/_clients.py new file mode 100644 index 00000000000..8de3e57c984 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/_clients.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_client("AAZMicrosoftInsightsDataPlaneClient_application_insights") +class AAZMicrosoftInsightsDataPlaneClient(AAZBaseClient): + _CLOUD_HOST_TEMPLATES = { + CloudNameEnum.AzureChinaCloud: "https://api.applicationinsights.azure.cn", + CloudNameEnum.AzureCloud: "https://api.applicationinsights.io", + CloudNameEnum.AzureUSGovernment: "https://api.applicationinsights.us", + } + _CLOUD_HOST_METADATA_INDEX = "appInsightsResourceId" + + _AAD_CREDENTIAL_SCOPES = [ + "https://api.applicationinsights.io/.default", + ] + + @classmethod + def _build_base_url(cls, ctx, **kwargs): + endpoint = cls.get_cloud_endpoint(ctx, cls._CLOUD_HOST_METADATA_INDEX) + if not endpoint: + endpoint = cls._CLOUD_HOST_TEMPLATES.get(ctx.cli_ctx.cloud.name, None) + return endpoint + + @classmethod + def _build_configuration(cls, ctx, credential, **kwargs): + return AAZClientConfiguration( + credential=credential, + credential_scopes=cls._AAD_CREDENTIAL_SCOPES, + **kwargs + ) + + +class _AAZMicrosoftInsightsDataPlaneClientHelper: + """Helper class for AAZMicrosoftInsightsDataPlaneClient""" + + +__all__ = [ + "AAZMicrosoftInsightsDataPlaneClient", +] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__cmd_group.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__cmd_group.py index c39e6cc3aea..a071f84d9ad 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__cmd_group.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__cmd_group.py @@ -15,7 +15,7 @@ "monitor app-insights", ) class __CMDGroup(AAZCommandGroup): - """Commands for querying data in Application Insights applications. + """Manage App """ pass diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__cmd_group.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__cmd_group.py new file mode 100644 index 00000000000..b629778b418 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "monitor app-insights events", +) +class __CMDGroup(AAZCommandGroup): + """Manage Event + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__init__.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py new file mode 100644 index 00000000000..a144fb1c389 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py @@ -0,0 +1,975 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "monitor app-insights events show", +) +class Show(AAZCommand): + """Get the data for a single event + """ + + _aaz_info = { + "version": "v1", + "resources": [ + ["data-plane:microsoft.insights", "/apps/{}/events/{}", "v1"], + ["data-plane:microsoft.insights", "/apps/{}/events/{}/{}", "v1"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.app_id = AAZStrArg( + options=["--app-id"], + help="ID of the application. This is Application ID from the API Access settings blade in the Azure portal.", + required=True, + ) + _args_schema.event_id = AAZStrArg( + options=["--event-id"], + help="ID of event.", + ) + _args_schema.event_type = AAZStrArg( + options=["--event-type"], + help="The type of events to query; either a standard event type (`traces`, `customEvents`, `pageViews`, `requests`, `dependencies`, `exceptions`, `availabilityResults`) or `$all` to query across all event types.", + required=True, + enum={"$all": "$all", "availabilityResults": "availabilityResults", "browserTimings": "browserTimings", "customEvents": "customEvents", "customMetrics": "customMetrics", "dependencies": "dependencies", "exceptions": "exceptions", "pageViews": "pageViews", "performanceCounters": "performanceCounters", "requests": "requests", "traces": "traces"}, + ) + _args_schema.apply = AAZStrArg( + options=["--apply"], + help="An expression used for aggregation over returned events", + ) + _args_schema.count = AAZBoolArg( + options=["--count"], + help="Request a count of matching items included with the returned events", + ) + _args_schema.filter = AAZStrArg( + options=["--filter"], + help="An expression used to filter the returned events", + ) + _args_schema.format = AAZStrArg( + options=["--format"], + help="Format for the returned events", + ) + _args_schema.orderby = AAZStrArg( + options=["--orderby"], + help="A comma-separated list of properties with \\\"asc\\\" (the default) or \\\"desc\\\" to control the order of returned events", + ) + _args_schema.search = AAZStrArg( + options=["--search"], + help="A free-text search expression to match for whether a particular event should be returned", + ) + _args_schema.select = AAZStrArg( + options=["--select"], + help="Limits the properties to just those requested on each returned event", + ) + _args_schema.skip = AAZIntArg( + options=["--skip"], + help="The number of items to skip over before returning events", + ) + _args_schema.timespan = AAZStrArg( + options=["--timespan"], + help="Optional. The timespan over which to retrieve events. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the Odata expression.", + ) + _args_schema.top = AAZIntArg( + options=["--top"], + help="The number of events to return", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.app_id) and has_value(self.ctx.args.event_id) and has_value(self.ctx.args.event_type) + condition_1 = has_value(self.ctx.args.app_id) and has_value(self.ctx.args.event_type) and has_value(self.ctx.args.event_id) is not True + if condition_0: + self.EventsGet(ctx=self.ctx)() + if condition_1: + self.EventsGetByType(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class EventsGet(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftInsightsDataPlaneClient_application_insights" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/v1/apps/{appId}/events/{eventType}/{eventId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "appId", self.ctx.args.app_id, + required=True, + ), + **self.serialize_url_param( + "eventId", self.ctx.args.event_id, + required=True, + ), + **self.serialize_url_param( + "eventType", self.ctx.args.event_type, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "timespan", self.ctx.args.timespan, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200["@ai.messages"] = AAZListType() + _schema_on_200["@odata.context"] = AAZStrType() + _schema_on_200.value = AAZListType() + + @ai.messages = cls._schema_on_200.@ai.messages + @ai.messages.Element = AAZFreeFormDictType() + _ShowHelper._build_schema_error_info_read(@ai.messages.Element) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.ai = AAZObjectType() + _element.application = AAZObjectType() + _element.client = AAZObjectType() + _element.cloud = AAZObjectType() + _element.count = AAZIntType() + _element.custom_dimensions = AAZObjectType( + serialized_name="customDimensions", + ) + _element.custom_measurements = AAZObjectType( + serialized_name="customMeasurements", + ) + _element.id = AAZStrType() + _element.operation = AAZObjectType() + _element.session = AAZObjectType() + _element.timestamp = AAZStrType() + _element.type = AAZStrType( + flags={"required": True}, + ) + _element.user = AAZObjectType() + + ai = cls._schema_on_200.value.Element.ai + ai.app_id = AAZStrType( + serialized_name="appId", + ) + ai.app_name = AAZStrType( + serialized_name="appName", + ) + ai.i_key = AAZStrType( + serialized_name="iKey", + ) + ai.sdk_version = AAZStrType( + serialized_name="sdkVersion", + ) + + application = cls._schema_on_200.value.Element.application + application.version = AAZStrType() + + client = cls._schema_on_200.value.Element.client + client.browser = AAZStrType() + client.city = AAZStrType() + client.country_or_region = AAZStrType( + serialized_name="countryOrRegion", + ) + client.ip = AAZStrType() + client.model = AAZStrType() + client.os = AAZStrType() + client.state_or_province = AAZStrType( + serialized_name="stateOrProvince", + ) + client.type = AAZStrType() + + cloud = cls._schema_on_200.value.Element.cloud + cloud.role_instance = AAZStrType( + serialized_name="roleInstance", + ) + cloud.role_name = AAZStrType( + serialized_name="roleName", + ) + + custom_dimensions = cls._schema_on_200.value.Element.custom_dimensions + custom_dimensions.additional_properties = AAZDictType( + serialized_name="additionalProperties", + ) + + additional_properties = cls._schema_on_200.value.Element.custom_dimensions.additional_properties + additional_properties.Element = AAZAnyType() + + custom_measurements = cls._schema_on_200.value.Element.custom_measurements + custom_measurements.additional_properties = AAZDictType( + serialized_name="additionalProperties", + ) + + additional_properties = cls._schema_on_200.value.Element.custom_measurements.additional_properties + additional_properties.Element = AAZAnyType() + + operation = cls._schema_on_200.value.Element.operation + operation.id = AAZStrType() + operation.name = AAZStrType() + operation.parent_id = AAZStrType( + serialized_name="parentId", + ) + operation.synthetic_source = AAZStrType( + serialized_name="syntheticSource", + ) + + session = cls._schema_on_200.value.Element.session + session.id = AAZStrType() + + user = cls._schema_on_200.value.Element.user + user.account_id = AAZStrType( + serialized_name="accountId", + ) + user.authenticated_id = AAZStrType( + serialized_name="authenticatedId", + ) + user.id = AAZStrType() + + disc_availability_result = cls._schema_on_200.value.Element.discriminate_by("type", "availabilityResult") + disc_availability_result.availability_result = AAZObjectType( + serialized_name="availabilityResult", + ) + + availability_result = cls._schema_on_200.value.Element.discriminate_by("type", "availabilityResult").availability_result + availability_result.duration = AAZIntType() + availability_result.id = AAZStrType() + availability_result.location = AAZStrType() + availability_result.message = AAZStrType() + availability_result.name = AAZStrType() + availability_result.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + availability_result.size = AAZStrType() + availability_result.success = AAZStrType() + + disc_browser_timing = cls._schema_on_200.value.Element.discriminate_by("type", "browserTiming") + disc_browser_timing.browser_timing = AAZObjectType( + serialized_name="browserTiming", + ) + disc_browser_timing.client_performance = AAZObjectType( + serialized_name="clientPerformance", + ) + + browser_timing = cls._schema_on_200.value.Element.discriminate_by("type", "browserTiming").browser_timing + browser_timing.name = AAZStrType() + browser_timing.network_duration = AAZIntType( + serialized_name="networkDuration", + ) + browser_timing.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + browser_timing.processing_duration = AAZIntType( + serialized_name="processingDuration", + ) + browser_timing.receive_duration = AAZIntType( + serialized_name="receiveDuration", + ) + browser_timing.send_duration = AAZIntType( + serialized_name="sendDuration", + ) + browser_timing.total_duration = AAZIntType( + serialized_name="totalDuration", + ) + browser_timing.url = AAZStrType() + browser_timing.url_host = AAZStrType( + serialized_name="urlHost", + ) + browser_timing.url_path = AAZStrType( + serialized_name="urlPath", + ) + + client_performance = cls._schema_on_200.value.Element.discriminate_by("type", "browserTiming").client_performance + client_performance.name = AAZStrType() + + disc_custom_event = cls._schema_on_200.value.Element.discriminate_by("type", "customEvent") + disc_custom_event.custom_event = AAZObjectType( + serialized_name="customEvent", + ) + + custom_event = cls._schema_on_200.value.Element.discriminate_by("type", "customEvent").custom_event + custom_event.name = AAZStrType() + + disc_custom_metric = cls._schema_on_200.value.Element.discriminate_by("type", "customMetric") + disc_custom_metric.custom_metric = AAZObjectType( + serialized_name="customMetric", + ) + + custom_metric = cls._schema_on_200.value.Element.discriminate_by("type", "customMetric").custom_metric + custom_metric.name = AAZStrType() + custom_metric.value = AAZFloatType() + custom_metric.value_count = AAZIntType( + serialized_name="valueCount", + ) + custom_metric.value_max = AAZFloatType( + serialized_name="valueMax", + ) + custom_metric.value_min = AAZFloatType( + serialized_name="valueMin", + ) + custom_metric.value_std_dev = AAZFloatType( + serialized_name="valueStdDev", + ) + custom_metric.value_sum = AAZFloatType( + serialized_name="valueSum", + ) + + disc_dependency = cls._schema_on_200.value.Element.discriminate_by("type", "dependency") + disc_dependency.dependency = AAZObjectType() + + dependency = cls._schema_on_200.value.Element.discriminate_by("type", "dependency").dependency + dependency.data = AAZStrType() + dependency.duration = AAZIntType() + dependency.id = AAZStrType() + dependency.name = AAZStrType() + dependency.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + dependency.result_code = AAZStrType( + serialized_name="resultCode", + ) + dependency.success = AAZStrType() + dependency.target = AAZStrType() + dependency.type = AAZStrType() + + disc_exception = cls._schema_on_200.value.Element.discriminate_by("type", "exception") + disc_exception.exception = AAZObjectType() + + exception = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception + exception.assembly = AAZStrType() + exception.details = AAZListType() + exception.handled_at = AAZStrType( + serialized_name="handledAt", + ) + exception.innermost_assembly = AAZStrType( + serialized_name="innermostAssembly", + ) + exception.innermost_message = AAZStrType( + serialized_name="innermostMessage", + ) + exception.innermost_method = AAZStrType( + serialized_name="innermostMethod", + ) + exception.innermost_type = AAZStrType( + serialized_name="innermostType", + ) + exception.message = AAZStrType() + exception.method = AAZStrType() + exception.outer_assembly = AAZStrType( + serialized_name="outerAssembly", + ) + exception.outer_message = AAZStrType( + serialized_name="outerMessage", + ) + exception.outer_method = AAZStrType( + serialized_name="outerMethod", + ) + exception.outer_type = AAZStrType( + serialized_name="outerType", + ) + exception.problem_id = AAZStrType( + serialized_name="problemId", + ) + exception.severity_level = AAZIntType( + serialized_name="severityLevel", + ) + exception.type = AAZStrType() + + details = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception.details + details.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception.details.Element + _element.id = AAZStrType() + _element.message = AAZStrType() + _element.outer_id = AAZStrType( + serialized_name="outerId", + ) + _element.parsed_stack = AAZListType( + serialized_name="parsedStack", + ) + _element.severity_level = AAZStrType( + serialized_name="severityLevel", + ) + _element.type = AAZStrType() + + parsed_stack = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception.details.Element.parsed_stack + parsed_stack.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception.details.Element.parsed_stack.Element + _element.assembly = AAZStrType() + _element.level = AAZIntType() + _element.line = AAZIntType() + _element.method = AAZStrType() + + disc_page_view = cls._schema_on_200.value.Element.discriminate_by("type", "pageView") + disc_page_view.page_view = AAZObjectType( + serialized_name="pageView", + ) + + page_view = cls._schema_on_200.value.Element.discriminate_by("type", "pageView").page_view + page_view.duration = AAZStrType() + page_view.name = AAZStrType() + page_view.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + page_view.url = AAZStrType() + + disc_performance_counter = cls._schema_on_200.value.Element.discriminate_by("type", "performanceCounter") + disc_performance_counter.performance_counter = AAZObjectType( + serialized_name="performanceCounter", + ) + + performance_counter = cls._schema_on_200.value.Element.discriminate_by("type", "performanceCounter").performance_counter + performance_counter.category = AAZStrType() + performance_counter.counter = AAZStrType() + performance_counter.instance = AAZStrType() + performance_counter.instance_name = AAZStrType( + serialized_name="instanceName", + ) + performance_counter.name = AAZStrType() + performance_counter.value = AAZFloatType() + + disc_request = cls._schema_on_200.value.Element.discriminate_by("type", "request") + disc_request.request = AAZObjectType() + + request = cls._schema_on_200.value.Element.discriminate_by("type", "request").request + request.duration = AAZFloatType() + request.id = AAZStrType() + request.name = AAZStrType() + request.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + request.result_code = AAZStrType( + serialized_name="resultCode", + ) + request.source = AAZStrType() + request.success = AAZStrType() + request.url = AAZStrType() + + disc_trace = cls._schema_on_200.value.Element.discriminate_by("type", "trace") + disc_trace.trace = AAZObjectType() + + trace = cls._schema_on_200.value.Element.discriminate_by("type", "trace").trace + trace.message = AAZStrType() + trace.severity_level = AAZIntType( + serialized_name="severityLevel", + ) + + return cls._schema_on_200 + + class EventsGetByType(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftInsightsDataPlaneClient_application_insights" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/v1/apps/{appId}/events/{eventType}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "appId", self.ctx.args.app_id, + required=True, + ), + **self.serialize_url_param( + "eventType", self.ctx.args.event_type, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "timespan", self.ctx.args.timespan, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200["@ai.messages"] = AAZListType() + _schema_on_200["@odata.context"] = AAZStrType() + _schema_on_200.value = AAZListType() + + @ai.messages = cls._schema_on_200.@ai.messages + @ai.messages.Element = AAZFreeFormDictType() + _ShowHelper._build_schema_error_info_read(@ai.messages.Element) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.ai = AAZObjectType() + _element.application = AAZObjectType() + _element.client = AAZObjectType() + _element.cloud = AAZObjectType() + _element.count = AAZIntType() + _element.custom_dimensions = AAZObjectType( + serialized_name="customDimensions", + ) + _element.custom_measurements = AAZObjectType( + serialized_name="customMeasurements", + ) + _element.id = AAZStrType() + _element.operation = AAZObjectType() + _element.session = AAZObjectType() + _element.timestamp = AAZStrType() + _element.type = AAZStrType( + flags={"required": True}, + ) + _element.user = AAZObjectType() + + ai = cls._schema_on_200.value.Element.ai + ai.app_id = AAZStrType( + serialized_name="appId", + ) + ai.app_name = AAZStrType( + serialized_name="appName", + ) + ai.i_key = AAZStrType( + serialized_name="iKey", + ) + ai.sdk_version = AAZStrType( + serialized_name="sdkVersion", + ) + + application = cls._schema_on_200.value.Element.application + application.version = AAZStrType() + + client = cls._schema_on_200.value.Element.client + client.browser = AAZStrType() + client.city = AAZStrType() + client.country_or_region = AAZStrType( + serialized_name="countryOrRegion", + ) + client.ip = AAZStrType() + client.model = AAZStrType() + client.os = AAZStrType() + client.state_or_province = AAZStrType( + serialized_name="stateOrProvince", + ) + client.type = AAZStrType() + + cloud = cls._schema_on_200.value.Element.cloud + cloud.role_instance = AAZStrType( + serialized_name="roleInstance", + ) + cloud.role_name = AAZStrType( + serialized_name="roleName", + ) + + custom_dimensions = cls._schema_on_200.value.Element.custom_dimensions + custom_dimensions.additional_properties = AAZDictType( + serialized_name="additionalProperties", + ) + + additional_properties = cls._schema_on_200.value.Element.custom_dimensions.additional_properties + additional_properties.Element = AAZAnyType() + + custom_measurements = cls._schema_on_200.value.Element.custom_measurements + custom_measurements.additional_properties = AAZDictType( + serialized_name="additionalProperties", + ) + + additional_properties = cls._schema_on_200.value.Element.custom_measurements.additional_properties + additional_properties.Element = AAZAnyType() + + operation = cls._schema_on_200.value.Element.operation + operation.id = AAZStrType() + operation.name = AAZStrType() + operation.parent_id = AAZStrType( + serialized_name="parentId", + ) + operation.synthetic_source = AAZStrType( + serialized_name="syntheticSource", + ) + + session = cls._schema_on_200.value.Element.session + session.id = AAZStrType() + + user = cls._schema_on_200.value.Element.user + user.account_id = AAZStrType( + serialized_name="accountId", + ) + user.authenticated_id = AAZStrType( + serialized_name="authenticatedId", + ) + user.id = AAZStrType() + + disc_availability_result = cls._schema_on_200.value.Element.discriminate_by("type", "availabilityResult") + disc_availability_result.availability_result = AAZObjectType( + serialized_name="availabilityResult", + ) + + availability_result = cls._schema_on_200.value.Element.discriminate_by("type", "availabilityResult").availability_result + availability_result.duration = AAZIntType() + availability_result.id = AAZStrType() + availability_result.location = AAZStrType() + availability_result.message = AAZStrType() + availability_result.name = AAZStrType() + availability_result.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + availability_result.size = AAZStrType() + availability_result.success = AAZStrType() + + disc_browser_timing = cls._schema_on_200.value.Element.discriminate_by("type", "browserTiming") + disc_browser_timing.browser_timing = AAZObjectType( + serialized_name="browserTiming", + ) + disc_browser_timing.client_performance = AAZObjectType( + serialized_name="clientPerformance", + ) + + browser_timing = cls._schema_on_200.value.Element.discriminate_by("type", "browserTiming").browser_timing + browser_timing.name = AAZStrType() + browser_timing.network_duration = AAZIntType( + serialized_name="networkDuration", + ) + browser_timing.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + browser_timing.processing_duration = AAZIntType( + serialized_name="processingDuration", + ) + browser_timing.receive_duration = AAZIntType( + serialized_name="receiveDuration", + ) + browser_timing.send_duration = AAZIntType( + serialized_name="sendDuration", + ) + browser_timing.total_duration = AAZIntType( + serialized_name="totalDuration", + ) + browser_timing.url = AAZStrType() + browser_timing.url_host = AAZStrType( + serialized_name="urlHost", + ) + browser_timing.url_path = AAZStrType( + serialized_name="urlPath", + ) + + client_performance = cls._schema_on_200.value.Element.discriminate_by("type", "browserTiming").client_performance + client_performance.name = AAZStrType() + + disc_custom_event = cls._schema_on_200.value.Element.discriminate_by("type", "customEvent") + disc_custom_event.custom_event = AAZObjectType( + serialized_name="customEvent", + ) + + custom_event = cls._schema_on_200.value.Element.discriminate_by("type", "customEvent").custom_event + custom_event.name = AAZStrType() + + disc_custom_metric = cls._schema_on_200.value.Element.discriminate_by("type", "customMetric") + disc_custom_metric.custom_metric = AAZObjectType( + serialized_name="customMetric", + ) + + custom_metric = cls._schema_on_200.value.Element.discriminate_by("type", "customMetric").custom_metric + custom_metric.name = AAZStrType() + custom_metric.value = AAZFloatType() + custom_metric.value_count = AAZIntType( + serialized_name="valueCount", + ) + custom_metric.value_max = AAZFloatType( + serialized_name="valueMax", + ) + custom_metric.value_min = AAZFloatType( + serialized_name="valueMin", + ) + custom_metric.value_std_dev = AAZFloatType( + serialized_name="valueStdDev", + ) + custom_metric.value_sum = AAZFloatType( + serialized_name="valueSum", + ) + + disc_dependency = cls._schema_on_200.value.Element.discriminate_by("type", "dependency") + disc_dependency.dependency = AAZObjectType() + + dependency = cls._schema_on_200.value.Element.discriminate_by("type", "dependency").dependency + dependency.data = AAZStrType() + dependency.duration = AAZIntType() + dependency.id = AAZStrType() + dependency.name = AAZStrType() + dependency.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + dependency.result_code = AAZStrType( + serialized_name="resultCode", + ) + dependency.success = AAZStrType() + dependency.target = AAZStrType() + dependency.type = AAZStrType() + + disc_exception = cls._schema_on_200.value.Element.discriminate_by("type", "exception") + disc_exception.exception = AAZObjectType() + + exception = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception + exception.assembly = AAZStrType() + exception.details = AAZListType() + exception.handled_at = AAZStrType( + serialized_name="handledAt", + ) + exception.innermost_assembly = AAZStrType( + serialized_name="innermostAssembly", + ) + exception.innermost_message = AAZStrType( + serialized_name="innermostMessage", + ) + exception.innermost_method = AAZStrType( + serialized_name="innermostMethod", + ) + exception.innermost_type = AAZStrType( + serialized_name="innermostType", + ) + exception.message = AAZStrType() + exception.method = AAZStrType() + exception.outer_assembly = AAZStrType( + serialized_name="outerAssembly", + ) + exception.outer_message = AAZStrType( + serialized_name="outerMessage", + ) + exception.outer_method = AAZStrType( + serialized_name="outerMethod", + ) + exception.outer_type = AAZStrType( + serialized_name="outerType", + ) + exception.problem_id = AAZStrType( + serialized_name="problemId", + ) + exception.severity_level = AAZIntType( + serialized_name="severityLevel", + ) + exception.type = AAZStrType() + + details = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception.details + details.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception.details.Element + _element.id = AAZStrType() + _element.message = AAZStrType() + _element.outer_id = AAZStrType( + serialized_name="outerId", + ) + _element.parsed_stack = AAZListType( + serialized_name="parsedStack", + ) + _element.severity_level = AAZStrType( + serialized_name="severityLevel", + ) + _element.type = AAZStrType() + + parsed_stack = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception.details.Element.parsed_stack + parsed_stack.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.discriminate_by("type", "exception").exception.details.Element.parsed_stack.Element + _element.assembly = AAZStrType() + _element.level = AAZIntType() + _element.line = AAZIntType() + _element.method = AAZStrType() + + disc_page_view = cls._schema_on_200.value.Element.discriminate_by("type", "pageView") + disc_page_view.page_view = AAZObjectType( + serialized_name="pageView", + ) + + page_view = cls._schema_on_200.value.Element.discriminate_by("type", "pageView").page_view + page_view.duration = AAZStrType() + page_view.name = AAZStrType() + page_view.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + page_view.url = AAZStrType() + + disc_performance_counter = cls._schema_on_200.value.Element.discriminate_by("type", "performanceCounter") + disc_performance_counter.performance_counter = AAZObjectType( + serialized_name="performanceCounter", + ) + + performance_counter = cls._schema_on_200.value.Element.discriminate_by("type", "performanceCounter").performance_counter + performance_counter.category = AAZStrType() + performance_counter.counter = AAZStrType() + performance_counter.instance = AAZStrType() + performance_counter.instance_name = AAZStrType( + serialized_name="instanceName", + ) + performance_counter.name = AAZStrType() + performance_counter.value = AAZFloatType() + + disc_request = cls._schema_on_200.value.Element.discriminate_by("type", "request") + disc_request.request = AAZObjectType() + + request = cls._schema_on_200.value.Element.discriminate_by("type", "request").request + request.duration = AAZFloatType() + request.id = AAZStrType() + request.name = AAZStrType() + request.performance_bucket = AAZStrType( + serialized_name="performanceBucket", + ) + request.result_code = AAZStrType( + serialized_name="resultCode", + ) + request.source = AAZStrType() + request.success = AAZStrType() + request.url = AAZStrType() + + disc_trace = cls._schema_on_200.value.Element.discriminate_by("type", "trace") + disc_trace.trace = AAZObjectType() + + trace = cls._schema_on_200.value.Element.discriminate_by("type", "trace").trace + trace.message = AAZStrType() + trace.severity_level = AAZIntType( + serialized_name="severityLevel", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_error_info_read = None + + @classmethod + def _build_schema_error_info_read(cls, _schema): + if cls._schema_error_info_read is not None: + return + + cls._schema_error_info_read = _schema_error_info_read = AAZFreeFormDictType() + + + +__all__ = ["Show"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__cmd_group.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__cmd_group.py new file mode 100644 index 00000000000..b0e5da688b7 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "monitor app-insights metrics", +) +class __CMDGroup(AAZCommandGroup): + """Manage Metric + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__init__.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__init__.py new file mode 100644 index 00000000000..406f79dcdaf --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._get_metadata import * +from ._show import * diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_get_metadata.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_get_metadata.py new file mode 100644 index 00000000000..6faeb27da9c --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_get_metadata.py @@ -0,0 +1,140 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "monitor app-insights metrics get-metadata", +) +class GetMetadata(AAZCommand): + """Get metadata describing the available metrics + """ + + _aaz_info = { + "version": "v1", + "resources": [ + ["data-plane:microsoft.insights", "/apps/{}/metrics/metadata", "v1"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.app_id = AAZStrArg( + options=["--app-id"], + help="ID of the application. This is Application ID from the API Access settings blade in the Azure portal.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.MetricsGetMetadata(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class MetricsGetMetadata(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftInsightsDataPlaneClient_application_insights" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/v1/apps/{appId}/metrics/metadata", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "appId", self.ctx.args.app_id, + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZDictType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.Element = AAZAnyType() + + return cls._schema_on_200 + + +class _GetMetadataHelper: + """Helper class for GetMetadata""" + + +__all__ = ["GetMetadata"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_show.py new file mode 100644 index 00000000000..3c45cb97349 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_show.py @@ -0,0 +1,231 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "monitor app-insights metrics show", +) +class Show(AAZCommand): + """Get metric values for a single metric + """ + + _aaz_info = { + "version": "v1", + "resources": [ + ["data-plane:microsoft.insights", "/apps/{}/metrics/{}", "v1"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.app_id = AAZStrArg( + options=["--app-id"], + help="ID of the application. This is Application ID from the API Access settings blade in the Azure portal.", + required=True, + ) + _args_schema.metric_id = AAZStrArg( + options=["--metric-id"], + help="ID of the metric. This is either a standard AI metric, or an application-specific custom metric.", + required=True, + enum={"availabilityResults/availabilityPercentage": "availabilityResults/availabilityPercentage", "availabilityResults/duration": "availabilityResults/duration", "billing/telemetryCount": "billing/telemetryCount", "client/networkDuration": "client/networkDuration", "client/processingDuration": "client/processingDuration", "client/receiveDuration": "client/receiveDuration", "client/sendDuration": "client/sendDuration", "client/totalDuration": "client/totalDuration", "customEvents/count": "customEvents/count", "dependencies/count": "dependencies/count", "dependencies/duration": "dependencies/duration", "dependencies/failed": "dependencies/failed", "exceptions/browser": "exceptions/browser", "exceptions/count": "exceptions/count", "exceptions/server": "exceptions/server", "pageViews/count": "pageViews/count", "pageViews/duration": "pageViews/duration", "performanceCounters/exceptionsPerSecond": "performanceCounters/exceptionsPerSecond", "performanceCounters/memoryAvailableBytes": "performanceCounters/memoryAvailableBytes", "performanceCounters/processCpuPercentage": "performanceCounters/processCpuPercentage", "performanceCounters/processIOBytesPerSecond": "performanceCounters/processIOBytesPerSecond", "performanceCounters/processPrivateBytes": "performanceCounters/processPrivateBytes", "performanceCounters/processorCpuPercentage": "performanceCounters/processorCpuPercentage", "performanceCounters/requestExecutionTime": "performanceCounters/requestExecutionTime", "performanceCounters/requestsInQueue": "performanceCounters/requestsInQueue", "performanceCounters/requestsPerSecond": "performanceCounters/requestsPerSecond", "requests/count": "requests/count", "requests/duration": "requests/duration", "requests/failed": "requests/failed", "sessions/count": "sessions/count", "users/authenticated": "users/authenticated", "users/count": "users/count"}, + ) + _args_schema.aggregation = AAZListArg( + options=["--aggregation"], + help="The aggregation to use when computing the metric values. To retrieve more than one aggregation at a time, separate them with a comma. If no aggregation is specified, then the default aggregation for the metric is used.", + fmt=AAZListArgFormat( + min_length=1, + ), + ) + _args_schema.filter = AAZStrArg( + options=["--filter"], + help="An expression used to filter the results. This value should be a valid OData filter expression where the keys of each clause should be applicable dimensions for the metric you are retrieving.", + ) + _args_schema.interval = AAZDurationArg( + options=["--interval"], + help="The time interval to use when retrieving metric values. This is an ISO8601 duration. If interval is omitted, the metric value is aggregated across the entire timespan. If interval is supplied, the server may adjust the interval to a more appropriate size based on the timespan used for the query. In all cases, the actual interval used for the query is included in the response.", + ) + _args_schema.orderby = AAZStrArg( + options=["--orderby"], + help="The aggregation function and direction to sort the segments by. This value is only valid when segment is specified.", + ) + _args_schema.segment = AAZListArg( + options=["--segment"], + help="The name of the dimension to segment the metric values by. This dimension must be applicable to the metric you are retrieving. To segment by more than one dimension at a time, separate them with a comma (,). In this case, the metric data will be segmented in the order the dimensions are listed in the parameter.", + fmt=AAZListArgFormat( + min_length=1, + ), + ) + _args_schema.timespan = AAZStrArg( + options=["--timespan"], + help="The timespan over which to retrieve metric values. This is an ISO8601 time period value. If timespan is omitted, a default time range of `PT12H` (\"last 12 hours\") is used. The actual timespan that is queried may be adjusted by the server based. In all cases, the actual time span used for the query is included in the response.", + ) + _args_schema.top = AAZIntArg( + options=["--top"], + help="The number of segments to return. This value is only valid when segment is specified.", + ) + + aggregation = cls._args_schema.aggregation + aggregation.Element = AAZStrArg( + enum={"avg": "avg", "count": "count", "max": "max", "min": "min", "sum": "sum", "unique": "unique"}, + ) + + segment = cls._args_schema.segment + segment.Element = AAZStrArg( + enum={"applicationBuild": "applicationBuild", "applicationVersion": "applicationVersion", "authenticatedOrAnonymousTraffic": "authenticatedOrAnonymousTraffic", "browser": "browser", "browserVersion": "browserVersion", "city": "city", "cloudRoleName": "cloudRoleName", "cloudServiceName": "cloudServiceName", "continent": "continent", "countryOrRegion": "countryOrRegion", "deploymentId": "deploymentId", "deploymentUnit": "deploymentUnit", "deviceType": "deviceType", "environment": "environment", "hostingLocation": "hostingLocation", "instanceName": "instanceName"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.MetricsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class MetricsGet(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftInsightsDataPlaneClient_application_insights" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/v1/apps/{appId}/metrics/{metricId}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "appId", self.ctx.args.app_id, + required=True, + ), + **self.serialize_url_param( + "metricId", self.ctx.args.metric_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "aggregation", self.ctx.args.aggregation, + ), + **self.serialize_query_param( + "filter", self.ctx.args.filter, + ), + **self.serialize_query_param( + "interval", self.ctx.args.interval, + ), + **self.serialize_query_param( + "orderby", self.ctx.args.orderby, + ), + **self.serialize_query_param( + "segment", self.ctx.args.segment, + ), + **self.serialize_query_param( + "timespan", self.ctx.args.timespan, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZFreeFormDictType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_metrics_segment_info_read = None + + @classmethod + def _build_schema_metrics_segment_info_read(cls, _schema): + if cls._schema_metrics_segment_info_read is not None: + return + + cls._schema_metrics_segment_info_read = _schema_metrics_segment_info_read = AAZFreeFormDictType() + + + +__all__ = ["Show"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__cmd_group.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__cmd_group.py new file mode 100644 index 00000000000..46de46a0e8c --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "monitor app-insights query", +) +class __CMDGroup(AAZCommandGroup): + """Manage Query + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__init__.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__init__.py new file mode 100644 index 00000000000..67f07689ec9 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__init__.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._execute import * +from ._show import * diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_execute.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_execute.py new file mode 100644 index 00000000000..04fc52682a5 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_execute.py @@ -0,0 +1,212 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "monitor app-insights query execute", +) +class Execute(AAZCommand): + """Executes an Analytics query for data. [Here](https://dev.applicationinsights.io/documentation/Using-the-API/Query) is an example for using POST with an Analytics query. + """ + + _aaz_info = { + "version": "v1", + "resources": [ + ["data-plane:microsoft.insights", "/apps/{}/query", "v1"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.app_id = AAZStrArg( + options=["--app-id"], + help="ID of the application. This is Application ID from the API Access settings blade in the Azure portal.", + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.applications = AAZListArg( + options=["--applications"], + arg_group="Body", + help="A list of Application IDs for cross-application queries.", + ) + _args_schema.query = AAZStrArg( + options=["--query"], + arg_group="Body", + help="The query to execute.", + required=True, + ) + _args_schema.timespan = AAZStrArg( + options=["--timespan"], + arg_group="Body", + help="Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression.", + ) + + applications = cls._args_schema.applications + applications.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.QueryExecute(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class QueryExecute(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftInsightsDataPlaneClient_application_insights" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/v1/apps/{appId}/query", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "appId", self.ctx.args.app_id, + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("applications", AAZListType, ".applications") + _builder.set_prop("query", AAZStrType, ".query", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("timespan", AAZStrType, ".timespan") + + applications = _builder.get(".applications") + if applications is not None: + applications.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.tables = AAZListType( + flags={"required": True}, + ) + + tables = cls._schema_on_200.tables + tables.Element = AAZObjectType() + + _element = cls._schema_on_200.tables.Element + _element.columns = AAZListType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.rows = AAZListType( + flags={"required": True}, + ) + + columns = cls._schema_on_200.tables.Element.columns + columns.Element = AAZObjectType() + + _element = cls._schema_on_200.tables.Element.columns.Element + _element.name = AAZStrType() + _element.type = AAZStrType() + + rows = cls._schema_on_200.tables.Element.rows + rows.Element = AAZListType() + + _element = cls._schema_on_200.tables.Element.rows.Element + _element.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ExecuteHelper: + """Helper class for Execute""" + + +__all__ = ["Execute"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_show.py new file mode 100644 index 00000000000..afef6273ead --- /dev/null +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_show.py @@ -0,0 +1,191 @@ +# -------------------------------------------------------------------------------------------- +# 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 aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "monitor app-insights query show", +) +class Show(AAZCommand): + """Get an Analytics query for data + """ + + _aaz_info = { + "version": "v1", + "resources": [ + ["data-plane:microsoft.insights", "/apps/{}/query", "v1"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.app_id = AAZStrArg( + options=["--app-id"], + help="ID of the application. This is Application ID from the API Access settings blade in the Azure portal.", + required=True, + ) + _args_schema.query = AAZStrArg( + options=["--query"], + help="The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)", + required=True, + ) + _args_schema.timespan = AAZStrArg( + options=["--timespan"], + help="Optional. The timespan over which to query data. This is an ISO8601 time period value. This timespan is applied in addition to any that are specified in the query expression.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.QueryGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class QueryGet(AAZHttpOperation): + CLIENT_TYPE = "AAZMicrosoftInsightsDataPlaneClient_application_insights" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/v1/apps/{appId}/query", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "ODataV4Format" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "appId", self.ctx.args.app_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "query", self.ctx.args.query, + required=True, + ), + **self.serialize_query_param( + "timespan", self.ctx.args.timespan, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.tables = AAZListType( + flags={"required": True}, + ) + + tables = cls._schema_on_200.tables + tables.Element = AAZObjectType() + + _element = cls._schema_on_200.tables.Element + _element.columns = AAZListType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.rows = AAZListType( + flags={"required": True}, + ) + + columns = cls._schema_on_200.tables.Element.columns + columns.Element = AAZObjectType() + + _element = cls._schema_on_200.tables.Element.columns.Element + _element.name = AAZStrType() + _element.type = AAZStrType() + + rows = cls._schema_on_200.tables.Element.rows + rows.Element = AAZListType() + + _element = cls._schema_on_200.tables.Element.rows.Element + _element.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/application-insights/azext_applicationinsights/azext_metadata.json b/src/application-insights/azext_applicationinsights/azext_metadata.json index a3b0ca7605e..b9c3b873766 100644 --- a/src/application-insights/azext_applicationinsights/azext_metadata.json +++ b/src/application-insights/azext_applicationinsights/azext_metadata.json @@ -1,3 +1,3 @@ { - "azext.minCliCoreVersion": "2.55.0" + "azext.minCliCoreVersion": "2.70.0" } \ No newline at end of file From fde32eb16c31225f34f514f9a6962459ffce30f0 Mon Sep 17 00:00:00 2001 From: AllyW Date: Wed, 9 Apr 2025 13:55:29 +0800 Subject: [PATCH 02/12] fix event show --- .../monitor/app_insights/events/_show.py | 71 +++++++++++++------ 1 file changed, 49 insertions(+), 22 deletions(-) diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py index a144fb1c389..934fe0d54a7 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py @@ -101,12 +101,12 @@ def _build_arguments_schema(cls, *args, **kwargs): def _execute_operations(self): self.pre_operations() - condition_0 = has_value(self.ctx.args.app_id) and has_value(self.ctx.args.event_id) and has_value(self.ctx.args.event_type) - condition_1 = has_value(self.ctx.args.app_id) and has_value(self.ctx.args.event_type) and has_value(self.ctx.args.event_id) is not True + condition_0 = has_value(self.ctx.args.app_id) and has_value(self.ctx.args.event_type) and has_value(self.ctx.args.event_id) is not True + condition_1 = has_value(self.ctx.args.app_id) and has_value(self.ctx.args.event_id) and has_value(self.ctx.args.event_type) if condition_0: - self.EventsGet(ctx=self.ctx)() - if condition_1: self.EventsGetByType(ctx=self.ctx)() + if condition_1: + self.EventsGet(ctx=self.ctx)() self.post_operations() @register_callback @@ -121,7 +121,7 @@ def _output(self, *args, **kwargs): result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) return result - class EventsGet(AAZHttpOperation): + class EventsGetByType(AAZHttpOperation): CLIENT_TYPE = "AAZMicrosoftInsightsDataPlaneClient_application_insights" def __call__(self, *args, **kwargs): @@ -135,7 +135,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/v1/apps/{appId}/events/{eventType}/{eventId}", + "/v1/apps/{appId}/events/{eventType}", **self.url_parameters ) @@ -154,10 +154,6 @@ def url_parameters(self): "appId", self.ctx.args.app_id, required=True, ), - **self.serialize_url_param( - "eventId", self.ctx.args.event_id, - required=True, - ), **self.serialize_url_param( "eventType", self.ctx.args.event_type, required=True, @@ -168,6 +164,33 @@ def url_parameters(self): @property def query_parameters(self): parameters = { + **self.serialize_query_param( + "$apply", self.ctx.args.apply, + ), + **self.serialize_query_param( + "$count", self.ctx.args.count, + ), + **self.serialize_query_param( + "$filter", self.ctx.args.filter, + ), + **self.serialize_query_param( + "$format", self.ctx.args.format, + ), + **self.serialize_query_param( + "$orderby", self.ctx.args.orderby, + ), + **self.serialize_query_param( + "$search", self.ctx.args.search, + ), + **self.serialize_query_param( + "$select", self.ctx.args.select, + ), + **self.serialize_query_param( + "$skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "$top", self.ctx.args.top, + ), **self.serialize_query_param( "timespan", self.ctx.args.timespan, ), @@ -201,13 +224,13 @@ def _build_schema_on_200(cls): cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 - _schema_on_200["@ai.messages"] = AAZListType() - _schema_on_200["@odata.context"] = AAZStrType() + _schema_on_200["ai.messages"] = AAZListType() + _schema_on_200["odata.context"] = AAZStrType() _schema_on_200.value = AAZListType() - @ai.messages = cls._schema_on_200.@ai.messages - @ai.messages.Element = AAZFreeFormDictType() - _ShowHelper._build_schema_error_info_read(@ai.messages.Element) + ai.messages = cls._schema_on_200.ai.messages + ai.messages.Element = AAZFreeFormDictType() + _ShowHelper._build_schema_error_info_read(ai.messages.Element) value = cls._schema_on_200.value value.Element = AAZObjectType() @@ -541,7 +564,7 @@ def _build_schema_on_200(cls): return cls._schema_on_200 - class EventsGetByType(AAZHttpOperation): + class EventsGet(AAZHttpOperation): CLIENT_TYPE = "AAZMicrosoftInsightsDataPlaneClient_application_insights" def __call__(self, *args, **kwargs): @@ -555,7 +578,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/v1/apps/{appId}/events/{eventType}", + "/v1/apps/{appId}/events/{eventType}/{eventId}", **self.url_parameters ) @@ -574,6 +597,10 @@ def url_parameters(self): "appId", self.ctx.args.app_id, required=True, ), + **self.serialize_url_param( + "eventId", self.ctx.args.event_id, + required=True, + ), **self.serialize_url_param( "eventType", self.ctx.args.event_type, required=True, @@ -617,13 +644,13 @@ def _build_schema_on_200(cls): cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 - _schema_on_200["@ai.messages"] = AAZListType() - _schema_on_200["@odata.context"] = AAZStrType() + _schema_on_200["ai.messages"] = AAZListType() + _schema_on_200["odata.context"] = AAZStrType() _schema_on_200.value = AAZListType() - @ai.messages = cls._schema_on_200.@ai.messages - @ai.messages.Element = AAZFreeFormDictType() - _ShowHelper._build_schema_error_info_read(@ai.messages.Element) + ai.messages = cls._schema_on_200.ai.messages + ai.messages.Element = AAZFreeFormDictType() + _ShowHelper._build_schema_error_info_read(ai.messages.Element) value = cls._schema_on_200.value value.Element = AAZObjectType() From 27e4b2542689e44f5197863b1f9c82f88e98111f Mon Sep 17 00:00:00 2001 From: AllyW Date: Wed, 9 Apr 2025 14:12:23 +0800 Subject: [PATCH 03/12] fix data plane of app insights --- .../latest/monitor/app_insights/__init__.py | 2 ++ .../{query/_execute.py => _query_execute.py} | 10 ++++---- .../{query/_show.py => _query_show.py} | 10 ++++---- .../monitor/app_insights/query/__cmd_group.py | 23 ------------------- .../monitor/app_insights/query/__init__.py | 13 ----------- 5 files changed, 12 insertions(+), 46 deletions(-) rename src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/{query/_execute.py => _query_execute.py} (97%) rename src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/{query/_show.py => _query_show.py} (97%) delete mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__cmd_group.py delete mode 100644 src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__init__.py diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__init__.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__init__.py index 71d02f13328..caa40985d1c 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__init__.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__init__.py @@ -10,3 +10,5 @@ from .__cmd_group import * from ._migrate_to_new_pricing_model import * +from ._query_execute import * +from ._query_show import * diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_execute.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py similarity index 97% rename from src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_execute.py rename to src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py index 04fc52682a5..5e32a7d1f8e 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_execute.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py @@ -12,9 +12,9 @@ @register_command( - "monitor app-insights query execute", + "monitor app-insights query-execute", ) -class Execute(AAZCommand): +class QueryExecute(AAZCommand): """Executes an Analytics query for data. [Here](https://dev.applicationinsights.io/documentation/Using-the-API/Query) is an example for using POST with an Analytics query. """ @@ -205,8 +205,8 @@ def _build_schema_on_200(cls): return cls._schema_on_200 -class _ExecuteHelper: - """Helper class for Execute""" +class _QueryExecuteHelper: + """Helper class for QueryExecute""" -__all__ = ["Execute"] +__all__ = ["QueryExecute"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py similarity index 97% rename from src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_show.py rename to src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py index afef6273ead..72c8248fa62 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/_show.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py @@ -12,9 +12,9 @@ @register_command( - "monitor app-insights query show", + "monitor app-insights query-show", ) -class Show(AAZCommand): +class QueryShow(AAZCommand): """Get an Analytics query for data """ @@ -184,8 +184,8 @@ def _build_schema_on_200(cls): return cls._schema_on_200 -class _ShowHelper: - """Helper class for Show""" +class _QueryShowHelper: + """Helper class for QueryShow""" -__all__ = ["Show"] +__all__ = ["QueryShow"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__cmd_group.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__cmd_group.py deleted file mode 100644 index 46de46a0e8c..00000000000 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "monitor app-insights query", -) -class __CMDGroup(AAZCommandGroup): - """Manage Query - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__init__.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__init__.py deleted file mode 100644 index 67f07689ec9..00000000000 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/query/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._execute import * -from ._show import * From 7732bfe6bebf70dc041ea7326eca1fd0cfd7d8fb Mon Sep 17 00:00:00 2001 From: AllyW Date: Wed, 9 Apr 2025 14:26:45 +0800 Subject: [PATCH 04/12] fix style --- .../aaz/latest/monitor/app_insights/_query_execute.py | 6 +++--- .../aaz/latest/monitor/app_insights/_query_show.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py index 5e32a7d1f8e..918b5e3ec7c 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py @@ -55,8 +55,8 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Body", help="A list of Application IDs for cross-application queries.", ) - _args_schema.query = AAZStrArg( - options=["--query"], + _args_schema.s_query = AAZStrArg( + options=["--s-query"], arg_group="Body", help="The query to execute.", required=True, @@ -144,7 +144,7 @@ def content(self): typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("applications", AAZListType, ".applications") - _builder.set_prop("query", AAZStrType, ".query", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("query", AAZStrType, ".s_query", typ_kwargs={"flags": {"required": True}}) _builder.set_prop("timespan", AAZStrType, ".timespan") applications = _builder.get(".applications") diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py index 72c8248fa62..03d551a5802 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py @@ -46,8 +46,8 @@ def _build_arguments_schema(cls, *args, **kwargs): help="ID of the application. This is Application ID from the API Access settings blade in the Azure portal.", required=True, ) - _args_schema.query = AAZStrArg( - options=["--query"], + _args_schema.s_query = AAZStrArg( + options=["--s-query"], help="The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)", required=True, ) @@ -114,7 +114,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "query", self.ctx.args.query, + "query", self.ctx.args.s_query, required=True, ), **self.serialize_query_param( From 9b55d249216f949add7056c3d899454993af6d45 Mon Sep 17 00:00:00 2001 From: AllyW Date: Wed, 9 Apr 2025 14:37:47 +0800 Subject: [PATCH 05/12] fix style --- .../aaz/latest/monitor/app_insights/_query_execute.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py index 918b5e3ec7c..48b575e1202 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py @@ -16,6 +16,9 @@ ) class QueryExecute(AAZCommand): """Executes an Analytics query for data. [Here](https://dev.applicationinsights.io/documentation/Using-the-API/Query) is an example for using POST with an Analytics query. + + :example: queryPost + az monitor app-insights query-execute --app-id 34adfa4f-cedf-4dc0-ba29-b6d1a69ab345 --timespan PT12H --s-query requests | summarize count() by bin(timestamp, 1h) """ _aaz_info = { From 69e756db26cb9320723ce162df03ce4b13a886fa Mon Sep 17 00:00:00 2001 From: AllyW Date: Tue, 15 Apr 2025 17:41:43 +0800 Subject: [PATCH 06/12] add test --- src/application-insights/HISTORY.rst | 4 + .../azext_applicationinsights/__init__.py | 2 - .../_client_factory.py | 47 -- .../monitor/app_insights/_query_execute.py | 14 +- .../monitor/app_insights/_query_show.py | 11 +- .../monitor/app_insights/events/_show.py | 28 +- .../{metrics => metric}/__cmd_group.py | 3 - .../{metrics => metric}/__init__.py | 0 .../{metrics => metric}/_get_metadata.py | 3 - .../app_insights/{metrics => metric}/_show.py | 3 - .../azext_applicationinsights/commands.py | 24 +- .../azext_applicationinsights/custom.py | 55 +- .../recordings/test_events_show_for_app.yaml | 248 ++++++ .../test_metrics_get_metadata_for_app.yaml | 301 ++++++++ .../recordings/test_metrics_show_for_app.yaml | 400 ++++++++++ .../test_query_execute_for_app.yaml | 729 ++++++++++++++++++ .../test_applicationinsights_commands.py | 169 +++- 17 files changed, 1922 insertions(+), 119 deletions(-) rename src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/{metrics => metric}/__cmd_group.py (89%) rename src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/{metrics => metric}/__init__.py (100%) rename src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/{metrics => metric}/_get_metadata.py (98%) rename src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/{metrics => metric}/_show.py (99%) create mode 100644 src/application-insights/azext_applicationinsights/tests/latest/recordings/test_events_show_for_app.yaml create mode 100644 src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_get_metadata_for_app.yaml create mode 100644 src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_show_for_app.yaml create mode 100644 src/application-insights/azext_applicationinsights/tests/latest/recordings/test_query_execute_for_app.yaml diff --git a/src/application-insights/HISTORY.rst b/src/application-insights/HISTORY.rst index 3e6925b9e1e..d34678a06bd 100644 --- a/src/application-insights/HISTORY.rst +++ b/src/application-insights/HISTORY.rst @@ -2,6 +2,10 @@ Release History =============== +1.3.0 +++++++++++++++++++ +* `az monitor app-insights events/metrics/query`: Migrate data-plane using codegen tool + 1.2.3 ++++++++++++++++++ * `az monitor app-insights events/metrics/query`: Fix error: Profile.get_login_credentials() got an unexpected keyword argument 'resource' diff --git a/src/application-insights/azext_applicationinsights/__init__.py b/src/application-insights/azext_applicationinsights/__init__.py index 450b8d89b84..af20db860fa 100644 --- a/src/application-insights/azext_applicationinsights/__init__.py +++ b/src/application-insights/azext_applicationinsights/__init__.py @@ -12,10 +12,8 @@ class ApplicationInsightsCommandsLoader(AzCommandsLoader): def __init__(self, cli_ctx=None): from azure.cli.core.commands import CliCommandType - from azext_applicationinsights._client_factory import applicationinsights_data_plane_client applicationinsights_custom = CliCommandType( operations_tmpl='azext_applicationinsights.custom#{}', - client_factory=applicationinsights_data_plane_client ) super().__init__( diff --git a/src/application-insights/azext_applicationinsights/_client_factory.py b/src/application-insights/azext_applicationinsights/_client_factory.py index 8ff92cd72df..de1e60ec464 100644 --- a/src/application-insights/azext_applicationinsights/_client_factory.py +++ b/src/application-insights/azext_applicationinsights/_client_factory.py @@ -3,41 +3,6 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -class _Track1Credential: # pylint: disable=too-few-public-methods - - def __init__(self, credential, resource): - """Track 1 credential that can be fed into Track 1 SDK clients. Exposes signed_session protocol. - :param credential: Track 2 credential that exposes get_token protocol - :param resource: AAD resource - """ - self._credential = credential - self._resource = resource - - def signed_session(self, session=None): - import requests - from azure.cli.core.auth.util import resource_to_scopes - session = session or requests.Session() - token = self._credential.get_token(*resource_to_scopes(self._resource)) - header = "{} {}".format('Bearer', token.token) - session.headers['Authorization'] = header - return session - - -def applicationinsights_data_plane_client(cli_ctx, _, subscription=None): - """Initialize Log Analytics data client for use with CLI.""" - from .vendored_sdks.applicationinsights import ApplicationInsightsDataClient - from azure.cli.core._profile import Profile - profile = Profile(cli_ctx=cli_ctx) - # Note: temporarily adapt track2 auth to track1 by the guidance: - # https://github.com/Azure/azure-cli/pull/29631#issuecomment-2716799520 - # need to be removed after migrated by codegen - cred, _, _ = profile.get_login_credentials(subscription_id=subscription) - return ApplicationInsightsDataClient( - _Track1Credential(cred, cli_ctx.cloud.endpoints.app_insights_resource_id), - base_url=f'{cli_ctx.cloud.endpoints.app_insights_resource_id}/v1' - ) - - def applicationinsights_mgmt_plane_client(cli_ctx, **kwargs): """Initialize Log Analytics mgmt client for use with CLI.""" from .vendored_sdks.mgmt_applicationinsights import ApplicationInsightsManagementClient @@ -45,18 +10,6 @@ def applicationinsights_mgmt_plane_client(cli_ctx, **kwargs): return get_mgmt_service_client(cli_ctx, ApplicationInsightsManagementClient, **kwargs) -def cf_query(cli_ctx, _): - return applicationinsights_data_plane_client(cli_ctx, _).query - - -def cf_metrics(cli_ctx, _): - return applicationinsights_data_plane_client(cli_ctx, _).metrics - - -def cf_events(cli_ctx, _): - return applicationinsights_data_plane_client(cli_ctx, _).events - - def cf_components(cli_ctx, _): return applicationinsights_mgmt_plane_client(cli_ctx, api_version='2018-05-01-preview').components diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py index 48b575e1202..a9e60d46922 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py @@ -11,14 +11,8 @@ from azure.cli.core.aaz import * -@register_command( - "monitor app-insights query-execute", -) class QueryExecute(AAZCommand): """Executes an Analytics query for data. [Here](https://dev.applicationinsights.io/documentation/Using-the-API/Query) is an example for using POST with an Analytics query. - - :example: queryPost - az monitor app-insights query-execute --app-id 34adfa4f-cedf-4dc0-ba29-b6d1a69ab345 --timespan PT12H --s-query requests | summarize count() by bin(timestamp, 1h) """ _aaz_info = { @@ -58,8 +52,8 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Body", help="A list of Application IDs for cross-application queries.", ) - _args_schema.s_query = AAZStrArg( - options=["--s-query"], + _args_schema.query = AAZStrArg( + options=["--query"], arg_group="Body", help="The query to execute.", required=True, @@ -147,7 +141,7 @@ def content(self): typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("applications", AAZListType, ".applications") - _builder.set_prop("query", AAZStrType, ".s_query", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("query", AAZStrType, ".query", typ_kwargs={"flags": {"required": True}}) _builder.set_prop("timespan", AAZStrType, ".timespan") applications = _builder.get(".applications") @@ -203,7 +197,7 @@ def _build_schema_on_200(cls): rows.Element = AAZListType() _element = cls._schema_on_200.tables.Element.rows.Element - _element.Element = AAZStrType() + _element.Element = AAZAnyType() return cls._schema_on_200 diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py index 03d551a5802..c54a4bd8ac7 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_show.py @@ -11,9 +11,6 @@ from azure.cli.core.aaz import * -@register_command( - "monitor app-insights query-show", -) class QueryShow(AAZCommand): """Get an Analytics query for data """ @@ -46,8 +43,8 @@ def _build_arguments_schema(cls, *args, **kwargs): help="ID of the application. This is Application ID from the API Access settings blade in the Azure portal.", required=True, ) - _args_schema.s_query = AAZStrArg( - options=["--s-query"], + _args_schema.query = AAZStrArg( + options=["--query"], help="The Analytics query. Learn more about the [Analytics query syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/)", required=True, ) @@ -114,7 +111,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "query", self.ctx.args.s_query, + "query", self.ctx.args.query, required=True, ), **self.serialize_query_param( @@ -179,7 +176,7 @@ def _build_schema_on_200(cls): rows.Element = AAZListType() _element = cls._schema_on_200.tables.Element.rows.Element - _element.Element = AAZStrType() + _element.Element = AAZAnyType() return cls._schema_on_200 diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py index 934fe0d54a7..dd3a24842de 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py @@ -224,13 +224,17 @@ def _build_schema_on_200(cls): cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 - _schema_on_200["ai.messages"] = AAZListType() - _schema_on_200["odata.context"] = AAZStrType() + _schema_on_200.ai_messages = AAZListType( + serialized_name="aiMessages", + ) + _schema_on_200.odata_context = AAZStrType( + serialized_name="odataContext", + ) _schema_on_200.value = AAZListType() - ai.messages = cls._schema_on_200.ai.messages - ai.messages.Element = AAZFreeFormDictType() - _ShowHelper._build_schema_error_info_read(ai.messages.Element) + ai_messages = cls._schema_on_200.ai_messages + ai_messages.Element = AAZFreeFormDictType() + _ShowHelper._build_schema_error_info_read(ai_messages.Element) value = cls._schema_on_200.value value.Element = AAZObjectType() @@ -644,13 +648,17 @@ def _build_schema_on_200(cls): cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 - _schema_on_200["ai.messages"] = AAZListType() - _schema_on_200["odata.context"] = AAZStrType() + _schema_on_200.ai_messages = AAZListType( + serialized_name="aiMessages", + ) + _schema_on_200.odata_context = AAZStrType( + serialized_name="odataContext", + ) _schema_on_200.value = AAZListType() - ai.messages = cls._schema_on_200.ai.messages - ai.messages.Element = AAZFreeFormDictType() - _ShowHelper._build_schema_error_info_read(ai.messages.Element) + ai_messages = cls._schema_on_200.ai_messages + ai_messages.Element = AAZFreeFormDictType() + _ShowHelper._build_schema_error_info_read(ai_messages.Element) value = cls._schema_on_200.value value.Element = AAZObjectType() diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__cmd_group.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/__cmd_group.py similarity index 89% rename from src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__cmd_group.py rename to src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/__cmd_group.py index b0e5da688b7..87bd93c29d7 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__cmd_group.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/__cmd_group.py @@ -11,9 +11,6 @@ from azure.cli.core.aaz import * -@register_command_group( - "monitor app-insights metrics", -) class __CMDGroup(AAZCommandGroup): """Manage Metric """ diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__init__.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/__init__.py similarity index 100% rename from src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/__init__.py rename to src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/__init__.py diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_get_metadata.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/_get_metadata.py similarity index 98% rename from src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_get_metadata.py rename to src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/_get_metadata.py index 6faeb27da9c..e47566dc659 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_get_metadata.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/_get_metadata.py @@ -11,9 +11,6 @@ from azure.cli.core.aaz import * -@register_command( - "monitor app-insights metrics get-metadata", -) class GetMetadata(AAZCommand): """Get metadata describing the available metrics """ diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/_show.py similarity index 99% rename from src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_show.py rename to src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/_show.py index 3c45cb97349..332000ada25 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metrics/_show.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/metric/_show.py @@ -11,9 +11,6 @@ from azure.cli.core.aaz import * -@register_command( - "monitor app-insights metrics show", -) class Show(AAZCommand): """Get metric values for a single metric """ diff --git a/src/application-insights/azext_applicationinsights/commands.py b/src/application-insights/azext_applicationinsights/commands.py index 40fc38934ce..d7cd84b55fc 100644 --- a/src/application-insights/azext_applicationinsights/commands.py +++ b/src/application-insights/azext_applicationinsights/commands.py @@ -9,9 +9,6 @@ from azure.cli.core.commands import CliCommandType from azext_applicationinsights._client_factory import ( - cf_events, - cf_metrics, - cf_query, cf_components, cf_export_configuration, cf_web_test @@ -20,21 +17,6 @@ def load_command_table(self, _): - metrics_sdk = CliCommandType( - operations_tmpl='azext_applicationinsights.vendored_sdks.applicationinsights.operations.metrics_operations#MetricsOperations.{}', - client_factory=cf_metrics - ) - - events_sdk = CliCommandType( - operations_tmpl='azext_applicationinsights.vendored_sdks.applicationinsights.operations.events_operations#EventsOperations.{}', - client_factory=cf_events - ) - - query_sdk = CliCommandType( - operations_tmpl='azext_applicationinsights.vendored_sdks.applicationinsights.operations.query_operations#QueryOperations.{}', - client_factory=cf_query - ) - components_sdk = CliCommandType( operations_tmpl='azext_applicationinsights.vendored_sdks.mgmt_applicationinsights.operations.components_operations#ComponentsOperations.{}', client_factory=cf_components @@ -85,14 +67,14 @@ def load_command_table(self, _): self.command_table['monitor app-insights api-key show'] = APIKeyShow(loader=self) self.command_table['monitor app-insights api-key delete'] = APIKeyDelete(loader=self) - with self.command_group('monitor app-insights metrics', metrics_sdk) as g: + with self.command_group('monitor app-insights metrics') as g: g.custom_show_command('show', 'get_metric') g.custom_command('get-metadata', 'get_metrics_metadata') - with self.command_group('monitor app-insights events', events_sdk) as g: + with self.command_group('monitor app-insights events') as g: g.custom_show_command('show', 'get_events') - with self.command_group('monitor app-insights', query_sdk) as g: + with self.command_group('monitor app-insights') as g: g.custom_command('query', 'execute_query') with self.command_group('monitor app-insights component linked-storage'): diff --git a/src/application-insights/azext_applicationinsights/custom.py b/src/application-insights/azext_applicationinsights/custom.py index 7b03265f296..681e236c8fe 100644 --- a/src/application-insights/azext_applicationinsights/custom.py +++ b/src/application-insights/azext_applicationinsights/custom.py @@ -29,33 +29,64 @@ HELP_MESSAGE = " Please use `az feature register --name AIWorkspacePreview --namespace microsoft.insights` to register the feature" -def execute_query(cmd, client, application, analytics_query, start_time=None, end_time=None, offset='1h', resource_group_name=None): +def execute_query(cmd, application, analytics_query, start_time=None, end_time=None, offset='1h', resource_group_name=None): """Executes a query against the provided Application Insights application.""" - from .vendored_sdks.applicationinsights.models import QueryBody + from .aaz.latest.monitor.app_insights import QueryExecute targets = get_query_targets(cmd.cli_ctx, application, resource_group_name) if not isinstance(offset, datetime.timedelta): offset = isodate.parse_duration(offset) + timespan = get_timespan(cmd.cli_ctx, start_time, end_time, offset) + arg_obj = { + "app_id": targets[0], + "query": analytics_query, + "timespan": timespan, + "applications": targets[1:], + } try: - return client.query.execute(targets[0], QueryBody(query=analytics_query, timespan=get_timespan(cmd.cli_ctx, start_time, end_time, offset), applications=targets[1:])) + return QueryExecute(cli_ctx=cmd.cli_ctx)(command_args=arg_obj) except ErrorResponseException as ex: if "PathNotFoundError" in ex.message: raise ValueError("The Application Insight is not found. Please check the app id again.") raise ex -def get_events(cmd, client, application, event_type, event=None, start_time=None, end_time=None, offset='1h', resource_group_name=None): +def get_events(cmd, application, event_type, event=None, start_time=None, end_time=None, offset='1h', resource_group_name=None): timespan = get_timespan(cmd.cli_ctx, start_time, end_time, offset) + app_id = get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name) + from .aaz.latest.monitor.app_insights.events import Show + arg_obj = { + "app_id": app_id, + "event_type": event_type, + "timespan": timespan, + } if event: - return client.events.get(get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name), event_type, event, timespan=timespan) - return client.events.get_by_type(get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name), event_type, timespan=get_timespan(cmd.cli_ctx, start_time, end_time, offset)) - + arg_obj["event_id"] = event + return Show(cli_ctx=cmd.cli_ctx)(command_args=arg_obj) -def get_metric(cmd, client, application, metric, start_time=None, end_time=None, offset='1h', interval=None, aggregation=None, segment=None, top=None, orderby=None, filter_arg=None, resource_group_name=None): - return client.metrics.get(get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name), metric, timespan=get_timespan(cmd.cli_ctx, start_time, end_time, offset), interval=interval, aggregation=aggregation, segment=segment, top=top, orderby=orderby, filter_arg=filter_arg) - -def get_metrics_metadata(cmd, client, application, resource_group_name=None): - return client.metrics.get_metadata(get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name)) +def get_metric(cmd, application, metric, start_time=None, end_time=None, offset='1h', interval=None, aggregation=None, segment=None, top=None, orderby=None, filter_arg=None, resource_group_name=None): + from .aaz.latest.monitor.app_insights.metric import Show + timespan = get_timespan(cmd.cli_ctx, start_time, end_time, offset) + arg_obj = { + "app_id": get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name), + "metric_id": metric, + "timespan": timespan, + "interval": interval, + "aggregation": aggregation, + "segment": segment, + "top": top, + "orderby": orderby, + "filter": filter_arg + } + return Show(cli_ctx=cmd.cli_ctx)(command_args=arg_obj) + + +def get_metrics_metadata(cmd, application, resource_group_name=None): + from .aaz.latest.monitor.app_insights.metric import GetMetadata + arg_obj = { + "app_id": get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name), + } + return GetMetadata(cli_ctx=cmd.cli_ctx)(command_args=arg_obj) def create_or_update_component(cmd, client, application, resource_group_name, location, tags=None, diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_events_show_for_app.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_events_show_for_app.yaml new file mode 100644 index 00000000000..534e0d45027 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_events_show_for_app.yaml @@ -0,0 +1,248 @@ +interactions: +- request: + body: '{"location": "westus", "kind": "web", "properties": {"Application_Type": + "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays": + 120, "IngestionMode": "ApplicationInsights"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component create + Connection: + - keep-alive + Content-Length: + - '196' + Content-Type: + - application/json + ParameterSetName: + - --app --location --kind -g --application-type --retention-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2018-05-01-preview + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f100214d-0000-0200-0000-67fe24e20000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"70241276-2104-4a9a-bdd2-e1d35d4b6a0b\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"6d4048d4-ee0b-4e85-9bdf-d6415e0ce81b\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=6d4048d4-ee0b-4e85-9bdf-d6415e0ce81b;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=70241276-2104-4a9a-bdd2-e1d35d4b6a0b\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T09:20:23.0494469+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_70241276-2104-4a9a-bdd2-e1d35d4b6a0b_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:20:34 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japanwest/f06a69ba-24a6-4294-b847-d5f90846b452 + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 074E71073A33412E9C06D5ADE57D6B72 Ref B: TYO201100114031 Ref C: 2025-04-15T09:20:20Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component show + Connection: + - keep-alive + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2020-02-02-preview + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f100214d-0000-0200-0000-67fe24e20000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"70241276-2104-4a9a-bdd2-e1d35d4b6a0b\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"6d4048d4-ee0b-4e85-9bdf-d6415e0ce81b\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=6d4048d4-ee0b-4e85-9bdf-d6415e0ce81b;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=70241276-2104-4a9a-bdd2-e1d35d4b6a0b\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T09:20:23.0494469+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_70241276-2104-4a9a-bdd2-e1d35d4b6a0b_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:20:35 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 4BE7DD5002EE40FE85B485155A89862A Ref B: TYO201100116031 Ref C: 2025-04-15T09:20:35Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights events show + Connection: + - keep-alive + ParameterSetName: + - --app --type --start-time --end-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api.applicationinsights.io/v1/apps/70241276-2104-4a9a-bdd2-e1d35d4b6a0b/events/availabilityResults?timespan=2025-04-06T00%3A31%3A00%2B00%3A00%2F2025-04-16T01%3A31%3A00%2B00%3A00 + response: + body: + string: '{"@odata.context":"https://api.applicationinsights.io/v1/apps/70241276-2104-4a9a-bdd2-e1d35d4b6a0b/events/$metadata#availabilityResults","@ai.messages":[{"code":"AddedLimitToQuery","message":"The + query was limited to 500 rows"}],"value":[]}' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location + connection: + - keep-alive + content-length: + - '240' + content-type: + - application/json; charset=utf-8; ieee754compatible=false; odata.metadata=none; + odata.streaming=false + date: + - Tue, 15 Apr 2025 09:20:37 GMT + odata-version: + - 4.0; + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept, Accept-Encoding + via: + - 1.1 draft-oms-58f6f7cd6b-sngw2 + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2018-05-01-preview + response: + body: + string: '' + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 15 Apr 2025 09:20:42 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japanwest/9b062ad0-d063-48a3-b676-532ddeb22d53 + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: 6CB3997B4B6746BCB670C9C98DE7F069 Ref B: TYO201151002042 Ref C: 2025-04-15T09:20:38Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_get_metadata_for_app.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_get_metadata_for_app.yaml new file mode 100644 index 00000000000..f7783a425c8 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_get_metadata_for_app.yaml @@ -0,0 +1,301 @@ +interactions: +- request: + body: '{"location": "westus", "kind": "web", "properties": {"Application_Type": + "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays": + 120, "IngestionMode": "ApplicationInsights"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component create + Connection: + - keep-alive + Content-Length: + - '196' + Content-Type: + - application/json + ParameterSetName: + - --app --location --kind -g --application-type --retention-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2018-05-01-preview + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f100c53d-0000-0200-0000-67fe23240000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"757321a2-7e6c-4529-8e3b-dec3fe964a76\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"13bcd475-4e19-44f8-b213-a116c10ed267\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=13bcd475-4e19-44f8-b213-a116c10ed267;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=757321a2-7e6c-4529-8e3b-dec3fe964a76\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T09:12:53.8571004+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_757321a2-7e6c-4529-8e3b-dec3fe964a76_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:13:07 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japaneast/5a5653d4-5310-43d8-b2f9-ddb2ac91083f + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 82800A64261548038608EF3632C10D48 Ref B: TYO201151006042 Ref C: 2025-04-15T09:12:51Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component show + Connection: + - keep-alive + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2020-02-02-preview + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f100c53d-0000-0200-0000-67fe23240000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"757321a2-7e6c-4529-8e3b-dec3fe964a76\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"13bcd475-4e19-44f8-b213-a116c10ed267\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=13bcd475-4e19-44f8-b213-a116c10ed267;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=757321a2-7e6c-4529-8e3b-dec3fe964a76\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T09:12:53.8571004+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_757321a2-7e6c-4529-8e3b-dec3fe964a76_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:13:09 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: EF8B4BA043E44D548A412DAA428C0354 Ref B: TYO201151001062 Ref C: 2025-04-15T09:13:09Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights metrics get-metadata + Connection: + - keep-alive + ParameterSetName: + - --app + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api.applicationinsights.io/v1/apps/757321a2-7e6c-4529-8e3b-dec3fe964a76/metrics/metadata + response: + body: + string: '{"metrics":{"requests/count":{"supportedAggregations":["sum"],"displayName":"Server + requests","supportedGroupBy":{"all":["request/source","request/name","request/urlHost","request/urlPath","request/success","request/resultCode","request/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"requests/duration":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"Server + response time","units":"ms","supportedGroupBy":{"all":["request/source","request/name","request/urlHost","request/urlPath","request/success","request/resultCode","request/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"requests/failed":{"supportedAggregations":["sum"],"displayName":"Failed + requests","supportedGroupBy":{"all":["request/source","request/name","request/urlHost","request/urlPath","request/success","request/resultCode","request/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"pageViews/count":{"supportedAggregations":["sum"],"displayName":"Page + views","supportedGroupBy":{"all":["pageView/name","pageView/urlPath","pageView/urlHost","pageView/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"pageViews/duration":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"Page + view load time","units":"ms","supportedGroupBy":{"all":["pageView/name","pageView/urlPath","pageView/urlHost","pageView/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"browserTimings/networkDuration":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"Page + load network connect time","units":"ms","supportedGroupBy":{"all":["browserTiming/name","browserTiming/urlHost","browserTiming/urlPath","browserTiming/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"browserTimings/sendDuration":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"Send + request time","units":"ms","supportedGroupBy":{"all":["browserTiming/name","browserTiming/urlHost","browserTiming/urlPath","browserTiming/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"browserTimings/receiveDuration":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"Receiving + response time","units":"ms","supportedGroupBy":{"all":["browserTiming/name","browserTiming/urlHost","browserTiming/urlPath","browserTiming/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"browserTimings/processingDuration":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"Client + processing time","units":"ms","supportedGroupBy":{"all":["browserTiming/name","browserTiming/urlHost","browserTiming/urlPath","browserTiming/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"browserTimings/totalDuration":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"Browser + page load time","units":"ms","supportedGroupBy":{"all":["browserTiming/name","browserTiming/urlHost","browserTiming/urlPath","browserTiming/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"users/count":{"supportedAggregations":["unique"],"displayName":"Users","supportedGroupBy":{"all":["trace/severityLevel","type","operation/name","operation/synthetic","operation/syntheticSource","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance","request/source","request/name","request/urlHost","request/urlPath","request/success","request/resultCode","request/performanceBucket","user/authenticated","pageView/name","pageView/urlPath","pageView/urlHost","pageView/performanceBucket","dependency/target","dependency/type","dependency/name","dependency/success","dependency/resultCode","dependency/performanceBucket","customEvent/name","availabilityResult/name","availabilityResult/location","availabilityResult/success","exception/problemId","exception/handledAt","exception/type","exception/assembly","exception/method","exception/severityLevel","browserTiming/name","browserTiming/urlHost","browserTiming/urlPath","browserTiming/performanceBucket"]},"defaultAggregation":"unique"},"users/authenticated":{"supportedAggregations":["unique"],"displayName":"Users, + authenticated","supportedGroupBy":{"all":["trace/severityLevel","type","operation/name","operation/synthetic","operation/syntheticSource","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance","request/source","request/name","request/urlHost","request/urlPath","request/success","request/resultCode","request/performanceBucket","user/authenticated","pageView/name","pageView/urlPath","pageView/urlHost","pageView/performanceBucket","dependency/target","dependency/type","dependency/name","dependency/success","dependency/resultCode","dependency/performanceBucket","customEvent/name","availabilityResult/name","availabilityResult/location","availabilityResult/success","exception/problemId","exception/handledAt","exception/type","exception/assembly","exception/method","exception/severityLevel","browserTiming/name","browserTiming/urlHost","browserTiming/urlPath","browserTiming/performanceBucket"]},"defaultAggregation":"unique"},"sessions/count":{"supportedAggregations":["unique"],"displayName":"Sessions","supportedGroupBy":{"all":["trace/severityLevel","type","operation/name","operation/synthetic","operation/syntheticSource","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance","request/source","request/name","request/urlHost","request/urlPath","request/success","request/resultCode","request/performanceBucket","user/authenticated","pageView/name","pageView/urlPath","pageView/urlHost","pageView/performanceBucket","dependency/target","dependency/type","dependency/name","dependency/success","dependency/resultCode","dependency/performanceBucket","customEvent/name","availabilityResult/name","availabilityResult/location","availabilityResult/success","exception/problemId","exception/handledAt","exception/type","exception/assembly","exception/method","exception/severityLevel","browserTiming/name","browserTiming/urlHost","browserTiming/urlPath","browserTiming/performanceBucket"]},"defaultAggregation":"unique"},"customEvents/count":{"supportedAggregations":["sum"],"displayName":"Events","supportedGroupBy":{"all":["customEvent/name","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"dependencies/count":{"supportedAggregations":["sum"],"displayName":"Dependency + calls","supportedGroupBy":{"all":["dependency/target","dependency/type","dependency/name","dependency/success","dependency/resultCode","dependency/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"dependencies/failed":{"supportedAggregations":["sum"],"displayName":"Dependency + failures","supportedGroupBy":{"all":["dependency/target","dependency/type","dependency/name","dependency/success","dependency/resultCode","dependency/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"dependencies/duration":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"Dependency + duration","units":"ms","supportedGroupBy":{"all":["dependency/target","dependency/type","dependency/name","dependency/success","dependency/resultCode","dependency/performanceBucket","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"exceptions/count":{"supportedAggregations":["sum"],"displayName":"Exceptions","supportedGroupBy":{"all":["exception/problemId","exception/handledAt","exception/type","exception/assembly","exception/method","exception/severityLevel","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"exceptions/browser":{"supportedAggregations":["sum"],"displayName":"Browser + exceptions","supportedGroupBy":{"all":["exception/problemId","exception/handledAt","exception/type","exception/assembly","exception/method","exception/severityLevel","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"exceptions/server":{"supportedAggregations":["sum"],"displayName":"Server + exceptions","supportedGroupBy":{"all":["exception/problemId","exception/handledAt","exception/type","exception/assembly","exception/method","exception/severityLevel","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"availabilityResults/count":{"supportedAggregations":["sum"],"displayName":"Availability + test results count","supportedGroupBy":{"all":["availabilityResult/name","availabilityResult/location","availabilityResult/success","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"},"availabilityResults/duration":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"Test + duration","units":"ms","supportedGroupBy":{"all":["availabilityResult/name","availabilityResult/location","availabilityResult/success","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"availabilityResults/availabilityPercentage":{"supportedAggregations":["avg","count"],"displayName":"Availability","units":"percent","supportedGroupBy":{"all":["availabilityResult/name","availabilityResult/location","availabilityResult/success","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"billingMeters/telemetryCount":{"supportedAggregations":["sum"],"displayName":"Data + point count","supportedGroupBy":{"all":["billing/telemetryItemSource","billing/telemetryItemType"]},"defaultAggregation":"sum"},"billingMeters/telemetrySize":{"supportedAggregations":["sum"],"displayName":"Data + point volume","units":"bytes","supportedGroupBy":{"all":["billing/telemetryItemSource","billing/telemetryItemType"]},"defaultAggregation":"sum"},"performanceCounters/requestExecutionTime":{"supportedAggregations":["avg","min","max","sum","count"],"displayName":"ASP.NET + request execution time","units":"ms","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"performanceCounters/requestsPerSecond":{"supportedAggregations":["avg","min","max","count"],"displayName":"ASP.NET + request rate","units":"perSec","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"performanceCounters/requestsInQueue":{"supportedAggregations":["avg","min","max","count"],"displayName":"ASP.NET + requests in application queue","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"performanceCounters/memoryAvailableBytes":{"supportedAggregations":["avg","min","max","count"],"displayName":"Available + memory","units":"bytes","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"performanceCounters/exceptionsPerSecond":{"supportedAggregations":["avg","min","max","count"],"displayName":"Exception + rate","units":"perSec","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"performanceCounters/processCpuPercentage":{"supportedAggregations":["avg","min","max","count"],"displayName":"Process + CPU","units":"percent","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"performanceCounters/processCpuPercentageTotal":{"supportedAggregations":["avg","min","max","count"],"displayName":"Process + CPU (all cores)","units":"percent","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"performanceCounters/processIOBytesPerSecond":{"supportedAggregations":["avg","min","max","count"],"displayName":"Process + IO rate","units":"bytesPerSec","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"performanceCounters/processPrivateBytes":{"supportedAggregations":["avg","min","max","count"],"displayName":"Process + private bytes","units":"bytes","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"performanceCounters/processorCpuPercentage":{"supportedAggregations":["avg","min","max","count"],"displayName":"Processor + time","units":"percent","supportedGroupBy":{"all":["performanceCounter/name","performanceCounter/category","performanceCounter/counter","performanceCounter/instance","operation/name","operation/synthetic","operation/syntheticSource","user/authenticated","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"avg"},"traces/count":{"supportedAggregations":["sum"],"displayName":"Traces","supportedGroupBy":{"all":["trace/severityLevel","operation/name","operation/synthetic","operation/syntheticSource","application/version","client/type","client/model","client/os","client/city","client/stateOrProvince","client/countryOrRegion","client/browser","cloud/roleName","cloud/roleInstance"]},"defaultAggregation":"sum"}},"dimensions":{"request/source":{"displayName":"Request + source"},"request/name":{"displayName":"Request name"},"request/urlHost":{"displayName":"Request + URL host"},"request/urlPath":{"displayName":"Request URL path"},"request/success":{"displayName":"Successful + request"},"request/resultCode":{"displayName":"Response code"},"request/performanceBucket":{"displayName":"Performance"},"operation/name":{"displayName":"Operation + name"},"operation/synthetic":{"displayName":"Real or synthetic traffic"},"operation/syntheticSource":{"displayName":"Source + of synthetic traffic"},"user/authenticated":{"displayName":"Authenticated + user"},"application/version":{"displayName":"Application version"},"client/type":{"displayName":"Device + type"},"client/model":{"displayName":"Device model"},"client/os":{"displayName":"Operating + system"},"client/city":{"displayName":"City"},"client/stateOrProvince":{"displayName":"State + or province"},"client/countryOrRegion":{"displayName":"Country or region"},"client/browser":{"displayName":"Browser + version"},"cloud/roleName":{"displayName":"Cloud role name"},"cloud/roleInstance":{"displayName":"Cloud + role instance"},"pageView/name":{"displayName":"View page name"},"pageView/urlPath":{"displayName":"Page + view URL path"},"pageView/urlHost":{"displayName":"Page view URL host"},"pageView/performanceBucket":{"displayName":"Performance"},"browserTiming/name":{"displayName":"Name"},"browserTiming/urlHost":{"displayName":"Url + host"},"browserTiming/urlPath":{"displayName":"Url path"},"browserTiming/performanceBucket":{"displayName":"Performance + Bucket"},"trace/severityLevel":{"displayName":"Severity level"},"type":{"displayName":"Telemetry + type"},"dependency/target":{"displayName":"Base name"},"dependency/type":{"displayName":"Dependency + type"},"dependency/name":{"displayName":"Remote dependency name"},"dependency/success":{"displayName":"Dependency + call status"},"dependency/resultCode":{"displayName":"Result code"},"dependency/performanceBucket":{"displayName":"Performance"},"customEvent/name":{"displayName":"Event + name"},"availabilityResult/name":{"displayName":"Test name"},"availabilityResult/location":{"displayName":"Run + location"},"availabilityResult/success":{"displayName":"Test result"},"exception/problemId":{"displayName":"Problem + Id"},"exception/handledAt":{"displayName":"Handled at"},"exception/type":{"displayName":"Exception + type"},"exception/assembly":{"displayName":"Assembly"},"exception/method":{"displayName":"Failed + method"},"exception/severityLevel":{"displayName":"Severity level"},"billing/telemetryItemSource":{"displayName":"Telemetry + item source"},"billing/telemetryItemType":{"displayName":"Telemetry item type"},"performanceCounter/name":{"displayName":"Name"},"performanceCounter/category":{"displayName":"Category + name"},"performanceCounter/counter":{"displayName":"Counter"},"performanceCounter/instance":{"displayName":"Instance + name"}}}' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location + connection: + - keep-alive + content-length: + - '23967' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:13:12 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + via: + - 1.1 draft-oms-58f6f7cd6b-8jr5k + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2018-05-01-preview + response: + body: + string: '' + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 15 Apr 2025 09:13:17 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japaneast/e2e10460-cdcb-4a53-a79b-fda2ecb3665b + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: 933A654E975A459AA596DEAB1155C228 Ref B: TYO201100114045 Ref C: 2025-04-15T09:13:13Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_show_for_app.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_show_for_app.yaml new file mode 100644 index 00000000000..851bc2ab55b --- /dev/null +++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_show_for_app.yaml @@ -0,0 +1,400 @@ +interactions: +- request: + body: '{"location": "westus", "kind": "web", "properties": {"Application_Type": + "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays": + 120, "IngestionMode": "ApplicationInsights"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component create + Connection: + - keep-alive + Content-Length: + - '196' + Content-Type: + - application/json + ParameterSetName: + - --app --location --kind -g --application-type --retention-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2018-05-01-preview + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f100082e-0000-0200-0000-67fe21a20000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"e8443098-92f8-487c-93ed-b5ca8e2d8279\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"6deadbfd-4e22-4a5e-9b6f-3608009e67fb\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=6deadbfd-4e22-4a5e-9b6f-3608009e67fb;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=e8443098-92f8-487c-93ed-b5ca8e2d8279\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T09:06:27.3600778+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_e8443098-92f8-487c-93ed-b5ca8e2d8279_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:06:42 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japanwest/ecfcd04d-e16d-4127-bbc6-c6fa43ba53da + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: 40043C499F844CDB80E643E6C0FA6C2E Ref B: TYO201151002036 Ref C: 2025-04-15T09:06:25Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component show + Connection: + - keep-alive + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2020-02-02-preview + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f100082e-0000-0200-0000-67fe21a20000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"e8443098-92f8-487c-93ed-b5ca8e2d8279\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"6deadbfd-4e22-4a5e-9b6f-3608009e67fb\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=6deadbfd-4e22-4a5e-9b6f-3608009e67fb;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=e8443098-92f8-487c-93ed-b5ca8e2d8279\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T09:06:27.3600778+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_e8443098-92f8-487c-93ed-b5ca8e2d8279_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:06:43 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 4F794BF786D248B8B615513FEE1A216F Ref B: TYO201151006034 Ref C: 2025-04-15T09:06:43Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights metrics show + Connection: + - keep-alive + ParameterSetName: + - --app --metrics --aggregation --start-time --end-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api.applicationinsights.io/v1/apps/e8443098-92f8-487c-93ed-b5ca8e2d8279/metrics/requests%2Fduration?aggregation=count,sum×pan=2025-04-06T00%3A31%3A00%2B00%3A00%2F2025-04-16T01%3A31%3A00%2B00%3A00 + response: + body: + string: '{"value":{"start":"2025-04-06T00:31:00.000Z","end":"2025-04-16T01:31:00.000Z","requests/duration":{"count":null,"sum":null}}}' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location + connection: + - keep-alive + content-length: + - '125' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:06:45 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept, Accept-Encoding + via: + - 1.1 draft-oms-58f6f7cd6b-cdl2s + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights metrics show + Connection: + - keep-alive + ParameterSetName: + - --app -m --start-time --end-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2015-05-01 + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f100082e-0000-0200-0000-67fe21a20000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"e8443098-92f8-487c-93ed-b5ca8e2d8279\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"6deadbfd-4e22-4a5e-9b6f-3608009e67fb\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=6deadbfd-4e22-4a5e-9b6f-3608009e67fb;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=e8443098-92f8-487c-93ed-b5ca8e2d8279\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T09:06:27.3600778+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_e8443098-92f8-487c-93ed-b5ca8e2d8279_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:06:45 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 4E705C70C7404DD9A28B9F11DC62BA76 Ref B: TYO201151006036 Ref C: 2025-04-15T09:06:45Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights metrics show + Connection: + - keep-alive + ParameterSetName: + - --app -m --start-time --end-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api.applicationinsights.io/v1/apps/e8443098-92f8-487c-93ed-b5ca8e2d8279/metrics/availabilityResults%2Fcount?timespan=2025-04-06T00%3A31%3A00%2B00%3A00%2F2025-04-16T01%3A31%3A00%2B00%3A00 + response: + body: + string: '{"value":{"start":"2025-04-06T00:31:00.000Z","end":"2025-04-16T01:31:00.000Z","availabilityResults/count":{"sum":null}}}' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location + connection: + - keep-alive + content-length: + - '120' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:06:46 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept, Accept-Encoding + via: + - 1.1 draft-oms-58f6f7cd6b-jt9z4 + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights metrics show + Connection: + - keep-alive + ParameterSetName: + - --app --metric --start-time --end-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://api.applicationinsights.io/v1/apps/e8443098-92f8-487c-93ed-b5ca8e2d8279/metrics/availabilityResults%2Fcount?timespan=2025-04-06T00%3A31%3A00%2B00%3A00%2F2025-04-16T01%3A31%3A00%2B00%3A00 + response: + body: + string: '{"value":{"start":"2025-04-06T00:31:00.000Z","end":"2025-04-16T01:31:00.000Z","availabilityResults/count":{"sum":null}}}' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location + age: + - '0' + connection: + - keep-alive + content-length: + - '120' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 09:06:47 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + via: + - 1.1 draft-oms-58f6f7cd6b-5kfzh + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2018-05-01-preview + response: + body: + string: '' + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 15 Apr 2025 09:06:51 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japaneast/942fa8b7-c9eb-40cc-8f6e-e2dfb1d98d82 + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: FB9966D70474423180C16A94EFC6991C Ref B: TYO201151004052 Ref C: 2025-04-15T09:06:47Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_query_execute_for_app.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_query_execute_for_app.yaml new file mode 100644 index 00000000000..177ea13e5b9 --- /dev/null +++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_query_execute_for_app.yaml @@ -0,0 +1,729 @@ +interactions: +- request: + body: '{"location": "westus", "kind": "web", "properties": {"Application_Type": + "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays": + 120, "IngestionMode": "ApplicationInsights"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component create + Connection: + - keep-alive + Content-Length: + - '196' + Content-Type: + - application/json + ParameterSetName: + - --app --location --kind -g --application-type --retention-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2018-05-01-preview + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f000ffe0-0000-0200-0000-67fe1e8a0000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"6342a02d-3b47-4b0c-8abe-35147d30f046\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"3b0d2dc9-b01b-4381-937e-e6ed20509ac7\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=3b0d2dc9-b01b-4381-937e-e6ed20509ac7;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=6342a02d-3b47-4b0c-8abe-35147d30f046\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T08:53:06.1281359+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_6342a02d-3b47-4b0c-8abe-35147d30f046_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:31 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japaneast/4d41d3ed-8a75-46b5-9dbc-a12b1344b7ce + x-ms-ratelimit-remaining-subscription-global-writes: + - '3000' + x-ms-ratelimit-remaining-subscription-writes: + - '200' + x-msedge-ref: + - 'Ref A: 5D6847816C6347A994A9237E152E777D Ref B: TYO201151001031 Ref C: 2025-04-15T08:53:04Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "kind": "ios", "properties": {"Application_Type": + "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays": + 120, "IngestionMode": "ApplicationInsights"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component create + Connection: + - keep-alive + Content-Length: + - '196' + Content-Type: + - application/json + ParameterSetName: + - --app --location --kind -g --application-type --retention-time + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp2?api-version=2018-05-01-preview + response: + body: + string: "{\r\n \"kind\": \"ios\",\r\n \"etag\": \"\\\"f00076e1-0000-0200-0000-67fe1e970000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp2\",\r\n + \ \"name\": \"testApp2\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp2\",\r\n \"AppId\": \"5cba7433-73c6-4955-bf43-35e455c11859\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"54cc4aa3-27f8-49e9-b1f6-0db96ec680c0\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=54cc4aa3-27f8-49e9-b1f6-0db96ec680c0;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=5cba7433-73c6-4955-bf43-35e455c11859\",\r\n + \ \"Name\": \"testApp2\",\r\n \"CreationDate\": \"2025-04-15T08:53:33.9968417+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp2_5cba7433-73c6-4955-bf43-35e455c11859_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp2-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:42 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japaneast/d2fec69a-be13-48d8-84b4-7f74f0c81d41 + x-ms-ratelimit-remaining-subscription-global-writes: + - '2999' + x-ms-ratelimit-remaining-subscription-writes: + - '199' + x-msedge-ref: + - 'Ref A: DF278C0B0F0E4376A7CC56632BE92231 Ref B: TYO201151001025 Ref C: 2025-04-15T08:53:32Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component show + Connection: + - keep-alive + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2020-02-02-preview + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f000ffe0-0000-0200-0000-67fe1e8a0000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"6342a02d-3b47-4b0c-8abe-35147d30f046\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"3b0d2dc9-b01b-4381-937e-e6ed20509ac7\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=3b0d2dc9-b01b-4381-937e-e6ed20509ac7;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=6342a02d-3b47-4b0c-8abe-35147d30f046\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T08:53:06.1281359+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_6342a02d-3b47-4b0c-8abe-35147d30f046_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:44 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: FF267601D91D42BA8B2C577CD54DC903 Ref B: TYO201151002025 Ref C: 2025-04-15T08:53:44Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component show + Connection: + - keep-alive + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp2?api-version=2020-02-02-preview + response: + body: + string: "{\r\n \"kind\": \"ios\",\r\n \"etag\": \"\\\"f00076e1-0000-0200-0000-67fe1e970000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp2\",\r\n + \ \"name\": \"testApp2\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp2\",\r\n \"AppId\": \"5cba7433-73c6-4955-bf43-35e455c11859\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"54cc4aa3-27f8-49e9-b1f6-0db96ec680c0\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=54cc4aa3-27f8-49e9-b1f6-0db96ec680c0;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=5cba7433-73c6-4955-bf43-35e455c11859\",\r\n + \ \"Name\": \"testApp2\",\r\n \"CreationDate\": \"2025-04-15T08:53:33.9968417+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp2_5cba7433-73c6-4955-bf43-35e455c11859_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp2-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:45 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 64BC9DA813C146A0891C681CB816C148 Ref B: TYO201151004062 Ref C: 2025-04-15T08:53:45Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"applications": ["5cba7433-73c6-4955-bf43-35e455c11859"], "query": "availabilityResults + | distinct name | order by name asc", "timespan": "2025-04-15T07:53:46.729216/2025-04-15T08:53:46.729216"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights query + Connection: + - keep-alive + Content-Length: + - '195' + Content-Type: + - application/json + ParameterSetName: + - --apps --analytics-query + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://api.applicationinsights.io/v1/apps/6342a02d-3b47-4b0c-8abe-35147d30f046/query + response: + body: + string: '{"tables":[{"name":"PrimaryResult","columns":[{"name":"name","type":"string"}],"rows":[]}]}' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location + connection: + - keep-alive + content-length: + - '91' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:47 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + via: + - 1.1 draft-oms-58f6f7cd6b-rl42w + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"applications": [], "query": "requests | getschema", "timespan": "2025-04-15T07:53:48.518174/2025-04-15T08:53:48.518174"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights query + Connection: + - keep-alive + Content-Length: + - '122' + Content-Type: + - application/json + ParameterSetName: + - --app --analytics-query + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://api.applicationinsights.io/v1/apps/6342a02d-3b47-4b0c-8abe-35147d30f046/query + response: + body: + string: '{"tables":[{"name":"getschema","columns":[{"name":"ColumnName","type":"string"},{"name":"ColumnOrdinal","type":"int"},{"name":"DataType","type":"string"},{"name":"ColumnType","type":"string"}],"rows":[["timestamp",0,"System.DateTime","datetime"],["id",1,"System.String","string"],["source",2,"System.String","string"],["name",3,"System.String","string"],["url",4,"System.String","string"],["success",5,"System.String","string"],["resultCode",6,"System.String","string"],["duration",7,"System.Double","real"],["performanceBucket",8,"System.String","string"],["itemType",9,"System.String","string"],["customDimensions",10,"System.Object","dynamic"],["customMeasurements",11,"System.Object","dynamic"],["operation_Name",12,"System.String","string"],["operation_Id",13,"System.String","string"],["operation_ParentId",14,"System.String","string"],["operation_SyntheticSource",15,"System.String","string"],["session_Id",16,"System.String","string"],["user_Id",17,"System.String","string"],["user_AuthenticatedId",18,"System.String","string"],["user_AccountId",19,"System.String","string"],["application_Version",20,"System.String","string"],["client_Type",21,"System.String","string"],["client_Model",22,"System.String","string"],["client_OS",23,"System.String","string"],["client_IP",24,"System.String","string"],["client_City",25,"System.String","string"],["client_StateOrProvince",26,"System.String","string"],["client_CountryOrRegion",27,"System.String","string"],["client_Browser",28,"System.String","string"],["cloud_RoleName",29,"System.String","string"],["cloud_RoleInstance",30,"System.String","string"],["appId",31,"System.String","string"],["appName",32,"System.String","string"],["iKey",33,"System.String","string"],["sdkVersion",34,"System.String","string"],["itemId",35,"System.String","string"],["itemCount",36,"System.Int32","int"],["_ResourceId",37,"System.String","string"]]}]}' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location + connection: + - keep-alive + content-length: + - '1889' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:48 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + via: + - 1.1 draft-oms-58f6f7cd6b-rrwvq + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights query + Connection: + - keep-alive + ParameterSetName: + - --apps -g --analytics-query + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2015-05-01 + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f000ffe0-0000-0200-0000-67fe1e8a0000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"6342a02d-3b47-4b0c-8abe-35147d30f046\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"3b0d2dc9-b01b-4381-937e-e6ed20509ac7\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=3b0d2dc9-b01b-4381-937e-e6ed20509ac7;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=6342a02d-3b47-4b0c-8abe-35147d30f046\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T08:53:06.1281359+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_6342a02d-3b47-4b0c-8abe-35147d30f046_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:49 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 73431E37AEC649C88540F64A9DDBBA33 Ref B: TYO201151001062 Ref C: 2025-04-15T08:53:49Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"applications": [], "query": "requests | getschema", "timespan": "2025-04-15T07:53:50.196036/2025-04-15T08:53:50.196036"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights query + Connection: + - keep-alive + Content-Length: + - '122' + Content-Type: + - application/json + ParameterSetName: + - --apps -g --analytics-query + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://api.applicationinsights.io/v1/apps/6342a02d-3b47-4b0c-8abe-35147d30f046/query + response: + body: + string: '{"tables":[{"name":"getschema","columns":[{"name":"ColumnName","type":"string"},{"name":"ColumnOrdinal","type":"int"},{"name":"DataType","type":"string"},{"name":"ColumnType","type":"string"}],"rows":[["timestamp",0,"System.DateTime","datetime"],["id",1,"System.String","string"],["source",2,"System.String","string"],["name",3,"System.String","string"],["url",4,"System.String","string"],["success",5,"System.String","string"],["resultCode",6,"System.String","string"],["duration",7,"System.Double","real"],["performanceBucket",8,"System.String","string"],["itemType",9,"System.String","string"],["customDimensions",10,"System.Object","dynamic"],["customMeasurements",11,"System.Object","dynamic"],["operation_Name",12,"System.String","string"],["operation_Id",13,"System.String","string"],["operation_ParentId",14,"System.String","string"],["operation_SyntheticSource",15,"System.String","string"],["session_Id",16,"System.String","string"],["user_Id",17,"System.String","string"],["user_AuthenticatedId",18,"System.String","string"],["user_AccountId",19,"System.String","string"],["application_Version",20,"System.String","string"],["client_Type",21,"System.String","string"],["client_Model",22,"System.String","string"],["client_OS",23,"System.String","string"],["client_IP",24,"System.String","string"],["client_City",25,"System.String","string"],["client_StateOrProvince",26,"System.String","string"],["client_CountryOrRegion",27,"System.String","string"],["client_Browser",28,"System.String","string"],["cloud_RoleName",29,"System.String","string"],["cloud_RoleInstance",30,"System.String","string"],["appId",31,"System.String","string"],["appName",32,"System.String","string"],["iKey",33,"System.String","string"],["sdkVersion",34,"System.String","string"],["itemId",35,"System.String","string"],["itemCount",36,"System.Int32","int"],["_ResourceId",37,"System.String","string"]]}]}' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location + connection: + - keep-alive + content-length: + - '1889' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:50 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + via: + - 1.1 draft-oms-58f6f7cd6b-mgdqm + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights query + Connection: + - keep-alive + ParameterSetName: + - --analytics-query --ids + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2015-05-01 + response: + body: + string: "{\r\n \"kind\": \"web\",\r\n \"etag\": \"\\\"f000ffe0-0000-0200-0000-67fe1e8a0000\\\"\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp1\",\r\n + \ \"name\": \"testApp1\",\r\n \"type\": \"microsoft.insights/components\",\r\n + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n + \ \"ApplicationId\": \"testApp1\",\r\n \"AppId\": \"6342a02d-3b47-4b0c-8abe-35147d30f046\",\r\n + \ \"Application_Type\": \"web\",\r\n \"Flow_Type\": \"Bluefield\",\r\n + \ \"Request_Source\": \"rest\",\r\n \"InstrumentationKey\": \"3b0d2dc9-b01b-4381-937e-e6ed20509ac7\",\r\n + \ \"ConnectionString\": \"InstrumentationKey=3b0d2dc9-b01b-4381-937e-e6ed20509ac7;IngestionEndpoint=https://westus-0.in.applicationinsights.azure.com/;LiveEndpoint=https://westus.livediagnostics.monitor.azure.com/;ApplicationId=6342a02d-3b47-4b0c-8abe-35147d30f046\",\r\n + \ \"Name\": \"testApp1\",\r\n \"CreationDate\": \"2025-04-15T08:53:06.1281359+00:00\",\r\n + \ \"TenantId\": \"0b1f6471-1bf0-4dda-aec3-cb9272f09590\",\r\n \"provisioningState\": + \"Succeeded\",\r\n \"SamplingPercentage\": null,\r\n \"RetentionInDays\": + 120,\r\n \"Retention\": \"P120D\",\r\n \"WorkspaceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ai_testapp1_6342a02d-3b47-4b0c-8abe-35147d30f046_managed/providers/Microsoft.OperationalInsights/workspaces/managed-testApp1-ws\",\r\n + \ \"IngestionMode\": \"LogAnalytics\",\r\n \"publicNetworkAccessForIngestion\": + \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \"Ver\": + \"v2\"\r\n }\r\n}" + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '1516' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:51 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-global-reads: + - '3749' + x-msedge-ref: + - 'Ref A: 0692C6D5343A4EBBBB977F1BC751ADCC Ref B: TYO201100116037 Ref C: 2025-04-15T08:53:50Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: '{"applications": [], "query": "requests | getschema", "timespan": "2025-04-15T07:53:51.940125/2025-04-15T08:53:51.940125"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights query + Connection: + - keep-alive + Content-Length: + - '122' + Content-Type: + - application/json + ParameterSetName: + - --analytics-query --ids + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: POST + uri: https://api.applicationinsights.io/v1/apps/6342a02d-3b47-4b0c-8abe-35147d30f046/query + response: + body: + string: '{"tables":[{"name":"getschema","columns":[{"name":"ColumnName","type":"string"},{"name":"ColumnOrdinal","type":"int"},{"name":"DataType","type":"string"},{"name":"ColumnType","type":"string"}],"rows":[["timestamp",0,"System.DateTime","datetime"],["id",1,"System.String","string"],["source",2,"System.String","string"],["name",3,"System.String","string"],["url",4,"System.String","string"],["success",5,"System.String","string"],["resultCode",6,"System.String","string"],["duration",7,"System.Double","real"],["performanceBucket",8,"System.String","string"],["itemType",9,"System.String","string"],["customDimensions",10,"System.Object","dynamic"],["customMeasurements",11,"System.Object","dynamic"],["operation_Name",12,"System.String","string"],["operation_Id",13,"System.String","string"],["operation_ParentId",14,"System.String","string"],["operation_SyntheticSource",15,"System.String","string"],["session_Id",16,"System.String","string"],["user_Id",17,"System.String","string"],["user_AuthenticatedId",18,"System.String","string"],["user_AccountId",19,"System.String","string"],["application_Version",20,"System.String","string"],["client_Type",21,"System.String","string"],["client_Model",22,"System.String","string"],["client_OS",23,"System.String","string"],["client_IP",24,"System.String","string"],["client_City",25,"System.String","string"],["client_StateOrProvince",26,"System.String","string"],["client_CountryOrRegion",27,"System.String","string"],["client_Browser",28,"System.String","string"],["cloud_RoleName",29,"System.String","string"],["cloud_RoleInstance",30,"System.String","string"],["appId",31,"System.String","string"],["appName",32,"System.String","string"],["iKey",33,"System.String","string"],["sdkVersion",34,"System.String","string"],["itemId",35,"System.String","string"],["itemCount",36,"System.Int32","int"],["_ResourceId",37,"System.String","string"]]}]}' + headers: + access-control-allow-origin: + - '*' + access-control-expose-headers: + - Retry-After,Age,WWW-Authenticate,x-resource-identities,x-ms-status-location + connection: + - keep-alive + content-length: + - '1889' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 15 Apr 2025 08:53:52 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + via: + - 1.1 draft-oms-58f6f7cd6b-f4qkh + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp1?api-version=2018-05-01-preview + response: + body: + string: '' + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 15 Apr 2025 08:53:57 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japaneast/deda2f29-490e-4a52-94b4-c8007615656c + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: 291EA8A2567C49EB935C362839C8C986 Ref B: TYO201151002054 Ref C: 2025-04-15T08:53:52Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor app-insights component delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --app -g + User-Agent: + - AZURECLI/2.71.0 azsdk-python-core/1.31.0 Python/3.11.9 (Windows-10-10.0.22631-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp2?api-version=2018-05-01-preview + response: + body: + string: '' + headers: + access-control-expose-headers: + - Request-Context + cache-control: + - no-cache + content-length: + - '0' + date: + - Tue, 15 Apr 2025 08:54:03 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:0dd6a9c3-b728-41ca-aa78-7e1962e22331 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-cache: + - CONFIG_NOCACHE + x-content-type-options: + - nosniff + x-ms-operation-identifier: + - tenantId=54826b22-38d6-4fb2-bad9-b7b93a3e9c5a,objectId=cded80ac-7840-4070-a783-db73a7c3ee4c/japanwest/6c835666-d61a-4706-abce-936a10869a52 + x-ms-ratelimit-remaining-subscription-deletes: + - '199' + x-ms-ratelimit-remaining-subscription-global-deletes: + - '2999' + x-msedge-ref: + - 'Ref A: 562779B76BE942D585E42BF75EF0FB04 Ref B: TYO201100117031 Ref C: 2025-04-15T08:53:58Z' + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_commands.py b/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_commands.py index 3934d60fee3..f572f10846e 100644 --- a/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_commands.py +++ b/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_commands.py @@ -6,7 +6,7 @@ # pylint: disable=line-too-long import unittest -from azure.cli.testsdk import ScenarioTest +from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer class ApplicationInsightsDataClientTests(ScenarioTest): @@ -65,3 +65,170 @@ def test_events_show(self): result = self.cmd('az monitor app-insights events show --start-time 2019-03-05 23:00:00 +00:00 --end-time 2019-03-05 23:05:00 +00:00 --app 578f0e27-12e9-4631-bc02-50b965da2633 --type availabilityResults').get_output_in_json() assert isinstance(result["value"][0]["client"]["city"], ("".__class__, u"".__class__)) assert isinstance(result["value"][0]["availabilityResult"]["duration"], (int, float, complex)) + + @ResourceGroupPreparer(parameter_name_for_location='location') + def test_query_execute_for_app(self, resource_group, location): + self.kwargs.update({ + 'loc': location, + 'resource_group': resource_group, + 'name_a': 'testApp1', + 'name_b': 'testApp2', + 'kind1': 'web', + 'kind2': 'ios', + 'application_type': 'web', + 'retention_time': 120 + }) + + self.cmd('az monitor app-insights component create --app {name_a} --location {loc} --kind {kind1} -g {resource_group} --application-type {application_type} --retention-time {retention_time}', checks=[ + self.check('name', '{name_a}'), + self.check('location', '{loc}'), + self.check('kind', '{kind1}'), + self.check('applicationType', '{application_type}'), + self.check('applicationId', '{name_a}'), + self.check('provisioningState', 'Succeeded'), + self.check('retentionInDays', self.kwargs['retention_time']) + ]) + + self.cmd('az monitor app-insights component create --app {name_b} --location {loc} --kind {kind2} -g {resource_group} --application-type {application_type} --retention-time {retention_time}', checks=[ + self.check('name', '{name_b}'), + self.check('location', '{loc}'), + self.check('kind', '{kind2}'), + self.check('applicationType', '{application_type}'), + self.check('applicationId', '{name_b}'), + self.check('provisioningState', 'Succeeded'), + self.check('retentionInDays', self.kwargs['retention_time']) + ]) + app1_info = self.cmd('az monitor app-insights component show --app {name_a} -g {resource_group}').get_output_in_json() + app2_info = self.cmd('az monitor app-insights component show --app {name_b} -g {resource_group}').get_output_in_json() + self.kwargs.update({ + 'app_id1': app1_info["appId"], + 'id1': app1_info["id"], + 'app_id2': app2_info["appId"], + 'id2': app1_info["id"], + }) + + self.cmd('az monitor app-insights query --apps {app_id1} {app_id2} --analytics-query "availabilityResults | distinct name | order by name asc"', checks=[ + self.check('tables[0].name', 'PrimaryResult'), + self.check('tables[0].columns[0].name', 'name'), + self.check('tables[0].columns[0].type', 'string'), + ]) + query_guid = self.cmd('az monitor app-insights query --app {app_id1} --analytics-query "requests | getschema"').get_output_in_json() + query_name_rg = self.cmd('az monitor app-insights query --apps {name_a} -g {resource_group} --analytics-query "requests | getschema"').get_output_in_json() + query_azure_id = self.cmd('az monitor app-insights query --analytics-query "requests | getschema" --ids {id1}').get_output_in_json() + assert query_guid == query_name_rg + assert query_name_rg == query_azure_id + # might change over time + # assert len(query_guid['tables'][0]['rows']) == 38 + assert isinstance(query_guid['tables'][0]['rows'][0][1], (int, float, complex)) + + self.cmd('az monitor app-insights component delete --app {name_a} -g {resource_group}', + checks=[self.is_empty()]) + self.cmd('az monitor app-insights component delete --app {name_b} -g {resource_group}', + checks=[self.is_empty()]) + + @ResourceGroupPreparer(parameter_name_for_location='location') + def test_metrics_show_for_app(self, resource_group, location): + self.kwargs.update({ + 'loc': location, + 'resource_group': resource_group, + 'name_a': 'testApp1', + 'kind1': 'web', + 'application_type': 'web', + 'retention_time': 120 + }) + + self.cmd('az monitor app-insights component create --app {name_a} --location {loc} --kind {kind1} -g {resource_group} --application-type {application_type} --retention-time {retention_time}', checks=[ + self.check('name', '{name_a}'), + self.check('location', '{loc}'), + self.check('kind', '{kind1}'), + self.check('applicationType', '{application_type}'), + self.check('applicationId', '{name_a}'), + self.check('provisioningState', 'Succeeded'), + self.check('retentionInDays', self.kwargs['retention_time']) + ]) + + app1_info = self.cmd('az monitor app-insights component show --app {name_a} -g {resource_group}').get_output_in_json() + self.kwargs.update({ + 'app_id1': app1_info["appId"], + 'id1': app1_info["id"], + }) + self.cmd('az monitor app-insights metrics show --app {app_id1} --metrics requests/duration --aggregation count sum --start-time 2025-04-06 00:31 +00:00 --end-time 2025-04-16 01:31 +00:00', checks=[ + self.check('value."requests/duration".count', None), + self.check('value."requests/duration".sum', None) + ]) + result = self.cmd('az monitor app-insights metrics show --app {id1} -m availabilityResults/count --start-time 2025-04-06 00:31 +00:00 --end-time 2025-04-16 01:31 +00:00').get_output_in_json() + azure_result = self.cmd('az monitor app-insights metrics show --app {app_id1} --metric availabilityResults/count --start-time 2025-04-06 00:31 +00:00 --end-time 2025-04-16 01:31 +00:00').get_output_in_json() + assert result["value"] == azure_result["value"] + + self.cmd('az monitor app-insights component delete --app {name_a} -g {resource_group}', + checks=[self.is_empty()]) + + @ResourceGroupPreparer(parameter_name_for_location='location') + def test_metrics_get_metadata_for_app(self, resource_group, location): + self.kwargs.update({ + 'loc': location, + 'resource_group': resource_group, + 'name_a': 'testApp1', + 'kind1': 'web', + 'application_type': 'web', + 'retention_time': 120 + }) + + self.cmd('az monitor app-insights component create --app {name_a} --location {loc} --kind {kind1} -g {resource_group} --application-type {application_type} --retention-time {retention_time}', checks=[ + self.check('name', '{name_a}'), + self.check('location', '{loc}'), + self.check('kind', '{kind1}'), + self.check('applicationType', '{application_type}'), + self.check('applicationId', '{name_a}'), + self.check('provisioningState', 'Succeeded'), + self.check('retentionInDays', self.kwargs['retention_time']) + ]) + + app1_info = self.cmd('az monitor app-insights component show --app {name_a} -g {resource_group}').get_output_in_json() + self.kwargs.update({ + 'app_id1': app1_info["appId"], + 'id1': app1_info["id"], + }) + self.cmd('az monitor app-insights metrics get-metadata --app {app_id1}', checks=[ + self.check('dimensions."availabilityResult/location".displayName', 'Run location'), + self.check('metrics."availabilityResults/availabilityPercentage".displayName', 'Availability'), + self.check('metrics."users/count".supportedAggregations[0]', 'unique'), + self.check('metrics."users/count".supportedGroupBy.all[0]', 'trace/severityLevel') + ]) + + self.cmd('az monitor app-insights component delete --app {name_a} -g {resource_group}', + checks=[self.is_empty()]) + + + @ResourceGroupPreparer(parameter_name_for_location='location') + def test_events_show_for_app(self, resource_group, location): + self.kwargs.update({ + 'loc': location, + 'resource_group': resource_group, + 'name_a': 'testApp1', + 'kind1': 'web', + 'application_type': 'web', + 'retention_time': 120 + }) + + self.cmd('az monitor app-insights component create --app {name_a} --location {loc} --kind {kind1} -g {resource_group} --application-type {application_type} --retention-time {retention_time}', checks=[ + self.check('name', '{name_a}'), + self.check('location', '{loc}'), + self.check('kind', '{kind1}'), + self.check('applicationType', '{application_type}'), + self.check('applicationId', '{name_a}'), + self.check('provisioningState', 'Succeeded'), + self.check('retentionInDays', self.kwargs['retention_time']) + ]) + + app1_info = self.cmd('az monitor app-insights component show --app {name_a} -g {resource_group}').get_output_in_json() + self.kwargs.update({ + 'app_id1': app1_info["appId"], + 'id1': app1_info["id"], + }) + self.cmd('az monitor app-insights events show --app {app_id1} --type availabilityResults --start-time 2025-04-06 00:31 +00:00 --end-time 2025-04-16 01:31 +00:00', checks=[ + self.check('value', []), + ]) + + self.cmd('az monitor app-insights component delete --app {name_a} -g {resource_group}', + checks=[self.is_empty()]) \ No newline at end of file From 3c07885fcbebb565fde87521d1a9529ba61dbcf0 Mon Sep 17 00:00:00 2001 From: AllyW Date: Wed, 16 Apr 2025 09:16:09 +0800 Subject: [PATCH 07/12] adjust min version --- .../monitor/app_insights/events/_show.py | 28 +++++++++---------- .../azext_metadata.json | 2 +- .../test_applicationinsights_commands.py | 7 +++-- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py index dd3a24842de..de5f1714f1c 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py @@ -224,17 +224,17 @@ def _build_schema_on_200(cls): cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 - _schema_on_200.ai_messages = AAZListType( - serialized_name="aiMessages", + _schema_on_200.aimessages = AAZListType( + serialized_name="@ai.messages", ) - _schema_on_200.odata_context = AAZStrType( - serialized_name="odataContext", + _schema_on_200.odatacontext = AAZStrType( + serialized_name="@odata.context", ) _schema_on_200.value = AAZListType() - ai_messages = cls._schema_on_200.ai_messages - ai_messages.Element = AAZFreeFormDictType() - _ShowHelper._build_schema_error_info_read(ai_messages.Element) + aimessages = cls._schema_on_200.aimessages + aimessages.Element = AAZFreeFormDictType() + _ShowHelper._build_schema_error_info_read(aimessages.Element) value = cls._schema_on_200.value value.Element = AAZObjectType() @@ -648,17 +648,17 @@ def _build_schema_on_200(cls): cls._schema_on_200 = AAZObjectType() _schema_on_200 = cls._schema_on_200 - _schema_on_200.ai_messages = AAZListType( - serialized_name="aiMessages", + _schema_on_200.aimessages = AAZListType( + serialized_name="@ai.messages", ) - _schema_on_200.odata_context = AAZStrType( - serialized_name="odataContext", + _schema_on_200.odatacontext = AAZStrType( + serialized_name="@odata.context", ) _schema_on_200.value = AAZListType() - ai_messages = cls._schema_on_200.ai_messages - ai_messages.Element = AAZFreeFormDictType() - _ShowHelper._build_schema_error_info_read(ai_messages.Element) + aimessages = cls._schema_on_200.aimessages + aimessages.Element = AAZFreeFormDictType() + _ShowHelper._build_schema_error_info_read(aimessages.Element) value = cls._schema_on_200.value value.Element = AAZObjectType() diff --git a/src/application-insights/azext_applicationinsights/azext_metadata.json b/src/application-insights/azext_applicationinsights/azext_metadata.json index b9c3b873766..4a6fc27e14e 100644 --- a/src/application-insights/azext_applicationinsights/azext_metadata.json +++ b/src/application-insights/azext_applicationinsights/azext_metadata.json @@ -1,3 +1,3 @@ { - "azext.minCliCoreVersion": "2.70.0" + "azext.minCliCoreVersion": "2.71.0" } \ No newline at end of file diff --git a/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_commands.py b/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_commands.py index f572f10846e..d81b92bf7cf 100644 --- a/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_commands.py +++ b/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_commands.py @@ -226,9 +226,10 @@ def test_events_show_for_app(self, resource_group, location): 'app_id1': app1_info["appId"], 'id1': app1_info["id"], }) - self.cmd('az monitor app-insights events show --app {app_id1} --type availabilityResults --start-time 2025-04-06 00:31 +00:00 --end-time 2025-04-16 01:31 +00:00', checks=[ - self.check('value', []), - ]) + result = self.cmd('az monitor app-insights events show --app {app_id1} --type availabilityResults --start-time 2025-04-06 00:31 +00:00 --end-time 2025-04-16 01:31 +00:00').get_output_in_json() + assert result["value"] == [] + assert result["@ai.messages"][0]["code"] == "AddedLimitToQuery" # might change over time + assert isinstance(result["@odata.context"], str) self.cmd('az monitor app-insights component delete --app {name_a} -g {resource_group}', checks=[self.is_empty()]) \ No newline at end of file From 7912eb0c91f47e277e0a11832f4a0385b3c61815 Mon Sep 17 00:00:00 2001 From: AllyW Date: Wed, 16 Apr 2025 09:58:06 +0800 Subject: [PATCH 08/12] set version --- .../azext_applicationinsights/custom.py | 10 ++++++---- src/application-insights/setup.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/application-insights/azext_applicationinsights/custom.py b/src/application-insights/azext_applicationinsights/custom.py index 681e236c8fe..7fc5146bd00 100644 --- a/src/application-insights/azext_applicationinsights/custom.py +++ b/src/application-insights/azext_applicationinsights/custom.py @@ -31,11 +31,11 @@ def execute_query(cmd, application, analytics_query, start_time=None, end_time=None, offset='1h', resource_group_name=None): """Executes a query against the provided Application Insights application.""" - from .aaz.latest.monitor.app_insights import QueryExecute targets = get_query_targets(cmd.cli_ctx, application, resource_group_name) if not isinstance(offset, datetime.timedelta): offset = isodate.parse_duration(offset) timespan = get_timespan(cmd.cli_ctx, start_time, end_time, offset) + from .aaz.latest.monitor.app_insights import QueryExecute arg_obj = { "app_id": targets[0], "query": analytics_query, @@ -65,10 +65,11 @@ def get_events(cmd, application, event_type, event=None, start_time=None, end_ti def get_metric(cmd, application, metric, start_time=None, end_time=None, offset='1h', interval=None, aggregation=None, segment=None, top=None, orderby=None, filter_arg=None, resource_group_name=None): - from .aaz.latest.monitor.app_insights.metric import Show timespan = get_timespan(cmd.cli_ctx, start_time, end_time, offset) + app_id = get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name) + from .aaz.latest.monitor.app_insights.metric import Show arg_obj = { - "app_id": get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name), + "app_id": app_id, "metric_id": metric, "timespan": timespan, "interval": interval, @@ -82,9 +83,10 @@ def get_metric(cmd, application, metric, start_time=None, end_time=None, offset= def get_metrics_metadata(cmd, application, resource_group_name=None): + app_id = get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name) from .aaz.latest.monitor.app_insights.metric import GetMetadata arg_obj = { - "app_id": get_id_from_azure_resource(cmd.cli_ctx, application, resource_group=resource_group_name), + "app_id": app_id, } return GetMetadata(cli_ctx=cmd.cli_ctx)(command_args=arg_obj) diff --git a/src/application-insights/setup.py b/src/application-insights/setup.py index 5acdcff4332..02e2593f5e0 100644 --- a/src/application-insights/setup.py +++ b/src/application-insights/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "1.2.3" +VERSION = "1.3.0" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From 45813651863393cccba91a0e21b3caf4905fe23e Mon Sep 17 00:00:00 2001 From: AllyW Date: Wed, 16 Apr 2025 10:01:06 +0800 Subject: [PATCH 09/12] adjust help --- .../aaz/latest/monitor/app_insights/__cmd_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__cmd_group.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__cmd_group.py index a071f84d9ad..c39e6cc3aea 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__cmd_group.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/__cmd_group.py @@ -15,7 +15,7 @@ "monitor app-insights", ) class __CMDGroup(AAZCommandGroup): - """Manage App + """Commands for querying data in Application Insights applications. """ pass From 35bcfeb5fe20d5e6eeecc6810debd281fecb664e Mon Sep 17 00:00:00 2001 From: AllyW Date: Wed, 16 Apr 2025 16:30:08 +0800 Subject: [PATCH 10/12] remove data plane sdk --- .../azext_applicationinsights/_params.py | 2 +- .../azext_applicationinsights/custom.py | 3 +- .../azext_applicationinsights/util.py | 15 + .../applicationinsights/__init__.py | 18 -- .../application_insights_data_client.py | 82 ----- .../applicationinsights/models/__init__.py | 170 ----------- .../application_insights_data_client_enums.py | 93 ------ .../applicationinsights/models/column.py | 34 --- .../applicationinsights/models/column_py3.py | 34 --- .../models/error_detail.py | 58 ---- .../models/error_detail_py3.py | 58 ---- .../applicationinsights/models/error_info.py | 51 ---- .../models/error_info_py3.py | 51 ---- .../models/error_response.py | 49 --- .../models/error_response_py3.py | 49 --- .../models/events_ai_info.py | 40 --- .../models/events_ai_info_py3.py | 40 --- .../models/events_application_info.py | 28 -- .../models/events_application_info_py3.py | 28 -- .../models/events_availability_result_info.py | 57 ---- .../events_availability_result_info_py3.py | 57 ---- .../events_availability_result_result.py | 77 ----- .../events_availability_result_result_py3.py | 77 ----- .../models/events_browser_timing_info.py | 64 ---- .../models/events_browser_timing_info_py3.py | 64 ---- .../models/events_browser_timing_result.py | 82 ----- .../events_browser_timing_result_py3.py | 82 ----- .../models/events_client_info.py | 56 ---- .../models/events_client_info_py3.py | 56 ---- .../models/events_client_performance_info.py | 28 -- .../events_client_performance_info_py3.py | 28 -- .../models/events_cloud_info.py | 32 -- .../models/events_cloud_info_py3.py | 32 -- .../models/events_custom_event_info.py | 28 -- .../models/events_custom_event_info_py3.py | 28 -- .../models/events_custom_event_result.py | 77 ----- .../models/events_custom_event_result_py3.py | 77 ----- .../models/events_custom_metric_info.py | 52 ---- .../models/events_custom_metric_info_py3.py | 52 ---- .../models/events_custom_metric_result.py | 77 ----- .../models/events_custom_metric_result_py3.py | 77 ----- .../models/events_dependency_info.py | 60 ---- .../models/events_dependency_info_py3.py | 60 ---- .../models/events_dependency_result.py | 76 ----- .../models/events_dependency_result_py3.py | 76 ----- .../models/events_exception_detail.py | 49 --- .../models/events_exception_detail_py3.py | 49 --- .../events_exception_details_parsed_stack.py | 40 --- ...ents_exception_details_parsed_stack_py3.py | 40 --- .../models/events_exception_info.py | 89 ------ .../models/events_exception_info_py3.py | 89 ------ .../models/events_exception_result.py | 76 ----- .../models/events_exception_result_py3.py | 76 ----- .../models/events_operation_info.py | 40 --- .../models/events_operation_info_py3.py | 40 --- .../models/events_page_view_info.py | 40 --- .../models/events_page_view_info_py3.py | 40 --- .../models/events_page_view_result.py | 76 ----- .../models/events_page_view_result_py3.py | 76 ----- .../models/events_performance_counter_info.py | 48 --- .../events_performance_counter_info_py3.py | 48 --- .../events_performance_counter_result.py | 77 ----- .../events_performance_counter_result_py3.py | 77 ----- .../models/events_request_info.py | 56 ---- .../models/events_request_info_py3.py | 56 ---- .../models/events_request_result.py | 76 ----- .../models/events_request_result_py3.py | 76 ----- .../models/events_result.py | 32 -- .../models/events_result_data.py | 95 ------ .../events_result_data_custom_dimensions.py | 28 -- ...vents_result_data_custom_dimensions_py3.py | 28 -- .../events_result_data_custom_measurements.py | 28 -- ...nts_result_data_custom_measurements_py3.py | 28 -- .../models/events_result_data_py3.py | 95 ------ .../models/events_result_py3.py | 32 -- .../models/events_results.py | 36 --- .../models/events_results_py3.py | 36 --- .../models/events_session_info.py | 28 -- .../models/events_session_info_py3.py | 28 -- .../models/events_trace_info.py | 32 -- .../models/events_trace_info_py3.py | 32 -- .../models/events_trace_result.py | 76 ----- .../models/events_trace_result_py3.py | 76 ----- .../models/events_user_info.py | 36 --- .../models/events_user_info_py3.py | 36 --- .../models/metrics_post_body_schema.py | 42 --- .../metrics_post_body_schema_parameters.py | 82 ----- ...metrics_post_body_schema_parameters_py3.py | 82 ----- .../models/metrics_post_body_schema_py3.py | 42 --- .../models/metrics_result.py | 28 -- .../models/metrics_result_info.py | 45 --- .../models/metrics_result_info_py3.py | 45 --- .../models/metrics_result_py3.py | 28 -- .../models/metrics_results_item.py | 44 --- .../models/metrics_results_item_py3.py | 44 --- .../models/metrics_segment_info.py | 43 --- .../models/metrics_segment_info_py3.py | 43 --- .../applicationinsights/models/query_body.py | 46 --- .../models/query_body_py3.py | 46 --- .../models/query_results.py | 36 --- .../models/query_results_py3.py | 36 --- .../applicationinsights/models/table.py | 46 --- .../applicationinsights/models/table_py3.py | 46 --- .../operations/__init__.py | 20 -- .../operations/events_operations.py | 271 ----------------- .../operations/metrics_operations.py | 280 ------------------ .../operations/query_operations.py | 99 ------- .../applicationinsights/version.py | 13 - 108 files changed, 17 insertions(+), 6041 deletions(-) delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/__init__.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/application_insights_data_client.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/__init__.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/application_insights_data_client_enums.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/column.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/column_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_detail.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_detail_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_response.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_response_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_ai_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_ai_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_application_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_application_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_performance_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_performance_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_cloud_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_cloud_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_detail.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_detail_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_details_parsed_stack.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_details_parsed_stack_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_operation_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_operation_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_dimensions.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_dimensions_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_measurements.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_measurements_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_results.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_results_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_session_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_session_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_user_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_user_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_parameters.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_parameters_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_results_item.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_results_item_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_segment_info.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_segment_info_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_body.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_body_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_results.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_results_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/table.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/table_py3.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/__init__.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/events_operations.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/metrics_operations.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/query_operations.py delete mode 100644 src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/version.py diff --git a/src/application-insights/azext_applicationinsights/_params.py b/src/application-insights/azext_applicationinsights/_params.py index 656cc74fd43..388054288eb 100644 --- a/src/application-insights/azext_applicationinsights/_params.py +++ b/src/application-insights/azext_applicationinsights/_params.py @@ -77,7 +77,7 @@ def load_arguments(self, _): c.argument('offset', help='Filter results based on UTC hour offset.', type=get_period_type(as_timedelta=True)) with self.argument_context('monitor app-insights events show') as c: - from .vendored_sdks.applicationinsights.models import EventType + from .util import EventType c.argument('event_type', options_list=['--type'], arg_type=get_enum_type(EventType), help='The type of events to retrieve.') c.argument('event', options_list=['--event'], help='GUID of the event to retrieve. This could be obtained by first listing and filtering events, then selecting an event of interest.') c.argument('start_time', arg_type=get_datetime_type(help='Start-time of time range for which to retrieve data.')) diff --git a/src/application-insights/azext_applicationinsights/custom.py b/src/application-insights/azext_applicationinsights/custom.py index 7fc5146bd00..a9d9487e962 100644 --- a/src/application-insights/azext_applicationinsights/custom.py +++ b/src/application-insights/azext_applicationinsights/custom.py @@ -16,7 +16,6 @@ from azure.cli.core.commands.client_factory import get_mgmt_service_client from azure.cli.core.profiles import ResourceType from azure.cli.core.aaz import has_value, register_command -from azext_applicationinsights.vendored_sdks.applicationinsights.models import ErrorResponseException from .util import get_id_from_azure_resource, get_query_targets, get_timespan, get_linked_properties from .aaz.latest.monitor.app_insights.api_key import List as APIKeyList, Create as _APIKeyCreate, Delete as _APIKeyDelete from .aaz.latest.monitor.app_insights.component.billing import Show as _BillingShow, Update as _BillingUpdate @@ -44,7 +43,7 @@ def execute_query(cmd, application, analytics_query, start_time=None, end_time=N } try: return QueryExecute(cli_ctx=cmd.cli_ctx)(command_args=arg_obj) - except ErrorResponseException as ex: + except Exception as ex: if "PathNotFoundError" in ex.message: raise ValueError("The Application Insight is not found. Please check the app id again.") raise ex diff --git a/src/application-insights/azext_applicationinsights/util.py b/src/application-insights/azext_applicationinsights/util.py index cebdd036696..7006bbfd0b7 100644 --- a/src/application-insights/azext_applicationinsights/util.py +++ b/src/application-insights/azext_applicationinsights/util.py @@ -3,12 +3,27 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- +from enum import Enum from datetime import datetime import dateutil.parser # pylint: disable=import-error from azure.mgmt.core.tools import is_valid_resource_id, parse_resource_id from azext_applicationinsights._client_factory import applicationinsights_mgmt_plane_client +class EventType(str, Enum): + all = "$all" + traces = "traces" + custom_events = "customEvents" + page_views = "pageViews" + browser_timings = "browserTimings" + requests = "requests" + dependencies = "dependencies" + exceptions = "exceptions" + availability_results = "availabilityResults" + performance_counters = "performanceCounters" + custom_metrics = "customMetrics" + + def get_id_from_azure_resource(cli_ctx, app, resource_group=None): if is_valid_resource_id(app): parsed = parse_resource_id(app) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/__init__.py deleted file mode 100644 index 11d0b47e08e..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .application_insights_data_client import ApplicationInsightsDataClient -from .version import VERSION - -__all__ = ['ApplicationInsightsDataClient'] - -__version__ = VERSION - diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/application_insights_data_client.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/application_insights_data_client.py deleted file mode 100644 index 83328895f60..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/application_insights_data_client.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.service_client import SDKClient -from msrest import Configuration, Serializer, Deserializer -from .version import VERSION -from .operations.metrics_operations import MetricsOperations -from .operations.events_operations import EventsOperations -from .operations.query_operations import QueryOperations -from . import models - - -class ApplicationInsightsDataClientConfiguration(Configuration): - """Configuration for ApplicationInsightsDataClient - Note that all parameters used to create this instance are saved as instance - attributes. - - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - if credentials is None: - raise ValueError("Parameter 'credentials' must not be None.") - if not base_url: - base_url = 'https://api.applicationinsights.io/v1' - - super(ApplicationInsightsDataClientConfiguration, self).__init__(base_url) - - self.add_user_agent('azure-applicationinsights/{}'.format(VERSION)) - - self.credentials = credentials - - -class ApplicationInsightsDataClient(SDKClient): - """Composite Swagger for Application Insights Data Client - - :ivar config: Configuration for client. - :vartype config: ApplicationInsightsDataClientConfiguration - - :ivar metrics: Metrics operations - :vartype metrics: azure.applicationinsights.operations.MetricsOperations - :ivar events: Events operations - :vartype events: azure.applicationinsights.operations.EventsOperations - :ivar query: Query operations - :vartype query: azure.applicationinsights.operations.QueryOperations - - :param credentials: Subscription credentials which uniquely identify - client subscription. - :type credentials: None - :param str base_url: Service URL - """ - - def __init__( - self, credentials, base_url=None): - - self.config = ApplicationInsightsDataClientConfiguration(credentials, base_url) - super(ApplicationInsightsDataClient, self).__init__(self.config.credentials, self.config) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = 'v1' - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) - - self.metrics = MetricsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.events = EventsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.query = QueryOperations( - self._client, self.config, self._serialize, self._deserialize) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/__init__.py deleted file mode 100644 index 0fb0a6c567d..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/__init__.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -try: - from .metrics_post_body_schema_parameters_py3 import MetricsPostBodySchemaParameters - from .metrics_post_body_schema_py3 import MetricsPostBodySchema - from .metrics_segment_info_py3 import MetricsSegmentInfo - from .metrics_result_info_py3 import MetricsResultInfo - from .metrics_result_py3 import MetricsResult - from .metrics_results_item_py3 import MetricsResultsItem - from .error_detail_py3 import ErrorDetail - from .error_info_py3 import ErrorInfo - from .events_result_data_custom_dimensions_py3 import EventsResultDataCustomDimensions - from .events_result_data_custom_measurements_py3 import EventsResultDataCustomMeasurements - from .events_operation_info_py3 import EventsOperationInfo - from .events_session_info_py3 import EventsSessionInfo - from .events_user_info_py3 import EventsUserInfo - from .events_cloud_info_py3 import EventsCloudInfo - from .events_ai_info_py3 import EventsAiInfo - from .events_application_info_py3 import EventsApplicationInfo - from .events_client_info_py3 import EventsClientInfo - from .events_result_data_py3 import EventsResultData - from .events_results_py3 import EventsResults - from .events_result_py3 import EventsResult - from .events_trace_info_py3 import EventsTraceInfo - from .events_trace_result_py3 import EventsTraceResult - from .events_custom_event_info_py3 import EventsCustomEventInfo - from .events_custom_event_result_py3 import EventsCustomEventResult - from .events_page_view_info_py3 import EventsPageViewInfo - from .events_page_view_result_py3 import EventsPageViewResult - from .events_browser_timing_info_py3 import EventsBrowserTimingInfo - from .events_client_performance_info_py3 import EventsClientPerformanceInfo - from .events_browser_timing_result_py3 import EventsBrowserTimingResult - from .events_request_info_py3 import EventsRequestInfo - from .events_request_result_py3 import EventsRequestResult - from .events_dependency_info_py3 import EventsDependencyInfo - from .events_dependency_result_py3 import EventsDependencyResult - from .events_exception_details_parsed_stack_py3 import EventsExceptionDetailsParsedStack - from .events_exception_detail_py3 import EventsExceptionDetail - from .events_exception_info_py3 import EventsExceptionInfo - from .events_exception_result_py3 import EventsExceptionResult - from .events_availability_result_info_py3 import EventsAvailabilityResultInfo - from .events_availability_result_result_py3 import EventsAvailabilityResultResult - from .events_performance_counter_info_py3 import EventsPerformanceCounterInfo - from .events_performance_counter_result_py3 import EventsPerformanceCounterResult - from .events_custom_metric_info_py3 import EventsCustomMetricInfo - from .events_custom_metric_result_py3 import EventsCustomMetricResult - from .query_body_py3 import QueryBody - from .column_py3 import Column - from .table_py3 import Table - from .query_results_py3 import QueryResults - from .error_response_py3 import ErrorResponse, ErrorResponseException -except (SyntaxError, ImportError): - from .metrics_post_body_schema_parameters import MetricsPostBodySchemaParameters - from .metrics_post_body_schema import MetricsPostBodySchema - from .metrics_segment_info import MetricsSegmentInfo - from .metrics_result_info import MetricsResultInfo - from .metrics_result import MetricsResult - from .metrics_results_item import MetricsResultsItem - from .error_detail import ErrorDetail - from .error_info import ErrorInfo - from .events_result_data_custom_dimensions import EventsResultDataCustomDimensions - from .events_result_data_custom_measurements import EventsResultDataCustomMeasurements - from .events_operation_info import EventsOperationInfo - from .events_session_info import EventsSessionInfo - from .events_user_info import EventsUserInfo - from .events_cloud_info import EventsCloudInfo - from .events_ai_info import EventsAiInfo - from .events_application_info import EventsApplicationInfo - from .events_client_info import EventsClientInfo - from .events_result_data import EventsResultData - from .events_results import EventsResults - from .events_result import EventsResult - from .events_trace_info import EventsTraceInfo - from .events_trace_result import EventsTraceResult - from .events_custom_event_info import EventsCustomEventInfo - from .events_custom_event_result import EventsCustomEventResult - from .events_page_view_info import EventsPageViewInfo - from .events_page_view_result import EventsPageViewResult - from .events_browser_timing_info import EventsBrowserTimingInfo - from .events_client_performance_info import EventsClientPerformanceInfo - from .events_browser_timing_result import EventsBrowserTimingResult - from .events_request_info import EventsRequestInfo - from .events_request_result import EventsRequestResult - from .events_dependency_info import EventsDependencyInfo - from .events_dependency_result import EventsDependencyResult - from .events_exception_details_parsed_stack import EventsExceptionDetailsParsedStack - from .events_exception_detail import EventsExceptionDetail - from .events_exception_info import EventsExceptionInfo - from .events_exception_result import EventsExceptionResult - from .events_availability_result_info import EventsAvailabilityResultInfo - from .events_availability_result_result import EventsAvailabilityResultResult - from .events_performance_counter_info import EventsPerformanceCounterInfo - from .events_performance_counter_result import EventsPerformanceCounterResult - from .events_custom_metric_info import EventsCustomMetricInfo - from .events_custom_metric_result import EventsCustomMetricResult - from .query_body import QueryBody - from .column import Column - from .table import Table - from .query_results import QueryResults - from .error_response import ErrorResponse, ErrorResponseException -from .application_insights_data_client_enums import ( - MetricId, - MetricsAggregation, - MetricsSegment, - EventType, -) - -__all__ = [ - 'MetricsPostBodySchemaParameters', - 'MetricsPostBodySchema', - 'MetricsSegmentInfo', - 'MetricsResultInfo', - 'MetricsResult', - 'MetricsResultsItem', - 'ErrorDetail', - 'ErrorInfo', - 'EventsResultDataCustomDimensions', - 'EventsResultDataCustomMeasurements', - 'EventsOperationInfo', - 'EventsSessionInfo', - 'EventsUserInfo', - 'EventsCloudInfo', - 'EventsAiInfo', - 'EventsApplicationInfo', - 'EventsClientInfo', - 'EventsResultData', - 'EventsResults', - 'EventsResult', - 'EventsTraceInfo', - 'EventsTraceResult', - 'EventsCustomEventInfo', - 'EventsCustomEventResult', - 'EventsPageViewInfo', - 'EventsPageViewResult', - 'EventsBrowserTimingInfo', - 'EventsClientPerformanceInfo', - 'EventsBrowserTimingResult', - 'EventsRequestInfo', - 'EventsRequestResult', - 'EventsDependencyInfo', - 'EventsDependencyResult', - 'EventsExceptionDetailsParsedStack', - 'EventsExceptionDetail', - 'EventsExceptionInfo', - 'EventsExceptionResult', - 'EventsAvailabilityResultInfo', - 'EventsAvailabilityResultResult', - 'EventsPerformanceCounterInfo', - 'EventsPerformanceCounterResult', - 'EventsCustomMetricInfo', - 'EventsCustomMetricResult', - 'QueryBody', - 'Column', - 'Table', - 'QueryResults', - 'ErrorResponse', 'ErrorResponseException', - 'MetricId', - 'MetricsAggregation', - 'MetricsSegment', - 'EventType', -] diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/application_insights_data_client_enums.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/application_insights_data_client_enums.py deleted file mode 100644 index f81da2b46d5..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/application_insights_data_client_enums.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum - - -class MetricId(str, Enum): - - requestscount = "requests/count" - requestsduration = "requests/duration" - requestsfailed = "requests/failed" - userscount = "users/count" - usersauthenticated = "users/authenticated" - page_viewscount = "pageViews/count" - page_viewsduration = "pageViews/duration" - clientprocessing_duration = "client/processingDuration" - clientreceive_duration = "client/receiveDuration" - clientnetwork_duration = "client/networkDuration" - clientsend_duration = "client/sendDuration" - clienttotal_duration = "client/totalDuration" - dependenciescount = "dependencies/count" - dependenciesfailed = "dependencies/failed" - dependenciesduration = "dependencies/duration" - exceptionscount = "exceptions/count" - exceptionsbrowser = "exceptions/browser" - exceptionsserver = "exceptions/server" - sessionscount = "sessions/count" - performance_countersrequest_execution_time = "performanceCounters/requestExecutionTime" - performance_countersrequests_per_second = "performanceCounters/requestsPerSecond" - performance_countersrequests_in_queue = "performanceCounters/requestsInQueue" - performance_countersmemory_available_bytes = "performanceCounters/memoryAvailableBytes" - performance_countersexceptions_per_second = "performanceCounters/exceptionsPerSecond" - performance_countersprocess_cpu_percentage = "performanceCounters/processCpuPercentage" - performance_countersprocess_io_bytes_per_second = "performanceCounters/processIOBytesPerSecond" - performance_countersprocess_private_bytes = "performanceCounters/processPrivateBytes" - performance_countersprocessor_cpu_percentage = "performanceCounters/processorCpuPercentage" - availability_resultsavailability_percentage = "availabilityResults/availabilityPercentage" - availability_resultsduration = "availabilityResults/duration" - billingtelemetry_count = "billing/telemetryCount" - custom_eventscount = "customEvents/count" - - -class MetricsAggregation(str, Enum): - - min = "min" - max = "max" - avg = "avg" - sum = "sum" - count = "count" - unique = "unique" - - -class MetricsSegment(str, Enum): - - application_build = "applicationBuild" - application_version = "applicationVersion" - authenticated_or_anonymous_traffic = "authenticatedOrAnonymousTraffic" - browser = "browser" - browser_version = "browserVersion" - city = "city" - cloud_role_name = "cloudRoleName" - cloud_service_name = "cloudServiceName" - continent = "continent" - country_or_region = "countryOrRegion" - deployment_id = "deploymentId" - deployment_unit = "deploymentUnit" - device_type = "deviceType" - environment = "environment" - hosting_location = "hostingLocation" - instance_name = "instanceName" - - -class EventType(str, Enum): - - all = "$all" - traces = "traces" - custom_events = "customEvents" - page_views = "pageViews" - browser_timings = "browserTimings" - requests = "requests" - dependencies = "dependencies" - exceptions = "exceptions" - availability_results = "availabilityResults" - performance_counters = "performanceCounters" - custom_metrics = "customMetrics" diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/column.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/column.py deleted file mode 100644 index fde9b294d35..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/column.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Column(Model): - """A table column. - - A column in a table. - - :param name: The name of this column. - :type name: str - :param type: The data type of this column. - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Column, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/column_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/column_py3.py deleted file mode 100644 index 4df2ac58398..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/column_py3.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Column(Model): - """A table column. - - A column in a table. - - :param name: The name of this column. - :type name: str - :param type: The data type of this column. - :type type: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None: - super(Column, self).__init__(**kwargs) - self.name = name - self.type = type diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_detail.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_detail.py deleted file mode 100644 index 3fd620dffa4..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_detail.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetail(Model): - """Error details. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error's code. - :type code: str - :param message: Required. A human readable error message. - :type message: str - :param target: Indicates which property in the request is responsible for - the error. - :type target: str - :param value: Indicates which value in 'target' is responsible for the - error. - :type value: str - :param resources: Indicates resources which were responsible for the - error. - :type resources: list[str] - :param additional_properties: - :type additional_properties: object - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[str]'}, - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ErrorDetail, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.value = kwargs.get('value', None) - self.resources = kwargs.get('resources', None) - self.additional_properties = kwargs.get('additional_properties', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_detail_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_detail_py3.py deleted file mode 100644 index 8c714de89d1..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_detail_py3.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorDetail(Model): - """Error details. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. The error's code. - :type code: str - :param message: Required. A human readable error message. - :type message: str - :param target: Indicates which property in the request is responsible for - the error. - :type target: str - :param value: Indicates which value in 'target' is responsible for the - error. - :type value: str - :param resources: Indicates resources which were responsible for the - error. - :type resources: list[str] - :param additional_properties: - :type additional_properties: object - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'resources': {'key': 'resources', 'type': '[str]'}, - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - } - - def __init__(self, *, code: str, message: str, target: str=None, value: str=None, resources=None, additional_properties=None, **kwargs) -> None: - super(ErrorDetail, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.value = value - self.resources = resources - self.additional_properties = additional_properties diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_info.py deleted file mode 100644 index 4e6ef3ba78f..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_info.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorInfo(Model): - """The code and message for an error. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. A machine readable error code. - :type code: str - :param message: Required. A human readable error message. - :type message: str - :param details: error details. - :type details: list[~azure.applicationinsights.models.ErrorDetail] - :param innererror: Inner error details if they exist. - :type innererror: ~azure.applicationinsights.models.ErrorInfo - :param additional_properties: - :type additional_properties: object - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'innererror': {'key': 'innererror', 'type': 'ErrorInfo'}, - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(ErrorInfo, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.details = kwargs.get('details', None) - self.innererror = kwargs.get('innererror', None) - self.additional_properties = kwargs.get('additional_properties', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_info_py3.py deleted file mode 100644 index ff330714751..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_info_py3.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class ErrorInfo(Model): - """The code and message for an error. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. A machine readable error code. - :type code: str - :param message: Required. A human readable error message. - :type message: str - :param details: error details. - :type details: list[~azure.applicationinsights.models.ErrorDetail] - :param innererror: Inner error details if they exist. - :type innererror: ~azure.applicationinsights.models.ErrorInfo - :param additional_properties: - :type additional_properties: object - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'innererror': {'key': 'innererror', 'type': 'ErrorInfo'}, - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - } - - def __init__(self, *, code: str, message: str, details=None, innererror=None, additional_properties=None, **kwargs) -> None: - super(ErrorInfo, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details - self.innererror = innererror - self.additional_properties = additional_properties diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_response.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_response.py deleted file mode 100644 index 5a1e0b618bb..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_response.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error details. - - Contains details when the response code indicates an error. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. The error details. - :type error: ~azure.applicationinsights.models.ErrorInfo - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorInfo'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_response_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_response_py3.py deleted file mode 100644 index f239ac31537..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/error_response_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error details. - - Contains details when the response code indicates an error. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. The error details. - :type error: ~azure.applicationinsights.models.ErrorInfo - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorInfo'}, - } - - def __init__(self, *, error, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_ai_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_ai_info.py deleted file mode 100644 index 61f01cdf44a..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_ai_info.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsAiInfo(Model): - """AI related application info for an event result. - - :param i_key: iKey of the app - :type i_key: str - :param app_name: Name of the application - :type app_name: str - :param app_id: ID of the application - :type app_id: str - :param sdk_version: SDK version of the application - :type sdk_version: str - """ - - _attribute_map = { - 'i_key': {'key': 'iKey', 'type': 'str'}, - 'app_name': {'key': 'appName', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - 'sdk_version': {'key': 'sdkVersion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsAiInfo, self).__init__(**kwargs) - self.i_key = kwargs.get('i_key', None) - self.app_name = kwargs.get('app_name', None) - self.app_id = kwargs.get('app_id', None) - self.sdk_version = kwargs.get('sdk_version', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_ai_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_ai_info_py3.py deleted file mode 100644 index ab903f4b09e..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_ai_info_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsAiInfo(Model): - """AI related application info for an event result. - - :param i_key: iKey of the app - :type i_key: str - :param app_name: Name of the application - :type app_name: str - :param app_id: ID of the application - :type app_id: str - :param sdk_version: SDK version of the application - :type sdk_version: str - """ - - _attribute_map = { - 'i_key': {'key': 'iKey', 'type': 'str'}, - 'app_name': {'key': 'appName', 'type': 'str'}, - 'app_id': {'key': 'appId', 'type': 'str'}, - 'sdk_version': {'key': 'sdkVersion', 'type': 'str'}, - } - - def __init__(self, *, i_key: str=None, app_name: str=None, app_id: str=None, sdk_version: str=None, **kwargs) -> None: - super(EventsAiInfo, self).__init__(**kwargs) - self.i_key = i_key - self.app_name = app_name - self.app_id = app_id - self.sdk_version = sdk_version diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_application_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_application_info.py deleted file mode 100644 index 5ed98e5c8b1..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_application_info.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsApplicationInfo(Model): - """Application info for an event result. - - :param version: Version of the application - :type version: str - """ - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsApplicationInfo, self).__init__(**kwargs) - self.version = kwargs.get('version', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_application_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_application_info_py3.py deleted file mode 100644 index 03ede06633b..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_application_info_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsApplicationInfo(Model): - """Application info for an event result. - - :param version: Version of the application - :type version: str - """ - - _attribute_map = { - 'version': {'key': 'version', 'type': 'str'}, - } - - def __init__(self, *, version: str=None, **kwargs) -> None: - super(EventsApplicationInfo, self).__init__(**kwargs) - self.version = version diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_info.py deleted file mode 100644 index 3daaca0578a..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_info.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsAvailabilityResultInfo(Model): - """The availability result info. - - :param name: The name of the availability result - :type name: str - :param success: Indicates if the availability result was successful - :type success: str - :param duration: The duration of the availability result - :type duration: long - :param performance_bucket: The performance bucket of the availability - result - :type performance_bucket: str - :param message: The message of the availability result - :type message: str - :param location: The location of the availability result - :type location: str - :param id: The ID of the availability result - :type id: str - :param size: The size of the availability result - :type size: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'success': {'key': 'success', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'long'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsAvailabilityResultInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.success = kwargs.get('success', None) - self.duration = kwargs.get('duration', None) - self.performance_bucket = kwargs.get('performance_bucket', None) - self.message = kwargs.get('message', None) - self.location = kwargs.get('location', None) - self.id = kwargs.get('id', None) - self.size = kwargs.get('size', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_info_py3.py deleted file mode 100644 index 90bd69d03aa..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_info_py3.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsAvailabilityResultInfo(Model): - """The availability result info. - - :param name: The name of the availability result - :type name: str - :param success: Indicates if the availability result was successful - :type success: str - :param duration: The duration of the availability result - :type duration: long - :param performance_bucket: The performance bucket of the availability - result - :type performance_bucket: str - :param message: The message of the availability result - :type message: str - :param location: The location of the availability result - :type location: str - :param id: The ID of the availability result - :type id: str - :param size: The size of the availability result - :type size: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'success': {'key': 'success', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'long'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'size': {'key': 'size', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, success: str=None, duration: int=None, performance_bucket: str=None, message: str=None, location: str=None, id: str=None, size: str=None, **kwargs) -> None: - super(EventsAvailabilityResultInfo, self).__init__(**kwargs) - self.name = name - self.success = success - self.duration = duration - self.performance_bucket = performance_bucket - self.message = message - self.location = location - self.id = id - self.size = size diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_result.py deleted file mode 100644 index ab85901d221..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_result.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsAvailabilityResultResult(EventsResultData): - """An availability result result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param availability_result: - :type availability_result: - ~azure.applicationinsights.models.EventsAvailabilityResultInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'availability_result': {'key': 'availabilityResult', 'type': 'EventsAvailabilityResultInfo'}, - } - - def __init__(self, **kwargs): - super(EventsAvailabilityResultResult, self).__init__(**kwargs) - self.availability_result = kwargs.get('availability_result', None) - self.type = 'availabilityResult' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_result_py3.py deleted file mode 100644 index c1fd4fc0084..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_availability_result_result_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsAvailabilityResultResult(EventsResultData): - """An availability result result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param availability_result: - :type availability_result: - ~azure.applicationinsights.models.EventsAvailabilityResultInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'availability_result': {'key': 'availabilityResult', 'type': 'EventsAvailabilityResultInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, availability_result=None, **kwargs) -> None: - super(EventsAvailabilityResultResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.availability_result = availability_result - self.type = 'availabilityResult' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_info.py deleted file mode 100644 index 1686e263cfb..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_info.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsBrowserTimingInfo(Model): - """The browser timing information. - - :param url_path: The path of the URL - :type url_path: str - :param url_host: The host of the URL - :type url_host: str - :param name: The name of the page - :type name: str - :param url: The url of the page - :type url: str - :param total_duration: The total duration of the load - :type total_duration: long - :param performance_bucket: The performance bucket of the load - :type performance_bucket: str - :param network_duration: The network duration of the load - :type network_duration: long - :param send_duration: The send duration of the load - :type send_duration: long - :param receive_duration: The receive duration of the load - :type receive_duration: long - :param processing_duration: The processing duration of the load - :type processing_duration: long - """ - - _attribute_map = { - 'url_path': {'key': 'urlPath', 'type': 'str'}, - 'url_host': {'key': 'urlHost', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'total_duration': {'key': 'totalDuration', 'type': 'long'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - 'network_duration': {'key': 'networkDuration', 'type': 'long'}, - 'send_duration': {'key': 'sendDuration', 'type': 'long'}, - 'receive_duration': {'key': 'receiveDuration', 'type': 'long'}, - 'processing_duration': {'key': 'processingDuration', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(EventsBrowserTimingInfo, self).__init__(**kwargs) - self.url_path = kwargs.get('url_path', None) - self.url_host = kwargs.get('url_host', None) - self.name = kwargs.get('name', None) - self.url = kwargs.get('url', None) - self.total_duration = kwargs.get('total_duration', None) - self.performance_bucket = kwargs.get('performance_bucket', None) - self.network_duration = kwargs.get('network_duration', None) - self.send_duration = kwargs.get('send_duration', None) - self.receive_duration = kwargs.get('receive_duration', None) - self.processing_duration = kwargs.get('processing_duration', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_info_py3.py deleted file mode 100644 index f32fabc2b31..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_info_py3.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsBrowserTimingInfo(Model): - """The browser timing information. - - :param url_path: The path of the URL - :type url_path: str - :param url_host: The host of the URL - :type url_host: str - :param name: The name of the page - :type name: str - :param url: The url of the page - :type url: str - :param total_duration: The total duration of the load - :type total_duration: long - :param performance_bucket: The performance bucket of the load - :type performance_bucket: str - :param network_duration: The network duration of the load - :type network_duration: long - :param send_duration: The send duration of the load - :type send_duration: long - :param receive_duration: The receive duration of the load - :type receive_duration: long - :param processing_duration: The processing duration of the load - :type processing_duration: long - """ - - _attribute_map = { - 'url_path': {'key': 'urlPath', 'type': 'str'}, - 'url_host': {'key': 'urlHost', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'total_duration': {'key': 'totalDuration', 'type': 'long'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - 'network_duration': {'key': 'networkDuration', 'type': 'long'}, - 'send_duration': {'key': 'sendDuration', 'type': 'long'}, - 'receive_duration': {'key': 'receiveDuration', 'type': 'long'}, - 'processing_duration': {'key': 'processingDuration', 'type': 'long'}, - } - - def __init__(self, *, url_path: str=None, url_host: str=None, name: str=None, url: str=None, total_duration: int=None, performance_bucket: str=None, network_duration: int=None, send_duration: int=None, receive_duration: int=None, processing_duration: int=None, **kwargs) -> None: - super(EventsBrowserTimingInfo, self).__init__(**kwargs) - self.url_path = url_path - self.url_host = url_host - self.name = name - self.url = url - self.total_duration = total_duration - self.performance_bucket = performance_bucket - self.network_duration = network_duration - self.send_duration = send_duration - self.receive_duration = receive_duration - self.processing_duration = processing_duration diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_result.py deleted file mode 100644 index d5183eb49d0..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_result.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsBrowserTimingResult(EventsResultData): - """A browser timing result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param browser_timing: - :type browser_timing: - ~azure.applicationinsights.models.EventsBrowserTimingInfo - :param client_performance: - :type client_performance: - ~azure.applicationinsights.models.EventsClientPerformanceInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'browser_timing': {'key': 'browserTiming', 'type': 'EventsBrowserTimingInfo'}, - 'client_performance': {'key': 'clientPerformance', 'type': 'EventsClientPerformanceInfo'}, - } - - def __init__(self, **kwargs): - super(EventsBrowserTimingResult, self).__init__(**kwargs) - self.browser_timing = kwargs.get('browser_timing', None) - self.client_performance = kwargs.get('client_performance', None) - self.type = 'browserTiming' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_result_py3.py deleted file mode 100644 index 0a65ce9632e..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_browser_timing_result_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsBrowserTimingResult(EventsResultData): - """A browser timing result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param browser_timing: - :type browser_timing: - ~azure.applicationinsights.models.EventsBrowserTimingInfo - :param client_performance: - :type client_performance: - ~azure.applicationinsights.models.EventsClientPerformanceInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'browser_timing': {'key': 'browserTiming', 'type': 'EventsBrowserTimingInfo'}, - 'client_performance': {'key': 'clientPerformance', 'type': 'EventsClientPerformanceInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, browser_timing=None, client_performance=None, **kwargs) -> None: - super(EventsBrowserTimingResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.browser_timing = browser_timing - self.client_performance = client_performance - self.type = 'browserTiming' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_info.py deleted file mode 100644 index 7827e8167d1..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_info.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsClientInfo(Model): - """Client info for an event result. - - :param model: Model of the client - :type model: str - :param os: Operating system of the client - :type os: str - :param type: Type of the client - :type type: str - :param browser: Browser of the client - :type browser: str - :param ip: IP address of the client - :type ip: str - :param city: City of the client - :type city: str - :param state_or_province: State or province of the client - :type state_or_province: str - :param country_or_region: Country or region of the client - :type country_or_region: str - """ - - _attribute_map = { - 'model': {'key': 'model', 'type': 'str'}, - 'os': {'key': 'os', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'browser': {'key': 'browser', 'type': 'str'}, - 'ip': {'key': 'ip', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, - 'country_or_region': {'key': 'countryOrRegion', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsClientInfo, self).__init__(**kwargs) - self.model = kwargs.get('model', None) - self.os = kwargs.get('os', None) - self.type = kwargs.get('type', None) - self.browser = kwargs.get('browser', None) - self.ip = kwargs.get('ip', None) - self.city = kwargs.get('city', None) - self.state_or_province = kwargs.get('state_or_province', None) - self.country_or_region = kwargs.get('country_or_region', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_info_py3.py deleted file mode 100644 index 92bf9e59688..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_info_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsClientInfo(Model): - """Client info for an event result. - - :param model: Model of the client - :type model: str - :param os: Operating system of the client - :type os: str - :param type: Type of the client - :type type: str - :param browser: Browser of the client - :type browser: str - :param ip: IP address of the client - :type ip: str - :param city: City of the client - :type city: str - :param state_or_province: State or province of the client - :type state_or_province: str - :param country_or_region: Country or region of the client - :type country_or_region: str - """ - - _attribute_map = { - 'model': {'key': 'model', 'type': 'str'}, - 'os': {'key': 'os', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'browser': {'key': 'browser', 'type': 'str'}, - 'ip': {'key': 'ip', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - 'state_or_province': {'key': 'stateOrProvince', 'type': 'str'}, - 'country_or_region': {'key': 'countryOrRegion', 'type': 'str'}, - } - - def __init__(self, *, model: str=None, os: str=None, type: str=None, browser: str=None, ip: str=None, city: str=None, state_or_province: str=None, country_or_region: str=None, **kwargs) -> None: - super(EventsClientInfo, self).__init__(**kwargs) - self.model = model - self.os = os - self.type = type - self.browser = browser - self.ip = ip - self.city = city - self.state_or_province = state_or_province - self.country_or_region = country_or_region diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_performance_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_performance_info.py deleted file mode 100644 index 84186213f13..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_performance_info.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsClientPerformanceInfo(Model): - """Client performance information. - - :param name: The name of the client performance - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsClientPerformanceInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_performance_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_performance_info_py3.py deleted file mode 100644 index e0c47362385..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_client_performance_info_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsClientPerformanceInfo(Model): - """Client performance information. - - :param name: The name of the client performance - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(EventsClientPerformanceInfo, self).__init__(**kwargs) - self.name = name diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_cloud_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_cloud_info.py deleted file mode 100644 index 547985375c5..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_cloud_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsCloudInfo(Model): - """Cloud info for an event result. - - :param role_name: Role name of the cloud - :type role_name: str - :param role_instance: Role instance of the cloud - :type role_instance: str - """ - - _attribute_map = { - 'role_name': {'key': 'roleName', 'type': 'str'}, - 'role_instance': {'key': 'roleInstance', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsCloudInfo, self).__init__(**kwargs) - self.role_name = kwargs.get('role_name', None) - self.role_instance = kwargs.get('role_instance', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_cloud_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_cloud_info_py3.py deleted file mode 100644 index 1024176027b..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_cloud_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsCloudInfo(Model): - """Cloud info for an event result. - - :param role_name: Role name of the cloud - :type role_name: str - :param role_instance: Role instance of the cloud - :type role_instance: str - """ - - _attribute_map = { - 'role_name': {'key': 'roleName', 'type': 'str'}, - 'role_instance': {'key': 'roleInstance', 'type': 'str'}, - } - - def __init__(self, *, role_name: str=None, role_instance: str=None, **kwargs) -> None: - super(EventsCloudInfo, self).__init__(**kwargs) - self.role_name = role_name - self.role_instance = role_instance diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_info.py deleted file mode 100644 index 1b0afe7f223..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_info.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsCustomEventInfo(Model): - """The custom event information. - - :param name: The name of the custom event - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsCustomEventInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_info_py3.py deleted file mode 100644 index 68ae8f3a790..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_info_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsCustomEventInfo(Model): - """The custom event information. - - :param name: The name of the custom event - :type name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, **kwargs) -> None: - super(EventsCustomEventInfo, self).__init__(**kwargs) - self.name = name diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_result.py deleted file mode 100644 index 05fd0a74ec5..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_result.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsCustomEventResult(EventsResultData): - """A custom event result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param custom_event: - :type custom_event: - ~azure.applicationinsights.models.EventsCustomEventInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'custom_event': {'key': 'customEvent', 'type': 'EventsCustomEventInfo'}, - } - - def __init__(self, **kwargs): - super(EventsCustomEventResult, self).__init__(**kwargs) - self.custom_event = kwargs.get('custom_event', None) - self.type = 'customEvent' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_result_py3.py deleted file mode 100644 index 0cc02be6bb9..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_event_result_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsCustomEventResult(EventsResultData): - """A custom event result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param custom_event: - :type custom_event: - ~azure.applicationinsights.models.EventsCustomEventInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'custom_event': {'key': 'customEvent', 'type': 'EventsCustomEventInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, custom_event=None, **kwargs) -> None: - super(EventsCustomEventResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.custom_event = custom_event - self.type = 'customEvent' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_info.py deleted file mode 100644 index 161b88aab45..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_info.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsCustomMetricInfo(Model): - """The custom metric info. - - :param name: The name of the custom metric - :type name: str - :param value: The value of the custom metric - :type value: float - :param value_sum: The sum of the custom metric - :type value_sum: float - :param value_count: The count of the custom metric - :type value_count: int - :param value_min: The minimum value of the custom metric - :type value_min: float - :param value_max: The maximum value of the custom metric - :type value_max: float - :param value_std_dev: The standard deviation of the custom metric - :type value_std_dev: float - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - 'value_sum': {'key': 'valueSum', 'type': 'float'}, - 'value_count': {'key': 'valueCount', 'type': 'int'}, - 'value_min': {'key': 'valueMin', 'type': 'float'}, - 'value_max': {'key': 'valueMax', 'type': 'float'}, - 'value_std_dev': {'key': 'valueStdDev', 'type': 'float'}, - } - - def __init__(self, **kwargs): - super(EventsCustomMetricInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.value = kwargs.get('value', None) - self.value_sum = kwargs.get('value_sum', None) - self.value_count = kwargs.get('value_count', None) - self.value_min = kwargs.get('value_min', None) - self.value_max = kwargs.get('value_max', None) - self.value_std_dev = kwargs.get('value_std_dev', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_info_py3.py deleted file mode 100644 index e2d46ef2d2e..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_info_py3.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsCustomMetricInfo(Model): - """The custom metric info. - - :param name: The name of the custom metric - :type name: str - :param value: The value of the custom metric - :type value: float - :param value_sum: The sum of the custom metric - :type value_sum: float - :param value_count: The count of the custom metric - :type value_count: int - :param value_min: The minimum value of the custom metric - :type value_min: float - :param value_max: The maximum value of the custom metric - :type value_max: float - :param value_std_dev: The standard deviation of the custom metric - :type value_std_dev: float - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'float'}, - 'value_sum': {'key': 'valueSum', 'type': 'float'}, - 'value_count': {'key': 'valueCount', 'type': 'int'}, - 'value_min': {'key': 'valueMin', 'type': 'float'}, - 'value_max': {'key': 'valueMax', 'type': 'float'}, - 'value_std_dev': {'key': 'valueStdDev', 'type': 'float'}, - } - - def __init__(self, *, name: str=None, value: float=None, value_sum: float=None, value_count: int=None, value_min: float=None, value_max: float=None, value_std_dev: float=None, **kwargs) -> None: - super(EventsCustomMetricInfo, self).__init__(**kwargs) - self.name = name - self.value = value - self.value_sum = value_sum - self.value_count = value_count - self.value_min = value_min - self.value_max = value_max - self.value_std_dev = value_std_dev diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_result.py deleted file mode 100644 index 12c87e84ba5..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_result.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsCustomMetricResult(EventsResultData): - """A custom metric result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param custom_metric: - :type custom_metric: - ~azure.applicationinsights.models.EventsCustomMetricInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'custom_metric': {'key': 'customMetric', 'type': 'EventsCustomMetricInfo'}, - } - - def __init__(self, **kwargs): - super(EventsCustomMetricResult, self).__init__(**kwargs) - self.custom_metric = kwargs.get('custom_metric', None) - self.type = 'customMetric' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_result_py3.py deleted file mode 100644 index fd67a16f53f..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_custom_metric_result_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsCustomMetricResult(EventsResultData): - """A custom metric result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param custom_metric: - :type custom_metric: - ~azure.applicationinsights.models.EventsCustomMetricInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'custom_metric': {'key': 'customMetric', 'type': 'EventsCustomMetricInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, custom_metric=None, **kwargs) -> None: - super(EventsCustomMetricResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.custom_metric = custom_metric - self.type = 'customMetric' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_info.py deleted file mode 100644 index 0e8ce3511e4..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_info.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsDependencyInfo(Model): - """The dependency info. - - :param target: The target of the dependency - :type target: str - :param data: The data of the dependency - :type data: str - :param success: Indicates if the dependency was successful - :type success: str - :param duration: The duration of the dependency - :type duration: long - :param performance_bucket: The performance bucket of the dependency - :type performance_bucket: str - :param result_code: The result code of the dependency - :type result_code: str - :param type: The type of the dependency - :type type: str - :param name: The name of the dependency - :type name: str - :param id: The ID of the dependency - :type id: str - """ - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'str'}, - 'success': {'key': 'success', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'long'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsDependencyInfo, self).__init__(**kwargs) - self.target = kwargs.get('target', None) - self.data = kwargs.get('data', None) - self.success = kwargs.get('success', None) - self.duration = kwargs.get('duration', None) - self.performance_bucket = kwargs.get('performance_bucket', None) - self.result_code = kwargs.get('result_code', None) - self.type = kwargs.get('type', None) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_info_py3.py deleted file mode 100644 index 4472b9ba446..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_info_py3.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsDependencyInfo(Model): - """The dependency info. - - :param target: The target of the dependency - :type target: str - :param data: The data of the dependency - :type data: str - :param success: Indicates if the dependency was successful - :type success: str - :param duration: The duration of the dependency - :type duration: long - :param performance_bucket: The performance bucket of the dependency - :type performance_bucket: str - :param result_code: The result code of the dependency - :type result_code: str - :param type: The type of the dependency - :type type: str - :param name: The name of the dependency - :type name: str - :param id: The ID of the dependency - :type id: str - """ - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'data': {'key': 'data', 'type': 'str'}, - 'success': {'key': 'success', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'long'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, target: str=None, data: str=None, success: str=None, duration: int=None, performance_bucket: str=None, result_code: str=None, type: str=None, name: str=None, id: str=None, **kwargs) -> None: - super(EventsDependencyInfo, self).__init__(**kwargs) - self.target = target - self.data = data - self.success = success - self.duration = duration - self.performance_bucket = performance_bucket - self.result_code = result_code - self.type = type - self.name = name - self.id = id diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_result.py deleted file mode 100644 index eeece68c5cc..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_result.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsDependencyResult(EventsResultData): - """A dependency result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param dependency: - :type dependency: ~azure.applicationinsights.models.EventsDependencyInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'dependency': {'key': 'dependency', 'type': 'EventsDependencyInfo'}, - } - - def __init__(self, **kwargs): - super(EventsDependencyResult, self).__init__(**kwargs) - self.dependency = kwargs.get('dependency', None) - self.type = 'dependency' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_result_py3.py deleted file mode 100644 index 363232fa0e2..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_dependency_result_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsDependencyResult(EventsResultData): - """A dependency result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param dependency: - :type dependency: ~azure.applicationinsights.models.EventsDependencyInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'dependency': {'key': 'dependency', 'type': 'EventsDependencyInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, dependency=None, **kwargs) -> None: - super(EventsDependencyResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.dependency = dependency - self.type = 'dependency' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_detail.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_detail.py deleted file mode 100644 index d51c5357a01..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_detail.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsExceptionDetail(Model): - """Exception details. - - :param severity_level: The severity level of the exception detail - :type severity_level: str - :param outer_id: The outer ID of the exception detail - :type outer_id: str - :param message: The message of the exception detail - :type message: str - :param type: The type of the exception detail - :type type: str - :param id: The ID of the exception detail - :type id: str - :param parsed_stack: The parsed stack - :type parsed_stack: - list[~azure.applicationinsights.models.EventsExceptionDetailsParsedStack] - """ - - _attribute_map = { - 'severity_level': {'key': 'severityLevel', 'type': 'str'}, - 'outer_id': {'key': 'outerId', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'parsed_stack': {'key': 'parsedStack', 'type': '[EventsExceptionDetailsParsedStack]'}, - } - - def __init__(self, **kwargs): - super(EventsExceptionDetail, self).__init__(**kwargs) - self.severity_level = kwargs.get('severity_level', None) - self.outer_id = kwargs.get('outer_id', None) - self.message = kwargs.get('message', None) - self.type = kwargs.get('type', None) - self.id = kwargs.get('id', None) - self.parsed_stack = kwargs.get('parsed_stack', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_detail_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_detail_py3.py deleted file mode 100644 index 875aae35654..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_detail_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsExceptionDetail(Model): - """Exception details. - - :param severity_level: The severity level of the exception detail - :type severity_level: str - :param outer_id: The outer ID of the exception detail - :type outer_id: str - :param message: The message of the exception detail - :type message: str - :param type: The type of the exception detail - :type type: str - :param id: The ID of the exception detail - :type id: str - :param parsed_stack: The parsed stack - :type parsed_stack: - list[~azure.applicationinsights.models.EventsExceptionDetailsParsedStack] - """ - - _attribute_map = { - 'severity_level': {'key': 'severityLevel', 'type': 'str'}, - 'outer_id': {'key': 'outerId', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'parsed_stack': {'key': 'parsedStack', 'type': '[EventsExceptionDetailsParsedStack]'}, - } - - def __init__(self, *, severity_level: str=None, outer_id: str=None, message: str=None, type: str=None, id: str=None, parsed_stack=None, **kwargs) -> None: - super(EventsExceptionDetail, self).__init__(**kwargs) - self.severity_level = severity_level - self.outer_id = outer_id - self.message = message - self.type = type - self.id = id - self.parsed_stack = parsed_stack diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_details_parsed_stack.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_details_parsed_stack.py deleted file mode 100644 index 927bde74816..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_details_parsed_stack.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsExceptionDetailsParsedStack(Model): - """A parsed stack entry. - - :param assembly: The assembly of the stack entry - :type assembly: str - :param method: The method of the stack entry - :type method: str - :param level: The level of the stack entry - :type level: long - :param line: The line of the stack entry - :type line: long - """ - - _attribute_map = { - 'assembly': {'key': 'assembly', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'long'}, - 'line': {'key': 'line', 'type': 'long'}, - } - - def __init__(self, **kwargs): - super(EventsExceptionDetailsParsedStack, self).__init__(**kwargs) - self.assembly = kwargs.get('assembly', None) - self.method = kwargs.get('method', None) - self.level = kwargs.get('level', None) - self.line = kwargs.get('line', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_details_parsed_stack_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_details_parsed_stack_py3.py deleted file mode 100644 index d32ca08daed..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_details_parsed_stack_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsExceptionDetailsParsedStack(Model): - """A parsed stack entry. - - :param assembly: The assembly of the stack entry - :type assembly: str - :param method: The method of the stack entry - :type method: str - :param level: The level of the stack entry - :type level: long - :param line: The line of the stack entry - :type line: long - """ - - _attribute_map = { - 'assembly': {'key': 'assembly', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'level': {'key': 'level', 'type': 'long'}, - 'line': {'key': 'line', 'type': 'long'}, - } - - def __init__(self, *, assembly: str=None, method: str=None, level: int=None, line: int=None, **kwargs) -> None: - super(EventsExceptionDetailsParsedStack, self).__init__(**kwargs) - self.assembly = assembly - self.method = method - self.level = level - self.line = line diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_info.py deleted file mode 100644 index dac282869db..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_info.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsExceptionInfo(Model): - """The exception info. - - :param severity_level: The severity level of the exception - :type severity_level: int - :param problem_id: The problem ID of the exception - :type problem_id: str - :param handled_at: Indicates where the exception was handled at - :type handled_at: str - :param assembly: The assembly which threw the exception - :type assembly: str - :param method: The method that threw the exception - :type method: str - :param message: The message of the exception - :type message: str - :param type: The type of the exception - :type type: str - :param outer_type: The outer type of the exception - :type outer_type: str - :param outer_method: The outer method of the exception - :type outer_method: str - :param outer_assembly: The outer assmebly of the exception - :type outer_assembly: str - :param outer_message: The outer message of the exception - :type outer_message: str - :param innermost_type: The inner most type of the exception - :type innermost_type: str - :param innermost_message: The inner most message of the exception - :type innermost_message: str - :param innermost_method: The inner most method of the exception - :type innermost_method: str - :param innermost_assembly: The inner most assembly of the exception - :type innermost_assembly: str - :param details: The details of the exception - :type details: - list[~azure.applicationinsights.models.EventsExceptionDetail] - """ - - _attribute_map = { - 'severity_level': {'key': 'severityLevel', 'type': 'int'}, - 'problem_id': {'key': 'problemId', 'type': 'str'}, - 'handled_at': {'key': 'handledAt', 'type': 'str'}, - 'assembly': {'key': 'assembly', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'outer_type': {'key': 'outerType', 'type': 'str'}, - 'outer_method': {'key': 'outerMethod', 'type': 'str'}, - 'outer_assembly': {'key': 'outerAssembly', 'type': 'str'}, - 'outer_message': {'key': 'outerMessage', 'type': 'str'}, - 'innermost_type': {'key': 'innermostType', 'type': 'str'}, - 'innermost_message': {'key': 'innermostMessage', 'type': 'str'}, - 'innermost_method': {'key': 'innermostMethod', 'type': 'str'}, - 'innermost_assembly': {'key': 'innermostAssembly', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[EventsExceptionDetail]'}, - } - - def __init__(self, **kwargs): - super(EventsExceptionInfo, self).__init__(**kwargs) - self.severity_level = kwargs.get('severity_level', None) - self.problem_id = kwargs.get('problem_id', None) - self.handled_at = kwargs.get('handled_at', None) - self.assembly = kwargs.get('assembly', None) - self.method = kwargs.get('method', None) - self.message = kwargs.get('message', None) - self.type = kwargs.get('type', None) - self.outer_type = kwargs.get('outer_type', None) - self.outer_method = kwargs.get('outer_method', None) - self.outer_assembly = kwargs.get('outer_assembly', None) - self.outer_message = kwargs.get('outer_message', None) - self.innermost_type = kwargs.get('innermost_type', None) - self.innermost_message = kwargs.get('innermost_message', None) - self.innermost_method = kwargs.get('innermost_method', None) - self.innermost_assembly = kwargs.get('innermost_assembly', None) - self.details = kwargs.get('details', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_info_py3.py deleted file mode 100644 index dc575c2c0f3..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_info_py3.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsExceptionInfo(Model): - """The exception info. - - :param severity_level: The severity level of the exception - :type severity_level: int - :param problem_id: The problem ID of the exception - :type problem_id: str - :param handled_at: Indicates where the exception was handled at - :type handled_at: str - :param assembly: The assembly which threw the exception - :type assembly: str - :param method: The method that threw the exception - :type method: str - :param message: The message of the exception - :type message: str - :param type: The type of the exception - :type type: str - :param outer_type: The outer type of the exception - :type outer_type: str - :param outer_method: The outer method of the exception - :type outer_method: str - :param outer_assembly: The outer assmebly of the exception - :type outer_assembly: str - :param outer_message: The outer message of the exception - :type outer_message: str - :param innermost_type: The inner most type of the exception - :type innermost_type: str - :param innermost_message: The inner most message of the exception - :type innermost_message: str - :param innermost_method: The inner most method of the exception - :type innermost_method: str - :param innermost_assembly: The inner most assembly of the exception - :type innermost_assembly: str - :param details: The details of the exception - :type details: - list[~azure.applicationinsights.models.EventsExceptionDetail] - """ - - _attribute_map = { - 'severity_level': {'key': 'severityLevel', 'type': 'int'}, - 'problem_id': {'key': 'problemId', 'type': 'str'}, - 'handled_at': {'key': 'handledAt', 'type': 'str'}, - 'assembly': {'key': 'assembly', 'type': 'str'}, - 'method': {'key': 'method', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'outer_type': {'key': 'outerType', 'type': 'str'}, - 'outer_method': {'key': 'outerMethod', 'type': 'str'}, - 'outer_assembly': {'key': 'outerAssembly', 'type': 'str'}, - 'outer_message': {'key': 'outerMessage', 'type': 'str'}, - 'innermost_type': {'key': 'innermostType', 'type': 'str'}, - 'innermost_message': {'key': 'innermostMessage', 'type': 'str'}, - 'innermost_method': {'key': 'innermostMethod', 'type': 'str'}, - 'innermost_assembly': {'key': 'innermostAssembly', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[EventsExceptionDetail]'}, - } - - def __init__(self, *, severity_level: int=None, problem_id: str=None, handled_at: str=None, assembly: str=None, method: str=None, message: str=None, type: str=None, outer_type: str=None, outer_method: str=None, outer_assembly: str=None, outer_message: str=None, innermost_type: str=None, innermost_message: str=None, innermost_method: str=None, innermost_assembly: str=None, details=None, **kwargs) -> None: - super(EventsExceptionInfo, self).__init__(**kwargs) - self.severity_level = severity_level - self.problem_id = problem_id - self.handled_at = handled_at - self.assembly = assembly - self.method = method - self.message = message - self.type = type - self.outer_type = outer_type - self.outer_method = outer_method - self.outer_assembly = outer_assembly - self.outer_message = outer_message - self.innermost_type = innermost_type - self.innermost_message = innermost_message - self.innermost_method = innermost_method - self.innermost_assembly = innermost_assembly - self.details = details diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_result.py deleted file mode 100644 index a1b2d90f062..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_result.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsExceptionResult(EventsResultData): - """An exception result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param exception: - :type exception: ~azure.applicationinsights.models.EventsExceptionInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exception': {'key': 'exception', 'type': 'EventsExceptionInfo'}, - } - - def __init__(self, **kwargs): - super(EventsExceptionResult, self).__init__(**kwargs) - self.exception = kwargs.get('exception', None) - self.type = 'exception' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_result_py3.py deleted file mode 100644 index 6e908a1e865..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_exception_result_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsExceptionResult(EventsResultData): - """An exception result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param exception: - :type exception: ~azure.applicationinsights.models.EventsExceptionInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'exception': {'key': 'exception', 'type': 'EventsExceptionInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, exception=None, **kwargs) -> None: - super(EventsExceptionResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.exception = exception - self.type = 'exception' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_operation_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_operation_info.py deleted file mode 100644 index db94a452855..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_operation_info.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsOperationInfo(Model): - """Operation info for an event result. - - :param name: Name of the operation - :type name: str - :param id: ID of the operation - :type id: str - :param parent_id: Parent ID of the operation - :type parent_id: str - :param synthetic_source: Synthetic source of the operation - :type synthetic_source: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'parent_id': {'key': 'parentId', 'type': 'str'}, - 'synthetic_source': {'key': 'syntheticSource', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsOperationInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - self.parent_id = kwargs.get('parent_id', None) - self.synthetic_source = kwargs.get('synthetic_source', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_operation_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_operation_info_py3.py deleted file mode 100644 index 388b441aeca..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_operation_info_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsOperationInfo(Model): - """Operation info for an event result. - - :param name: Name of the operation - :type name: str - :param id: ID of the operation - :type id: str - :param parent_id: Parent ID of the operation - :type parent_id: str - :param synthetic_source: Synthetic source of the operation - :type synthetic_source: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'parent_id': {'key': 'parentId', 'type': 'str'}, - 'synthetic_source': {'key': 'syntheticSource', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, id: str=None, parent_id: str=None, synthetic_source: str=None, **kwargs) -> None: - super(EventsOperationInfo, self).__init__(**kwargs) - self.name = name - self.id = id - self.parent_id = parent_id - self.synthetic_source = synthetic_source diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_info.py deleted file mode 100644 index e19d3fc9f2e..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_info.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsPageViewInfo(Model): - """The page view information. - - :param name: The name of the page - :type name: str - :param url: The URL of the page - :type url: str - :param duration: The duration of the page view - :type duration: str - :param performance_bucket: The performance bucket of the page view - :type performance_bucket: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'str'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsPageViewInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.url = kwargs.get('url', None) - self.duration = kwargs.get('duration', None) - self.performance_bucket = kwargs.get('performance_bucket', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_info_py3.py deleted file mode 100644 index e651e8fe5b4..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_info_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsPageViewInfo(Model): - """The page view information. - - :param name: The name of the page - :type name: str - :param url: The URL of the page - :type url: str - :param duration: The duration of the page view - :type duration: str - :param performance_bucket: The performance bucket of the page view - :type performance_bucket: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'str'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, url: str=None, duration: str=None, performance_bucket: str=None, **kwargs) -> None: - super(EventsPageViewInfo, self).__init__(**kwargs) - self.name = name - self.url = url - self.duration = duration - self.performance_bucket = performance_bucket diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_result.py deleted file mode 100644 index e8ccba7aa68..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_result.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsPageViewResult(EventsResultData): - """A page view result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param page_view: - :type page_view: ~azure.applicationinsights.models.EventsPageViewInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'page_view': {'key': 'pageView', 'type': 'EventsPageViewInfo'}, - } - - def __init__(self, **kwargs): - super(EventsPageViewResult, self).__init__(**kwargs) - self.page_view = kwargs.get('page_view', None) - self.type = 'pageView' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_result_py3.py deleted file mode 100644 index 1d998146fbf..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_page_view_result_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsPageViewResult(EventsResultData): - """A page view result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param page_view: - :type page_view: ~azure.applicationinsights.models.EventsPageViewInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'page_view': {'key': 'pageView', 'type': 'EventsPageViewInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, page_view=None, **kwargs) -> None: - super(EventsPageViewResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.page_view = page_view - self.type = 'pageView' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_info.py deleted file mode 100644 index 3daf89d8bf1..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_info.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsPerformanceCounterInfo(Model): - """The performance counter info. - - :param value: The value of the performance counter - :type value: float - :param name: The name of the performance counter - :type name: str - :param category: The category of the performance counter - :type category: str - :param counter: The counter of the performance counter - :type counter: str - :param instance_name: The instance name of the performance counter - :type instance_name: str - :param instance: The instance of the performance counter - :type instance: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'name': {'key': 'name', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'counter': {'key': 'counter', 'type': 'str'}, - 'instance_name': {'key': 'instanceName', 'type': 'str'}, - 'instance': {'key': 'instance', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsPerformanceCounterInfo, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.name = kwargs.get('name', None) - self.category = kwargs.get('category', None) - self.counter = kwargs.get('counter', None) - self.instance_name = kwargs.get('instance_name', None) - self.instance = kwargs.get('instance', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_info_py3.py deleted file mode 100644 index 7ec08ee47e2..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_info_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsPerformanceCounterInfo(Model): - """The performance counter info. - - :param value: The value of the performance counter - :type value: float - :param name: The name of the performance counter - :type name: str - :param category: The category of the performance counter - :type category: str - :param counter: The counter of the performance counter - :type counter: str - :param instance_name: The instance name of the performance counter - :type instance_name: str - :param instance: The instance of the performance counter - :type instance: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'float'}, - 'name': {'key': 'name', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'counter': {'key': 'counter', 'type': 'str'}, - 'instance_name': {'key': 'instanceName', 'type': 'str'}, - 'instance': {'key': 'instance', 'type': 'str'}, - } - - def __init__(self, *, value: float=None, name: str=None, category: str=None, counter: str=None, instance_name: str=None, instance: str=None, **kwargs) -> None: - super(EventsPerformanceCounterInfo, self).__init__(**kwargs) - self.value = value - self.name = name - self.category = category - self.counter = counter - self.instance_name = instance_name - self.instance = instance diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_result.py deleted file mode 100644 index f57be3ebca7..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_result.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsPerformanceCounterResult(EventsResultData): - """A performance counter result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param performance_counter: - :type performance_counter: - ~azure.applicationinsights.models.EventsPerformanceCounterInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'performance_counter': {'key': 'performanceCounter', 'type': 'EventsPerformanceCounterInfo'}, - } - - def __init__(self, **kwargs): - super(EventsPerformanceCounterResult, self).__init__(**kwargs) - self.performance_counter = kwargs.get('performance_counter', None) - self.type = 'performanceCounter' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_result_py3.py deleted file mode 100644 index 6dd2a97f220..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_performance_counter_result_py3.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsPerformanceCounterResult(EventsResultData): - """A performance counter result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param performance_counter: - :type performance_counter: - ~azure.applicationinsights.models.EventsPerformanceCounterInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'performance_counter': {'key': 'performanceCounter', 'type': 'EventsPerformanceCounterInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, performance_counter=None, **kwargs) -> None: - super(EventsPerformanceCounterResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.performance_counter = performance_counter - self.type = 'performanceCounter' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_info.py deleted file mode 100644 index b4765967f7f..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_info.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsRequestInfo(Model): - """The request info. - - :param name: The name of the request - :type name: str - :param url: The URL of the request - :type url: str - :param success: Indicates if the request was successful - :type success: str - :param duration: The duration of the request - :type duration: float - :param performance_bucket: The performance bucket of the request - :type performance_bucket: str - :param result_code: The result code of the request - :type result_code: str - :param source: The source of the request - :type source: str - :param id: The ID of the request - :type id: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'success': {'key': 'success', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'float'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsRequestInfo, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.url = kwargs.get('url', None) - self.success = kwargs.get('success', None) - self.duration = kwargs.get('duration', None) - self.performance_bucket = kwargs.get('performance_bucket', None) - self.result_code = kwargs.get('result_code', None) - self.source = kwargs.get('source', None) - self.id = kwargs.get('id', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_info_py3.py deleted file mode 100644 index bdafd375574..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_info_py3.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsRequestInfo(Model): - """The request info. - - :param name: The name of the request - :type name: str - :param url: The URL of the request - :type url: str - :param success: Indicates if the request was successful - :type success: str - :param duration: The duration of the request - :type duration: float - :param performance_bucket: The performance bucket of the request - :type performance_bucket: str - :param result_code: The result code of the request - :type result_code: str - :param source: The source of the request - :type source: str - :param id: The ID of the request - :type id: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'success': {'key': 'success', 'type': 'str'}, - 'duration': {'key': 'duration', 'type': 'float'}, - 'performance_bucket': {'key': 'performanceBucket', 'type': 'str'}, - 'result_code': {'key': 'resultCode', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, name: str=None, url: str=None, success: str=None, duration: float=None, performance_bucket: str=None, result_code: str=None, source: str=None, id: str=None, **kwargs) -> None: - super(EventsRequestInfo, self).__init__(**kwargs) - self.name = name - self.url = url - self.success = success - self.duration = duration - self.performance_bucket = performance_bucket - self.result_code = result_code - self.source = source - self.id = id diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_result.py deleted file mode 100644 index 0df622bcb77..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_result.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsRequestResult(EventsResultData): - """A request result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param request: - :type request: ~azure.applicationinsights.models.EventsRequestInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request': {'key': 'request', 'type': 'EventsRequestInfo'}, - } - - def __init__(self, **kwargs): - super(EventsRequestResult, self).__init__(**kwargs) - self.request = kwargs.get('request', None) - self.type = 'request' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_result_py3.py deleted file mode 100644 index 1f6041d37ab..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_request_result_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsRequestResult(EventsResultData): - """A request result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param request: - :type request: ~azure.applicationinsights.models.EventsRequestInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'request': {'key': 'request', 'type': 'EventsRequestInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, request=None, **kwargs) -> None: - super(EventsRequestResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.request = request - self.type = 'request' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result.py deleted file mode 100644 index 4700fc59886..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResult(Model): - """An event query result. - - :param aimessages: OData messages for this response. - :type aimessages: list[~azure.applicationinsights.models.ErrorInfo] - :param value: - :type value: ~azure.applicationinsights.models.EventsResultData - """ - - _attribute_map = { - 'aimessages': {'key': '@ai\\.messages', 'type': '[ErrorInfo]'}, - 'value': {'key': 'value', 'type': 'EventsResultData'}, - } - - def __init__(self, **kwargs): - super(EventsResult, self).__init__(**kwargs) - self.aimessages = kwargs.get('aimessages', None) - self.value = kwargs.get('value', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data.py deleted file mode 100644 index 97d6cfb2207..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResultData(Model): - """Events query result data. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: EventsTraceResult, EventsCustomEventResult, - EventsPageViewResult, EventsBrowserTimingResult, EventsRequestResult, - EventsDependencyResult, EventsExceptionResult, - EventsAvailabilityResultResult, EventsPerformanceCounterResult, - EventsCustomMetricResult - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'trace': 'EventsTraceResult', 'customEvent': 'EventsCustomEventResult', 'pageView': 'EventsPageViewResult', 'browserTiming': 'EventsBrowserTimingResult', 'request': 'EventsRequestResult', 'dependency': 'EventsDependencyResult', 'exception': 'EventsExceptionResult', 'availabilityResult': 'EventsAvailabilityResultResult', 'performanceCounter': 'EventsPerformanceCounterResult', 'customMetric': 'EventsCustomMetricResult'} - } - - def __init__(self, **kwargs): - super(EventsResultData, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.count = kwargs.get('count', None) - self.timestamp = kwargs.get('timestamp', None) - self.custom_dimensions = kwargs.get('custom_dimensions', None) - self.custom_measurements = kwargs.get('custom_measurements', None) - self.operation = kwargs.get('operation', None) - self.session = kwargs.get('session', None) - self.user = kwargs.get('user', None) - self.cloud = kwargs.get('cloud', None) - self.ai = kwargs.get('ai', None) - self.application = kwargs.get('application', None) - self.client = kwargs.get('client', None) - self.type = None diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_dimensions.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_dimensions.py deleted file mode 100644 index 2f50c8baeb6..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_dimensions.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResultDataCustomDimensions(Model): - """Custom dimensions of the event. - - :param additional_properties: - :type additional_properties: object - """ - - _attribute_map = { - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(EventsResultDataCustomDimensions, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_dimensions_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_dimensions_py3.py deleted file mode 100644 index 968ac0eb0ab..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_dimensions_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResultDataCustomDimensions(Model): - """Custom dimensions of the event. - - :param additional_properties: - :type additional_properties: object - """ - - _attribute_map = { - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(EventsResultDataCustomDimensions, self).__init__(**kwargs) - self.additional_properties = additional_properties diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_measurements.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_measurements.py deleted file mode 100644 index 907b52e1f5e..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_measurements.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResultDataCustomMeasurements(Model): - """Custom measurements of the event. - - :param additional_properties: - :type additional_properties: object - """ - - _attribute_map = { - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - } - - def __init__(self, **kwargs): - super(EventsResultDataCustomMeasurements, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_measurements_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_measurements_py3.py deleted file mode 100644 index 018286f9659..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_custom_measurements_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResultDataCustomMeasurements(Model): - """Custom measurements of the event. - - :param additional_properties: - :type additional_properties: object - """ - - _attribute_map = { - 'additional_properties': {'key': 'additionalProperties', 'type': 'object'}, - } - - def __init__(self, *, additional_properties=None, **kwargs) -> None: - super(EventsResultDataCustomMeasurements, self).__init__(**kwargs) - self.additional_properties = additional_properties diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_py3.py deleted file mode 100644 index dd76e288e5d..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_data_py3.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResultData(Model): - """Events query result data. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: EventsTraceResult, EventsCustomEventResult, - EventsPageViewResult, EventsBrowserTimingResult, EventsRequestResult, - EventsDependencyResult, EventsExceptionResult, - EventsAvailabilityResultResult, EventsPerformanceCounterResult, - EventsCustomMetricResult - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - _subtype_map = { - 'type': {'trace': 'EventsTraceResult', 'customEvent': 'EventsCustomEventResult', 'pageView': 'EventsPageViewResult', 'browserTiming': 'EventsBrowserTimingResult', 'request': 'EventsRequestResult', 'dependency': 'EventsDependencyResult', 'exception': 'EventsExceptionResult', 'availabilityResult': 'EventsAvailabilityResultResult', 'performanceCounter': 'EventsPerformanceCounterResult', 'customMetric': 'EventsCustomMetricResult'} - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, **kwargs) -> None: - super(EventsResultData, self).__init__(**kwargs) - self.id = id - self.count = count - self.timestamp = timestamp - self.custom_dimensions = custom_dimensions - self.custom_measurements = custom_measurements - self.operation = operation - self.session = session - self.user = user - self.cloud = cloud - self.ai = ai - self.application = application - self.client = client - self.type = None diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_py3.py deleted file mode 100644 index 3c66e4efaf2..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_result_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResult(Model): - """An event query result. - - :param aimessages: OData messages for this response. - :type aimessages: list[~azure.applicationinsights.models.ErrorInfo] - :param value: - :type value: ~azure.applicationinsights.models.EventsResultData - """ - - _attribute_map = { - 'aimessages': {'key': '@ai\\.messages', 'type': '[ErrorInfo]'}, - 'value': {'key': 'value', 'type': 'EventsResultData'}, - } - - def __init__(self, *, aimessages=None, value=None, **kwargs) -> None: - super(EventsResult, self).__init__(**kwargs) - self.aimessages = aimessages - self.value = value diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_results.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_results.py deleted file mode 100644 index cc066b4b9d3..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResults(Model): - """An events query result. - - :param odatacontext: OData context metadata endpoint for this response - :type odatacontext: str - :param aimessages: OData messages for this response. - :type aimessages: list[~azure.applicationinsights.models.ErrorInfo] - :param value: Contents of the events query result. - :type value: list[~azure.applicationinsights.models.EventsResultData] - """ - - _attribute_map = { - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'aimessages': {'key': '@ai\\.messages', 'type': '[ErrorInfo]'}, - 'value': {'key': 'value', 'type': '[EventsResultData]'}, - } - - def __init__(self, **kwargs): - super(EventsResults, self).__init__(**kwargs) - self.odatacontext = kwargs.get('odatacontext', None) - self.aimessages = kwargs.get('aimessages', None) - self.value = kwargs.get('value', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_results_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_results_py3.py deleted file mode 100644 index 97e9c80082c..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsResults(Model): - """An events query result. - - :param odatacontext: OData context metadata endpoint for this response - :type odatacontext: str - :param aimessages: OData messages for this response. - :type aimessages: list[~azure.applicationinsights.models.ErrorInfo] - :param value: Contents of the events query result. - :type value: list[~azure.applicationinsights.models.EventsResultData] - """ - - _attribute_map = { - 'odatacontext': {'key': '@odata\\.context', 'type': 'str'}, - 'aimessages': {'key': '@ai\\.messages', 'type': '[ErrorInfo]'}, - 'value': {'key': 'value', 'type': '[EventsResultData]'}, - } - - def __init__(self, *, odatacontext: str=None, aimessages=None, value=None, **kwargs) -> None: - super(EventsResults, self).__init__(**kwargs) - self.odatacontext = odatacontext - self.aimessages = aimessages - self.value = value diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_session_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_session_info.py deleted file mode 100644 index 9d407776253..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_session_info.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsSessionInfo(Model): - """Session info for an event result. - - :param id: ID of the session - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsSessionInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_session_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_session_info_py3.py deleted file mode 100644 index 92a81d9668d..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_session_info_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsSessionInfo(Model): - """Session info for an event result. - - :param id: ID of the session - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, **kwargs) -> None: - super(EventsSessionInfo, self).__init__(**kwargs) - self.id = id diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_info.py deleted file mode 100644 index 9eff63baf55..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsTraceInfo(Model): - """The trace information. - - :param message: The trace message - :type message: str - :param severity_level: The trace severity level - :type severity_level: int - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'severity_level': {'key': 'severityLevel', 'type': 'int'}, - } - - def __init__(self, **kwargs): - super(EventsTraceInfo, self).__init__(**kwargs) - self.message = kwargs.get('message', None) - self.severity_level = kwargs.get('severity_level', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_info_py3.py deleted file mode 100644 index 88956ebe154..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_info_py3.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsTraceInfo(Model): - """The trace information. - - :param message: The trace message - :type message: str - :param severity_level: The trace severity level - :type severity_level: int - """ - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - 'severity_level': {'key': 'severityLevel', 'type': 'int'}, - } - - def __init__(self, *, message: str=None, severity_level: int=None, **kwargs) -> None: - super(EventsTraceInfo, self).__init__(**kwargs) - self.message = message - self.severity_level = severity_level diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result.py deleted file mode 100644 index f71782577c5..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data import EventsResultData - - -class EventsTraceResult(EventsResultData): - """A trace result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param trace: - :type trace: ~azure.applicationinsights.models.EventsTraceInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'trace': {'key': 'trace', 'type': 'EventsTraceInfo'}, - } - - def __init__(self, **kwargs): - super(EventsTraceResult, self).__init__(**kwargs) - self.trace = kwargs.get('trace', None) - self.type = 'trace' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result_py3.py deleted file mode 100644 index d322f2e104b..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_trace_result_py3.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .events_result_data_py3 import EventsResultData - - -class EventsTraceResult(EventsResultData): - """A trace result. - - All required parameters must be populated in order to send to Azure. - - :param id: The unique ID for this event. - :type id: str - :param count: Count of the event - :type count: long - :param timestamp: Timestamp of the event - :type timestamp: datetime - :param custom_dimensions: Custom dimensions of the event - :type custom_dimensions: - ~azure.applicationinsights.models.EventsResultDataCustomDimensions - :param custom_measurements: Custom measurements of the event - :type custom_measurements: - ~azure.applicationinsights.models.EventsResultDataCustomMeasurements - :param operation: Operation info of the event - :type operation: ~azure.applicationinsights.models.EventsOperationInfo - :param session: Session info of the event - :type session: ~azure.applicationinsights.models.EventsSessionInfo - :param user: User info of the event - :type user: ~azure.applicationinsights.models.EventsUserInfo - :param cloud: Cloud info of the event - :type cloud: ~azure.applicationinsights.models.EventsCloudInfo - :param ai: AI info of the event - :type ai: ~azure.applicationinsights.models.EventsAiInfo - :param application: Application info of the event - :type application: ~azure.applicationinsights.models.EventsApplicationInfo - :param client: Client info of the event - :type client: ~azure.applicationinsights.models.EventsClientInfo - :param type: Required. Constant filled by server. - :type type: str - :param trace: - :type trace: ~azure.applicationinsights.models.EventsTraceInfo - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'count': {'key': 'count', 'type': 'long'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'custom_dimensions': {'key': 'customDimensions', 'type': 'EventsResultDataCustomDimensions'}, - 'custom_measurements': {'key': 'customMeasurements', 'type': 'EventsResultDataCustomMeasurements'}, - 'operation': {'key': 'operation', 'type': 'EventsOperationInfo'}, - 'session': {'key': 'session', 'type': 'EventsSessionInfo'}, - 'user': {'key': 'user', 'type': 'EventsUserInfo'}, - 'cloud': {'key': 'cloud', 'type': 'EventsCloudInfo'}, - 'ai': {'key': 'ai', 'type': 'EventsAiInfo'}, - 'application': {'key': 'application', 'type': 'EventsApplicationInfo'}, - 'client': {'key': 'client', 'type': 'EventsClientInfo'}, - 'type': {'key': 'type', 'type': 'str'}, - 'trace': {'key': 'trace', 'type': 'EventsTraceInfo'}, - } - - def __init__(self, *, id: str=None, count: int=None, timestamp=None, custom_dimensions=None, custom_measurements=None, operation=None, session=None, user=None, cloud=None, ai=None, application=None, client=None, trace=None, **kwargs) -> None: - super(EventsTraceResult, self).__init__(id=id, count=count, timestamp=timestamp, custom_dimensions=custom_dimensions, custom_measurements=custom_measurements, operation=operation, session=session, user=user, cloud=cloud, ai=ai, application=application, client=client, **kwargs) - self.trace = trace - self.type = 'trace' diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_user_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_user_info.py deleted file mode 100644 index a5753b1a30f..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_user_info.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsUserInfo(Model): - """User info for an event result. - - :param id: ID of the user - :type id: str - :param account_id: Account ID of the user - :type account_id: str - :param authenticated_id: Authenticated ID of the user - :type authenticated_id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'account_id': {'key': 'accountId', 'type': 'str'}, - 'authenticated_id': {'key': 'authenticatedId', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(EventsUserInfo, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.account_id = kwargs.get('account_id', None) - self.authenticated_id = kwargs.get('authenticated_id', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_user_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_user_info_py3.py deleted file mode 100644 index 910dbb4c3b3..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/events_user_info_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class EventsUserInfo(Model): - """User info for an event result. - - :param id: ID of the user - :type id: str - :param account_id: Account ID of the user - :type account_id: str - :param authenticated_id: Authenticated ID of the user - :type authenticated_id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'account_id': {'key': 'accountId', 'type': 'str'}, - 'authenticated_id': {'key': 'authenticatedId', 'type': 'str'}, - } - - def __init__(self, *, id: str=None, account_id: str=None, authenticated_id: str=None, **kwargs) -> None: - super(EventsUserInfo, self).__init__(**kwargs) - self.id = id - self.account_id = account_id - self.authenticated_id = authenticated_id diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema.py deleted file mode 100644 index cacd7e4b3f1..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsPostBodySchema(Model): - """A metric request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. An identifier for this query. Must be unique within - the post body of the request. This identifier will be the 'id' property - of the response object representing this query. - :type id: str - :param parameters: Required. The parameters for a single metrics query - :type parameters: - ~azure.applicationinsights.models.MetricsPostBodySchemaParameters - """ - - _validation = { - 'id': {'required': True}, - 'parameters': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'MetricsPostBodySchemaParameters'}, - } - - def __init__(self, **kwargs): - super(MetricsPostBodySchema, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.parameters = kwargs.get('parameters', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_parameters.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_parameters.py deleted file mode 100644 index 79965b86de8..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_parameters.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsPostBodySchemaParameters(Model): - """The parameters for a single metrics query. - - All required parameters must be populated in order to send to Azure. - - :param metric_id: Required. Possible values include: 'requests/count', - 'requests/duration', 'requests/failed', 'users/count', - 'users/authenticated', 'pageViews/count', 'pageViews/duration', - 'client/processingDuration', 'client/receiveDuration', - 'client/networkDuration', 'client/sendDuration', 'client/totalDuration', - 'dependencies/count', 'dependencies/failed', 'dependencies/duration', - 'exceptions/count', 'exceptions/browser', 'exceptions/server', - 'sessions/count', 'performanceCounters/requestExecutionTime', - 'performanceCounters/requestsPerSecond', - 'performanceCounters/requestsInQueue', - 'performanceCounters/memoryAvailableBytes', - 'performanceCounters/exceptionsPerSecond', - 'performanceCounters/processCpuPercentage', - 'performanceCounters/processIOBytesPerSecond', - 'performanceCounters/processPrivateBytes', - 'performanceCounters/processorCpuPercentage', - 'availabilityResults/availabilityPercentage', - 'availabilityResults/duration', 'billing/telemetryCount', - 'customEvents/count' - :type metric_id: str or ~azure.applicationinsights.models.MetricId - :param timespan: - :type timespan: str - :param aggregation: - :type aggregation: list[str or - ~azure.applicationinsights.models.MetricsAggregation] - :param interval: - :type interval: timedelta - :param segment: - :type segment: list[str or - ~azure.applicationinsights.models.MetricsSegment] - :param top: - :type top: int - :param orderby: - :type orderby: str - :param filter: - :type filter: str - """ - - _validation = { - 'metric_id': {'required': True}, - } - - _attribute_map = { - 'metric_id': {'key': 'metricId', 'type': 'str'}, - 'timespan': {'key': 'timespan', 'type': 'str'}, - 'aggregation': {'key': 'aggregation', 'type': '[MetricsAggregation]'}, - 'interval': {'key': 'interval', 'type': 'duration'}, - 'segment': {'key': 'segment', 'type': '[str]'}, - 'top': {'key': 'top', 'type': 'int'}, - 'orderby': {'key': 'orderby', 'type': 'str'}, - 'filter': {'key': 'filter', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(MetricsPostBodySchemaParameters, self).__init__(**kwargs) - self.metric_id = kwargs.get('metric_id', None) - self.timespan = kwargs.get('timespan', None) - self.aggregation = kwargs.get('aggregation', None) - self.interval = kwargs.get('interval', None) - self.segment = kwargs.get('segment', None) - self.top = kwargs.get('top', None) - self.orderby = kwargs.get('orderby', None) - self.filter = kwargs.get('filter', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_parameters_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_parameters_py3.py deleted file mode 100644 index 1643e880ee2..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_parameters_py3.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsPostBodySchemaParameters(Model): - """The parameters for a single metrics query. - - All required parameters must be populated in order to send to Azure. - - :param metric_id: Required. Possible values include: 'requests/count', - 'requests/duration', 'requests/failed', 'users/count', - 'users/authenticated', 'pageViews/count', 'pageViews/duration', - 'client/processingDuration', 'client/receiveDuration', - 'client/networkDuration', 'client/sendDuration', 'client/totalDuration', - 'dependencies/count', 'dependencies/failed', 'dependencies/duration', - 'exceptions/count', 'exceptions/browser', 'exceptions/server', - 'sessions/count', 'performanceCounters/requestExecutionTime', - 'performanceCounters/requestsPerSecond', - 'performanceCounters/requestsInQueue', - 'performanceCounters/memoryAvailableBytes', - 'performanceCounters/exceptionsPerSecond', - 'performanceCounters/processCpuPercentage', - 'performanceCounters/processIOBytesPerSecond', - 'performanceCounters/processPrivateBytes', - 'performanceCounters/processorCpuPercentage', - 'availabilityResults/availabilityPercentage', - 'availabilityResults/duration', 'billing/telemetryCount', - 'customEvents/count' - :type metric_id: str or ~azure.applicationinsights.models.MetricId - :param timespan: - :type timespan: str - :param aggregation: - :type aggregation: list[str or - ~azure.applicationinsights.models.MetricsAggregation] - :param interval: - :type interval: timedelta - :param segment: - :type segment: list[str or - ~azure.applicationinsights.models.MetricsSegment] - :param top: - :type top: int - :param orderby: - :type orderby: str - :param filter: - :type filter: str - """ - - _validation = { - 'metric_id': {'required': True}, - } - - _attribute_map = { - 'metric_id': {'key': 'metricId', 'type': 'str'}, - 'timespan': {'key': 'timespan', 'type': 'str'}, - 'aggregation': {'key': 'aggregation', 'type': '[MetricsAggregation]'}, - 'interval': {'key': 'interval', 'type': 'duration'}, - 'segment': {'key': 'segment', 'type': '[str]'}, - 'top': {'key': 'top', 'type': 'int'}, - 'orderby': {'key': 'orderby', 'type': 'str'}, - 'filter': {'key': 'filter', 'type': 'str'}, - } - - def __init__(self, *, metric_id, timespan: str=None, aggregation=None, interval=None, segment=None, top: int=None, orderby: str=None, filter: str=None, **kwargs) -> None: - super(MetricsPostBodySchemaParameters, self).__init__(**kwargs) - self.metric_id = metric_id - self.timespan = timespan - self.aggregation = aggregation - self.interval = interval - self.segment = segment - self.top = top - self.orderby = orderby - self.filter = filter diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_py3.py deleted file mode 100644 index 971b301e1c9..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_post_body_schema_py3.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsPostBodySchema(Model): - """A metric request. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. An identifier for this query. Must be unique within - the post body of the request. This identifier will be the 'id' property - of the response object representing this query. - :type id: str - :param parameters: Required. The parameters for a single metrics query - :type parameters: - ~azure.applicationinsights.models.MetricsPostBodySchemaParameters - """ - - _validation = { - 'id': {'required': True}, - 'parameters': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'parameters': {'key': 'parameters', 'type': 'MetricsPostBodySchemaParameters'}, - } - - def __init__(self, *, id: str, parameters, **kwargs) -> None: - super(MetricsPostBodySchema, self).__init__(**kwargs) - self.id = id - self.parameters = parameters diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result.py deleted file mode 100644 index 9f7ba4cb04d..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsResult(Model): - """A metric result. - - :param value: - :type value: ~azure.applicationinsights.models.MetricsResultInfo - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'MetricsResultInfo'}, - } - - def __init__(self, **kwargs): - super(MetricsResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_info.py deleted file mode 100644 index 62cb4694098..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_info.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsResultInfo(Model): - """A metric result data. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param start: Start time of the metric. - :type start: datetime - :param end: Start time of the metric. - :type end: datetime - :param interval: The interval used to segment the metric data. - :type interval: timedelta - :param segments: Segmented metric data (if segmented). - :type segments: list[~azure.applicationinsights.models.MetricsSegmentInfo] - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - 'interval': {'key': 'interval', 'type': 'duration'}, - 'segments': {'key': 'segments', 'type': '[MetricsSegmentInfo]'}, - } - - def __init__(self, **kwargs): - super(MetricsResultInfo, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) - self.interval = kwargs.get('interval', None) - self.segments = kwargs.get('segments', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_info_py3.py deleted file mode 100644 index 816274f7d80..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_info_py3.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsResultInfo(Model): - """A metric result data. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param start: Start time of the metric. - :type start: datetime - :param end: Start time of the metric. - :type end: datetime - :param interval: The interval used to segment the metric data. - :type interval: timedelta - :param segments: Segmented metric data (if segmented). - :type segments: list[~azure.applicationinsights.models.MetricsSegmentInfo] - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - 'interval': {'key': 'interval', 'type': 'duration'}, - 'segments': {'key': 'segments', 'type': '[MetricsSegmentInfo]'}, - } - - def __init__(self, *, additional_properties=None, start=None, end=None, interval=None, segments=None, **kwargs) -> None: - super(MetricsResultInfo, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.start = start - self.end = end - self.interval = interval - self.segments = segments diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_py3.py deleted file mode 100644 index eb4095d987b..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_result_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsResult(Model): - """A metric result. - - :param value: - :type value: ~azure.applicationinsights.models.MetricsResultInfo - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'MetricsResultInfo'}, - } - - def __init__(self, *, value=None, **kwargs) -> None: - super(MetricsResult, self).__init__(**kwargs) - self.value = value diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_results_item.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_results_item.py deleted file mode 100644 index 41d35935140..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_results_item.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsResultsItem(Model): - """MetricsResultsItem. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The specified ID for this metric. - :type id: str - :param status: Required. The HTTP status code of this metric query. - :type status: int - :param body: Required. The results of this metric query. - :type body: ~azure.applicationinsights.models.MetricsResult - """ - - _validation = { - 'id': {'required': True}, - 'status': {'required': True}, - 'body': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'int'}, - 'body': {'key': 'body', 'type': 'MetricsResult'}, - } - - def __init__(self, **kwargs): - super(MetricsResultsItem, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.status = kwargs.get('status', None) - self.body = kwargs.get('body', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_results_item_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_results_item_py3.py deleted file mode 100644 index f5c31190777..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_results_item_py3.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsResultsItem(Model): - """MetricsResultsItem. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The specified ID for this metric. - :type id: str - :param status: Required. The HTTP status code of this metric query. - :type status: int - :param body: Required. The results of this metric query. - :type body: ~azure.applicationinsights.models.MetricsResult - """ - - _validation = { - 'id': {'required': True}, - 'status': {'required': True}, - 'body': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'int'}, - 'body': {'key': 'body', 'type': 'MetricsResult'}, - } - - def __init__(self, *, id: str, status: int, body, **kwargs) -> None: - super(MetricsResultsItem, self).__init__(**kwargs) - self.id = id - self.status = status - self.body = body diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_segment_info.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_segment_info.py deleted file mode 100644 index 2b59be2e86d..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_segment_info.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsSegmentInfo(Model): - """A metric segment. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param start: Start time of the metric segment (only when an interval was - specified). - :type start: datetime - :param end: Start time of the metric segment (only when an interval was - specified). - :type end: datetime - :param segments: Segmented metric data (if further segmented). - :type segments: list[~azure.applicationinsights.models.MetricsSegmentInfo] - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - 'segments': {'key': 'segments', 'type': '[MetricsSegmentInfo]'}, - } - - def __init__(self, **kwargs): - super(MetricsSegmentInfo, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.start = kwargs.get('start', None) - self.end = kwargs.get('end', None) - self.segments = kwargs.get('segments', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_segment_info_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_segment_info_py3.py deleted file mode 100644 index c9b91967b63..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/metrics_segment_info_py3.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class MetricsSegmentInfo(Model): - """A metric segment. - - :param additional_properties: Unmatched properties from the message are - deserialized this collection - :type additional_properties: dict[str, object] - :param start: Start time of the metric segment (only when an interval was - specified). - :type start: datetime - :param end: Start time of the metric segment (only when an interval was - specified). - :type end: datetime - :param segments: Segmented metric data (if further segmented). - :type segments: list[~azure.applicationinsights.models.MetricsSegmentInfo] - """ - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'start': {'key': 'start', 'type': 'iso-8601'}, - 'end': {'key': 'end', 'type': 'iso-8601'}, - 'segments': {'key': 'segments', 'type': '[MetricsSegmentInfo]'}, - } - - def __init__(self, *, additional_properties=None, start=None, end=None, segments=None, **kwargs) -> None: - super(MetricsSegmentInfo, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.start = start - self.end = end - self.segments = segments diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_body.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_body.py deleted file mode 100644 index 7c140d71d81..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_body.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryBody(Model): - """The Analytics query. Learn more about the [Analytics query - syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - - All required parameters must be populated in order to send to Azure. - - :param query: Required. The query to execute. - :type query: str - :param timespan: Optional. The timespan over which to query data. This is - an ISO8601 time period value. This timespan is applied in addition to any - that are specified in the query expression. - :type timespan: str - :param applications: A list of Application IDs for cross-application - queries. - :type applications: list[str] - """ - - _validation = { - 'query': {'required': True}, - } - - _attribute_map = { - 'query': {'key': 'query', 'type': 'str'}, - 'timespan': {'key': 'timespan', 'type': 'str'}, - 'applications': {'key': 'applications', 'type': '[str]'}, - } - - def __init__(self, **kwargs): - super(QueryBody, self).__init__(**kwargs) - self.query = kwargs.get('query', None) - self.timespan = kwargs.get('timespan', None) - self.applications = kwargs.get('applications', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_body_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_body_py3.py deleted file mode 100644 index 4e718edc98a..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_body_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryBody(Model): - """The Analytics query. Learn more about the [Analytics query - syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/). - - All required parameters must be populated in order to send to Azure. - - :param query: Required. The query to execute. - :type query: str - :param timespan: Optional. The timespan over which to query data. This is - an ISO8601 time period value. This timespan is applied in addition to any - that are specified in the query expression. - :type timespan: str - :param applications: A list of Application IDs for cross-application - queries. - :type applications: list[str] - """ - - _validation = { - 'query': {'required': True}, - } - - _attribute_map = { - 'query': {'key': 'query', 'type': 'str'}, - 'timespan': {'key': 'timespan', 'type': 'str'}, - 'applications': {'key': 'applications', 'type': '[str]'}, - } - - def __init__(self, *, query: str, timespan: str=None, applications=None, **kwargs) -> None: - super(QueryBody, self).__init__(**kwargs) - self.query = query - self.timespan = timespan - self.applications = applications diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_results.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_results.py deleted file mode 100644 index cd70e17383b..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_results.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryResults(Model): - """A query response. - - Contains the tables, columns & rows resulting from a query. - - All required parameters must be populated in order to send to Azure. - - :param tables: Required. The list of tables, columns and rows. - :type tables: list[~azure.applicationinsights.models.Table] - """ - - _validation = { - 'tables': {'required': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[Table]'}, - } - - def __init__(self, **kwargs): - super(QueryResults, self).__init__(**kwargs) - self.tables = kwargs.get('tables', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_results_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_results_py3.py deleted file mode 100644 index a1ff010ef1d..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/query_results_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class QueryResults(Model): - """A query response. - - Contains the tables, columns & rows resulting from a query. - - All required parameters must be populated in order to send to Azure. - - :param tables: Required. The list of tables, columns and rows. - :type tables: list[~azure.applicationinsights.models.Table] - """ - - _validation = { - 'tables': {'required': True}, - } - - _attribute_map = { - 'tables': {'key': 'tables', 'type': '[Table]'}, - } - - def __init__(self, *, tables, **kwargs) -> None: - super(QueryResults, self).__init__(**kwargs) - self.tables = tables diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/table.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/table.py deleted file mode 100644 index 8acce07b8fa..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/table.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Table(Model): - """A query response table. - - Contains the columns and rows for one table in a query response. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the table. - :type name: str - :param columns: Required. The list of columns in this table. - :type columns: list[~azure.applicationinsights.models.Column] - :param rows: Required. The resulting rows from this query. - :type rows: list[list[object]] - """ - - _validation = { - 'name': {'required': True}, - 'columns': {'required': True}, - 'rows': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'columns': {'key': 'columns', 'type': '[Column]'}, - 'rows': {'key': 'rows', 'type': '[[object]]'}, - } - - def __init__(self, **kwargs): - super(Table, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.columns = kwargs.get('columns', None) - self.rows = kwargs.get('rows', None) diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/table_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/table_py3.py deleted file mode 100644 index b6e86d86036..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/models/table_py3.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.serialization import Model - - -class Table(Model): - """A query response table. - - Contains the columns and rows for one table in a query response. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the table. - :type name: str - :param columns: Required. The list of columns in this table. - :type columns: list[~azure.applicationinsights.models.Column] - :param rows: Required. The resulting rows from this query. - :type rows: list[list[object]] - """ - - _validation = { - 'name': {'required': True}, - 'columns': {'required': True}, - 'rows': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'columns': {'key': 'columns', 'type': '[Column]'}, - 'rows': {'key': 'rows', 'type': '[[object]]'}, - } - - def __init__(self, *, name: str, columns, rows, **kwargs) -> None: - super(Table, self).__init__(**kwargs) - self.name = name - self.columns = columns - self.rows = rows diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/__init__.py deleted file mode 100644 index f7125d05cb0..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from .metrics_operations import MetricsOperations -from .events_operations import EventsOperations -from .query_operations import QueryOperations - -__all__ = [ - 'MetricsOperations', - 'EventsOperations', - 'QueryOperations', -] diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/events_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/events_operations.py deleted file mode 100644 index 08a70504d33..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/events_operations.py +++ /dev/null @@ -1,271 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class EventsOperations(object): - """EventsOperations 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. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def get_by_type( - self, app_id, event_type, timespan=None, filter=None, search=None, orderby=None, select=None, skip=None, top=None, format=None, count=None, apply=None, custom_headers=None, raw=False, **operation_config): - """Execute OData query. - - Executes an OData query for events. - - :param app_id: ID of the application. This is Application ID from the - API Access settings blade in the Azure portal. - :type app_id: str - :param event_type: The type of events to query; either a standard - event type (`traces`, `customEvents`, `pageViews`, `requests`, - `dependencies`, `exceptions`, `availabilityResults`) or `$all` to - query across all event types. Possible values include: '$all', - 'traces', 'customEvents', 'pageViews', 'browserTimings', 'requests', - 'dependencies', 'exceptions', 'availabilityResults', - 'performanceCounters', 'customMetrics' - :type event_type: str or ~azure.applicationinsights.models.EventType - :param timespan: Optional. The timespan over which to retrieve events. - This is an ISO8601 time period value. This timespan is applied in - addition to any that are specified in the Odata expression. - :type timespan: str - :param filter: An expression used to filter the returned events - :type filter: str - :param search: A free-text search expression to match for whether a - particular event should be returned - :type search: str - :param orderby: A comma-separated list of properties with \\"asc\\" - (the default) or \\"desc\\" to control the order of returned events - :type orderby: str - :param select: Limits the properties to just those requested on each - returned event - :type select: str - :param skip: The number of items to skip over before returning events - :type skip: int - :param top: The number of events to return - :type top: int - :param format: Format for the returned events - :type format: str - :param count: Request a count of matching items included with the - returned events - :type count: bool - :param apply: An expression used for aggregation over returned events - :type apply: 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: EventsResults or ClientRawResponse if raw=true - :rtype: ~azure.applicationinsights.models.EventsResults or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_by_type.metadata['url'] - path_format_arguments = { - 'appId': self._serialize.url("app_id", app_id, 'str'), - 'eventType': self._serialize.url("event_type", event_type, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if timespan is not None: - query_parameters['timespan'] = self._serialize.query("timespan", timespan, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if search is not None: - query_parameters['$search'] = self._serialize.query("search", search, 'str') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') - if select is not None: - query_parameters['$select'] = self._serialize.query("select", select, 'str') - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - if format is not None: - query_parameters['$format'] = self._serialize.query("format", format, 'str') - if count is not None: - query_parameters['$count'] = self._serialize.query("count", count, 'bool') - if apply is not None: - query_parameters['$apply'] = self._serialize.query("apply", apply, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('EventsResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_type.metadata = {'url': '/apps/{appId}/events/{eventType}'} - - def get( - self, app_id, event_type, event_id, timespan=None, custom_headers=None, raw=False, **operation_config): - """Get an event. - - Gets the data for a single event. - - :param app_id: ID of the application. This is Application ID from the - API Access settings blade in the Azure portal. - :type app_id: str - :param event_type: The type of events to query; either a standard - event type (`traces`, `customEvents`, `pageViews`, `requests`, - `dependencies`, `exceptions`, `availabilityResults`) or `$all` to - query across all event types. Possible values include: '$all', - 'traces', 'customEvents', 'pageViews', 'browserTimings', 'requests', - 'dependencies', 'exceptions', 'availabilityResults', - 'performanceCounters', 'customMetrics' - :type event_type: str or ~azure.applicationinsights.models.EventType - :param event_id: ID of event. - :type event_id: str - :param timespan: Optional. The timespan over which to retrieve events. - This is an ISO8601 time period value. This timespan is applied in - addition to any that are specified in the Odata expression. - :type timespan: 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: EventsResults or ClientRawResponse if raw=true - :rtype: ~azure.applicationinsights.models.EventsResults or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'appId': self._serialize.url("app_id", app_id, 'str'), - 'eventType': self._serialize.url("event_type", event_type, 'str'), - 'eventId': self._serialize.url("event_id", event_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if timespan is not None: - query_parameters['timespan'] = self._serialize.query("timespan", timespan, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('EventsResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/apps/{appId}/events/{eventType}/{eventId}'} - - def get_odata_metadata( - self, app_id, custom_headers=None, raw=False, **operation_config): - """Get OData metadata. - - Gets OData EDMX metadata describing the event data model. - - :param app_id: ID of the application. This is Application ID from the - API Access settings blade in the Azure portal. - :type app_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: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_odata_metadata.metadata['url'] - path_format_arguments = { - 'appId': self._serialize.url("app_id", app_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/xml;charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_odata_metadata.metadata = {'url': '/apps/{appId}/events/$metadata'} diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/metrics_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/metrics_operations.py deleted file mode 100644 index 82a011e0601..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/metrics_operations.py +++ /dev/null @@ -1,280 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class MetricsOperations(object): - """MetricsOperations 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. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def get( - self, app_id, metric_id, timespan=None, interval=None, aggregation=None, segment=None, top=None, orderby=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Retrieve metric data. - - Gets metric values for a single metric. - - :param app_id: ID of the application. This is Application ID from the - API Access settings blade in the Azure portal. - :type app_id: str - :param metric_id: ID of the metric. This is either a standard AI - metric, or an application-specific custom metric. Possible values - include: 'requests/count', 'requests/duration', 'requests/failed', - 'users/count', 'users/authenticated', 'pageViews/count', - 'pageViews/duration', 'client/processingDuration', - 'client/receiveDuration', 'client/networkDuration', - 'client/sendDuration', 'client/totalDuration', 'dependencies/count', - 'dependencies/failed', 'dependencies/duration', 'exceptions/count', - 'exceptions/browser', 'exceptions/server', 'sessions/count', - 'performanceCounters/requestExecutionTime', - 'performanceCounters/requestsPerSecond', - 'performanceCounters/requestsInQueue', - 'performanceCounters/memoryAvailableBytes', - 'performanceCounters/exceptionsPerSecond', - 'performanceCounters/processCpuPercentage', - 'performanceCounters/processIOBytesPerSecond', - 'performanceCounters/processPrivateBytes', - 'performanceCounters/processorCpuPercentage', - 'availabilityResults/availabilityPercentage', - 'availabilityResults/duration', 'billing/telemetryCount', - 'customEvents/count' - :type metric_id: str or ~azure.applicationinsights.models.MetricId - :param timespan: The timespan over which to retrieve metric values. - This is an ISO8601 time period value. If timespan is omitted, a - default time range of `PT12H` ("last 12 hours") is used. The actual - timespan that is queried may be adjusted by the server based. In all - cases, the actual time span used for the query is included in the - response. - :type timespan: str - :param interval: The time interval to use when retrieving metric - values. This is an ISO8601 duration. If interval is omitted, the - metric value is aggregated across the entire timespan. If interval is - supplied, the server may adjust the interval to a more appropriate - size based on the timespan used for the query. In all cases, the - actual interval used for the query is included in the response. - :type interval: timedelta - :param aggregation: The aggregation to use when computing the metric - values. To retrieve more than one aggregation at a time, separate them - with a comma. If no aggregation is specified, then the default - aggregation for the metric is used. - :type aggregation: list[str or - ~azure.applicationinsights.models.MetricsAggregation] - :param segment: The name of the dimension to segment the metric values - by. This dimension must be applicable to the metric you are - retrieving. To segment by more than one dimension at a time, separate - them with a comma (,). In this case, the metric data will be segmented - in the order the dimensions are listed in the parameter. - :type segment: list[str or - ~azure.applicationinsights.models.MetricsSegment] - :param top: The number of segments to return. This value is only - valid when segment is specified. - :type top: int - :param orderby: The aggregation function and direction to sort the - segments by. This value is only valid when segment is specified. - :type orderby: str - :param filter: An expression used to filter the results. This value - should be a valid OData filter expression where the keys of each - clause should be applicable dimensions for the metric you are - retrieving. - :type filter: 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: MetricsResult or ClientRawResponse if raw=true - :rtype: ~azure.applicationinsights.models.MetricsResult or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get.metadata['url'] - path_format_arguments = { - 'appId': self._serialize.url("app_id", app_id, 'str'), - 'metricId': self._serialize.url("metric_id", metric_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if timespan is not None: - query_parameters['timespan'] = self._serialize.query("timespan", timespan, 'str') - if interval is not None: - query_parameters['interval'] = self._serialize.query("interval", interval, 'duration') - if aggregation is not None: - query_parameters['aggregation'] = self._serialize.query("aggregation", aggregation, '[MetricsAggregation]', div=',', min_items=1) - if segment is not None: - query_parameters['segment'] = self._serialize.query("segment", segment, '[str]', div=',', min_items=1) - if top is not None: - query_parameters['top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['orderby'] = self._serialize.query("orderby", orderby, 'str') - if filter is not None: - query_parameters['filter'] = self._serialize.query("filter", filter, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MetricsResult', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/apps/{appId}/metrics/{metricId}'} - - def get_multiple( - self, app_id, body, custom_headers=None, raw=False, **operation_config): - """Retrieve metric data. - - Gets metric values for multiple metrics. - - :param app_id: ID of the application. This is Application ID from the - API Access settings blade in the Azure portal. - :type app_id: str - :param body: The batched metrics query. - :type body: - list[~azure.applicationinsights.models.MetricsPostBodySchema] - :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.applicationinsights.models.MetricsResultsItem] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_multiple.metadata['url'] - path_format_arguments = { - 'appId': self._serialize.url("app_id", app_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct body - body_content = self._serialize.body(body, '[MetricsPostBodySchema]') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[MetricsResultsItem]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_multiple.metadata = {'url': '/apps/{appId}/metrics'} - - def get_metadata( - self, app_id, custom_headers=None, raw=False, **operation_config): - """Retrieve metric metatadata. - - Gets metadata describing the available metrics. - - :param app_id: ID of the application. This is Application ID from the - API Access settings blade in the Azure portal. - :type app_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: object or ClientRawResponse if raw=true - :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.get_metadata.metadata['url'] - path_format_arguments = { - 'appId': self._serialize.url("app_id", app_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('object', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_metadata.metadata = {'url': '/apps/{appId}/metrics/metadata'} diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/query_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/query_operations.py deleted file mode 100644 index f08c7f7ffe6..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/operations/query_operations.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class QueryOperations(object): - """QueryOperations 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. - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - - self.config = config - - def execute( - self, app_id, body, custom_headers=None, raw=False, **operation_config): - """Execute an Analytics query. - - Executes an Analytics query for data. - [Here](https://dev.applicationinsights.io/documentation/Using-the-API/Query) - is an example for using POST with an Analytics query. - - :param app_id: ID of the application. This is Application ID from the - API Access settings blade in the Azure portal. - :type app_id: str - :param body: The Analytics query. Learn more about the [Analytics - query - syntax](https://azure.microsoft.com/documentation/articles/app-insights-analytics-reference/) - :type body: ~azure.applicationinsights.models.QueryBody - :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: QueryResults or ClientRawResponse if raw=true - :rtype: ~azure.applicationinsights.models.QueryResults or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` - """ - # Construct URL - url = self.execute.metadata['url'] - path_format_arguments = { - 'appId': self._serialize.url("app_id", app_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - - # Construct body - body_content = self._serialize.body(body, 'QueryBody') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('QueryResults', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - execute.metadata = {'url': '/apps/{appId}/query'} diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/version.py b/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/version.py deleted file mode 100644 index e0ec669828c..00000000000 --- a/src/application-insights/azext_applicationinsights/vendored_sdks/applicationinsights/version.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -VERSION = "0.1.0" - From 601621d983961937e0223b901be69cb12b536dae Mon Sep 17 00:00:00 2001 From: AllyW Date: Thu, 17 Apr 2025 13:50:02 +0800 Subject: [PATCH 11/12] fix doc link --- .../aaz/latest/monitor/app_insights/_query_execute.py | 2 +- .../aaz/latest/monitor/app_insights/events/__cmd_group.py | 3 --- .../aaz/latest/monitor/app_insights/events/_show.py | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py index a9e60d46922..8e4ac9c3d6d 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/_query_execute.py @@ -12,7 +12,7 @@ class QueryExecute(AAZCommand): - """Executes an Analytics query for data. [Here](https://dev.applicationinsights.io/documentation/Using-the-API/Query) is an example for using POST with an Analytics query. + """Executes an Analytics query for data. Doc https://dev.applicationinsights.io/documentation/Using-the-API/Query is an example for using POST with an Analytics query. """ _aaz_info = { diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__cmd_group.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__cmd_group.py index b629778b418..6e2b6b14f67 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__cmd_group.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/__cmd_group.py @@ -11,9 +11,6 @@ from azure.cli.core.aaz import * -@register_command_group( - "monitor app-insights events", -) class __CMDGroup(AAZCommandGroup): """Manage Event """ diff --git a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py index de5f1714f1c..dfc469fbb35 100644 --- a/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py +++ b/src/application-insights/azext_applicationinsights/aaz/latest/monitor/app_insights/events/_show.py @@ -11,9 +11,6 @@ from azure.cli.core.aaz import * -@register_command( - "monitor app-insights events show", -) class Show(AAZCommand): """Get the data for a single event """ From 82ed271c9742f536b35cb4d9a612a58c58a3b98e Mon Sep 17 00:00:00 2001 From: AllyW Date: Thu, 17 Apr 2025 17:06:03 +0800 Subject: [PATCH 12/12] add breaking change --- src/application-insights/HISTORY.rst | 3 ++- .../azext_applicationinsights/azext_metadata.json | 1 + src/application-insights/setup.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/application-insights/HISTORY.rst b/src/application-insights/HISTORY.rst index d34678a06bd..60cfd7fe10c 100644 --- a/src/application-insights/HISTORY.rst +++ b/src/application-insights/HISTORY.rst @@ -2,9 +2,10 @@ Release History =============== -1.3.0 +2.0.0b1 ++++++++++++++++++ * `az monitor app-insights events/metrics/query`: Migrate data-plane using codegen tool +* [Breaking Change] `az monitor app-insights events show`: Response schema key `aimessages` and `odatacontext` changed to `@ai.messages` and `@odata.context` to be consistent with swagger api 1.2.3 ++++++++++++++++++ diff --git a/src/application-insights/azext_applicationinsights/azext_metadata.json b/src/application-insights/azext_applicationinsights/azext_metadata.json index 4a6fc27e14e..f02bd10562b 100644 --- a/src/application-insights/azext_applicationinsights/azext_metadata.json +++ b/src/application-insights/azext_applicationinsights/azext_metadata.json @@ -1,3 +1,4 @@ { + "azext.isPreview": true, "azext.minCliCoreVersion": "2.71.0" } \ No newline at end of file diff --git a/src/application-insights/setup.py b/src/application-insights/setup.py index 02e2593f5e0..337572f9c12 100644 --- a/src/application-insights/setup.py +++ b/src/application-insights/setup.py @@ -8,7 +8,7 @@ from codecs import open from setuptools import setup, find_packages -VERSION = "1.3.0" +VERSION = "2.0.0b1" CLASSIFIERS = [ 'Development Status :: 4 - Beta',