diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 19bf4fcbd26..54a10128d86 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -96,8 +96,30 @@
/src/blueprint/ @fengzhou-msft
+/src/storage-or-preview/ @Juliehzl
+
+/src/logic/ @bquantump
+
/src/databox/ @jsntcy
/src/hpc-cache/ @qianwens
+/src/timeseriesinsights/ @jiasli
+
+/src/portal/ @YalinLi0312
+
+/src/import-export/ @arrownj
+
/src/account/ @zikalino
+
+/src/datashare/ @fengzhou-msft
+
+/src/k8sconfiguration/ @NarayanThiru
+
+/src/log-analytics-solution/ @zhoxing-ms
+
+/src/kusto/ @ilayr @orhasban @astauben
+
+/src/ai-did-you-mean-this/ @christopher-o-toole
+
+/src/custom-providers/ @jsntcy
diff --git a/azure-cli-extensions.pyproj b/azure-cli-extensions.pyproj
index 97b8809839b..f0b0aca658c 100644
--- a/azure-cli-extensions.pyproj
+++ b/azure-cli-extensions.pyproj
@@ -11,6 +11,7 @@
.
{888888a0-9f3d-457c-b088-3a5042f75d52}
Standard Python launcher
+ true
@@ -2805,6 +2806,87 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4615,6 +4697,52 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -4758,6 +4886,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 754c74f5f29..769a6c01492 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -13,25 +13,25 @@ pr:
- '*'
jobs:
-- job: CredScan
- displayName: "Credential Scan"
- pool:
- vmImage: "windows-2019"
- steps:
- - task: ms-codeanalysis.vss-microsoft-security-code-analysis.build-task-credscan.CredScan@2
- displayName: 'CredScan'
- inputs:
- toolVersion: 'Latest'
- suppressionsFile: './scripts/ci/credscan/CredScanSuppressions.json'
- - task: ms-codeanalysis.vss-microsoft-security-code-analysis.build-task-postanalysis.PostAnalysis@1
- displayName: 'Post Analysis'
- inputs:
- AllTools: false
- BinSkim: false
- CredScan: true
- RoslynAnalyzers: false
- TSLint: false
- ToolLogsNotFoundAction: 'Standard'
+# - job: CredScan
+# displayName: "Credential Scan"
+# pool:
+# vmImage: "windows-2019"
+# steps:
+# - task: ms-codeanalysis.vss-microsoft-security-code-analysis.build-task-credscan.CredScan@2
+# displayName: 'CredScan'
+# inputs:
+# toolVersion: 'Latest'
+# suppressionsFile: './scripts/ci/credscan/CredScanSuppressions.json'
+# - task: ms-codeanalysis.vss-microsoft-security-code-analysis.build-task-postanalysis.PostAnalysis@1
+# displayName: 'Post Analysis'
+# inputs:
+# AllTools: false
+# BinSkim: false
+# CredScan: true
+# RoslynAnalyzers: false
+# TSLint: false
+# ToolLogsNotFoundAction: 'Standard'
- job: CheckLicenseHeader
displayName: "Check License"
@@ -162,6 +162,8 @@ jobs:
displayName: 'Use Python 3.7'
inputs:
versionSpec: 3.7
+ - bash: pip install wheel==0.30.0
+ displayName: 'Install wheel==0.30.0'
- task: Bash@3
displayName: "Verify Extension Ref Docs"
inputs:
diff --git a/scripts/ci/util.py b/scripts/ci/util.py
index 6081d4dad11..6c7ae237231 100644
--- a/scripts/ci/util.py
+++ b/scripts/ci/util.py
@@ -4,14 +4,21 @@
# --------------------------------------------------------------------------------------------
import os
+import re
import json
import zipfile
-from wheel.install import WHEEL_INFO_RE
# Dependencies that will not be checked.
# This is for packages starting with 'azure-' but do not use the 'azure' namespace.
SKIP_DEP_CHECK = ['azure-batch-extensions']
+# copy from wheel==0.30.0
+WHEEL_INFO_RE = re.compile(
+ r"""^(?P(?P.+?)(-(?P\d.+?))?)
+ ((-(?P\d.*?))?-(?P.+?)-(?P.+?)-(?P.+?)
+ \.whl|\.dist-info)$""",
+ re.VERBOSE).match
+
def get_repo_root():
current_dir = os.path.dirname(os.path.abspath(__file__))
diff --git a/src/ai-did-you-mean-this/HISTORY.rst b/src/ai-did-you-mean-this/HISTORY.rst
new file mode 100644
index 00000000000..0162192acb9
--- /dev/null
+++ b/src/ai-did-you-mean-this/HISTORY.rst
@@ -0,0 +1,10 @@
+.. :changelog:
+
+Release History
+===============
+
+0.1.0
+++++++
+* Initial release.
+* Add autogenerated recommendations for recovery from UserFault failures.
+* Ensure that the hook is activated in common UserFault failure scenarios.
\ No newline at end of file
diff --git a/src/ai-did-you-mean-this/README.md b/src/ai-did-you-mean-this/README.md
new file mode 100644
index 00000000000..634db4ef845
--- /dev/null
+++ b/src/ai-did-you-mean-this/README.md
@@ -0,0 +1,91 @@
+# Microsoft Azure CLI 'AI Did You Mean This' Extension #
+
+### Installation ###
+To install the extension, use the below CLI command
+```
+az extension add --name ai-did-you-mean-this
+```
+
+### Background ###
+The purpose of this extension is help users recover from failure. Once installed, failure recovery recommendations will automatically be provided for supported command failures. In cases where no recommendations are available, a prompt to use `az find` will be shown provided that the command can be matched to a valid CLI command.
+### Limitations ###
+For now, recommendations are limited to parser failures (i.e. not in a command group, argument required, unrecognized parameter, expected one argument, etc). Support for more core failures is planned for a future release.
+### Try it out! ###
+The following examples demonstrate how to trigger the extension. For a more complete list of supported CLI failure types, see this [CLI PR](https://github.com/Azure/azure-cli/pull/12889). Keep in mind that the recommendations shown here may be different from the ones that you receive.
+
+#### az account ####
+```
+> az account
+az account: error: the following arguments are required: _subcommand
+usage: az account [-h]
+ {list,set,show,clear,list-locations,get-access-token,lock,management-group}
+ ...
+
+Here are the most common ways users succeeded after [account] failed:
+ az account list
+ az account show
+```
+
+#### az account set ####
+```
+> az account set
+az account set: error: the following arguments are required: --subscription/-s
+usage: az account set [-h] [--verbose] [--debug] [--only-show-errors]
+ [--output {json,jsonc,yaml,yamlc,table,tsv,none}]
+ [--query JMESPATH] --subscription SUBSCRIPTION
+
+Here are the most common ways users succeeded after [account set] failed:
+ az account set --subscription Subscription
+```
+
+#### az group create ####
+```
+>az group create
+az group create: error: the following arguments are required: --name/--resource-group/-n/-g, --location/-l
+usage: az group create [-h] [--verbose] [--debug] [--only-show-errors]
+ [--output {json,jsonc,yaml,yamlc,table,tsv,none}]
+ [--query JMESPATH] [--subscription _SUBSCRIPTION]
+ --name RG_NAME --location LOCATION
+ [--tags [TAGS [TAGS ...]]] [--managed-by MANAGED_BY]
+
+Here are the most common ways users succeeded after [group create] failed:
+ az group create --location westeurope --resource-group MyResourceGroup
+```
+#### az vm list ###
+```
+> az vm list --query ".id"
+az vm list: error: argument --query: invalid jmespath_type value: '.id'
+usage: az vm list [-h] [--verbose] [--debug] [--only-show-errors]
+ [--output {json,jsonc,yaml,yamlc,table,tsv,none}]
+ [--query JMESPATH] [--subscription _SUBSCRIPTION]
+ [--resource-group RESOURCE_GROUP_NAME] [--show-details]
+
+Sorry I am not able to help with [vm list]
+Try running [az find "az vm list"] to see examples of [vm list] from other users.
+```
+### Developer Build ###
+If you want to try an experimental release of the extension, it is recommended you do so in a [Docker container](https://www.docker.com/resources/what-container). Keep in mind that you'll need to install Docker and pull the desired [Azure CLI image](https://hub.docker.com/_/microsoft-azure-cli) from the Microsoft Container Registry before proceeding.
+
+#### Setting up your Docker Image ####
+To run the Azure CLI Docker image as an interactive shell, run the below command by replacing `` with your desired CLI version
+```bash
+docker run -it mcr.microsoft.com/azure-cli:
+export EXT="ai-did-you-mean-this"
+pip install --upgrade --target ~/.azure/cliextensions/$EXT "git+https://github.com/christopher-o-toole/azure-cli-extensions.git@thoth-extension#subdirectory=src/$EXT&egg=$EXT"
+```
+Each time you start a new shell, you'll need to login before you can start using the extension. To do so, run
+```bash
+az login
+```
+and follow the instructions given in the prompt. Once you're logged in, try out the extension by issuing a faulty command
+```
+> az account
+az account: error: the following arguments are required: _subcommand
+usage: az account [-h]
+ {list,set,show,clear,list-locations,get-access-token,lock,management-group}
+ ...
+
+Here are the most common ways users succeeded after [account] failed:
+ az account list
+ az account show
+```
\ No newline at end of file
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/__init__.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/__init__.py
new file mode 100644
index 00000000000..8db2b74fe04
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/__init__.py
@@ -0,0 +1,52 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+from azure.cli.core import AzCommandsLoader
+
+from knack.events import (
+ EVENT_INVOKER_CMD_TBL_LOADED
+)
+
+from azext_ai_did_you_mean_this._help import helps # pylint: disable=unused-import
+from azext_ai_did_you_mean_this._cmd_table import on_command_table_loaded
+
+
+def inject_functions_into_core():
+ from azure.cli.core.parser import AzCliCommandParser
+ from azext_ai_did_you_mean_this.custom import recommend_recovery_options
+ AzCliCommandParser.recommendation_provider = recommend_recovery_options
+
+
+# pylint: disable=too-few-public-methods
+class GlobalConfig():
+ ENABLE_STYLING = False
+
+
+class AiDidYouMeanThisCommandsLoader(AzCommandsLoader):
+ def __init__(self, cli_ctx=None):
+ from azure.cli.core.commands import CliCommandType
+
+ ai_did_you_mean_this_custom = CliCommandType(
+ operations_tmpl='azext_ai_did_you_mean_this.custom#{}')
+ super().__init__(cli_ctx=cli_ctx,
+ custom_command_type=ai_did_you_mean_this_custom)
+ self.cli_ctx.register_event(EVENT_INVOKER_CMD_TBL_LOADED, on_command_table_loaded)
+ inject_functions_into_core()
+ # per https://github.com/Azure/azure-cli/pull/12601
+ try:
+ GlobalConfig.ENABLE_STYLING = cli_ctx.enable_color
+ except AttributeError:
+ pass
+
+ def load_command_table(self, args):
+ from azext_ai_did_you_mean_this.commands import load_command_table
+ load_command_table(self, args)
+ return self.command_table
+
+ def load_arguments(self, command):
+ pass
+
+
+COMMAND_LOADER_CLS = AiDidYouMeanThisCommandsLoader
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_cmd_table.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_cmd_table.py
new file mode 100644
index 00000000000..9d77a5db9bd
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_cmd_table.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.
+# --------------------------------------------------------------------------------------------
+
+
+class CommandTable(): # pylint: disable=too-few-public-methods
+ CMD_TBL = None
+
+
+def on_command_table_loaded(_, **kwargs):
+ cmd_tbl = kwargs.pop('cmd_tbl', None)
+ CommandTable.CMD_TBL = cmd_tbl
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_const.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_const.py
new file mode 100644
index 00000000000..238ec3151e6
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_const.py
@@ -0,0 +1,34 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+UPDATE_RECOMMENDATION_STR = (
+ "Better failure recovery recommendations are available from the latest version of the CLI. "
+ "Please update for the best experience.\n"
+)
+
+UNABLE_TO_HELP_FMT_STR = (
+ '\nSorry I am not able to help with [{command}]'
+ '\nTry running [az find "az {command}"] to see examples of [{command}] from other users.'
+)
+
+RECOMMENDATION_HEADER_FMT_STR = (
+ '\nHere are the most common ways users succeeded after [{command}] failed:'
+)
+
+TELEMETRY_MUST_BE_ENABLED_STR = (
+ 'User must agree to telemetry before failure recovery recommendations can be presented.'
+)
+
+TELEMETRY_MISSING_SUBSCRIPTION_ID_STR = (
+ "Subscription ID was not set in telemetry."
+)
+
+TELEMETRY_MISSING_CORRELATION_ID_STR = (
+ "Correlation ID was not set in telemetry."
+)
+
+UNABLE_TO_CALL_SERVICE_STR = (
+ 'Either the subscription ID or correlation ID was not set. Aborting operation.'
+)
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_help.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_help.py
new file mode 100644
index 00000000000..8c8e70d9a85
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_help.py
@@ -0,0 +1,17 @@
+# 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.
+# --------------------------------------------------------------------------------------------
+
+from knack.help_files import helps # pylint: disable=unused-import
+
+helps['ai-did-you-mean-this'] = """
+ type: group
+ short-summary: Add recommendations for recovering from failure.
+"""
+
+helps['ai-did-you-mean-this version'] = """
+ type: command
+ short-summary: Prints the extension version.
+"""
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_style.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_style.py
new file mode 100644
index 00000000000..f32e8452062
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/_style.py
@@ -0,0 +1,28 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+import sys
+
+from azext_ai_did_you_mean_this import GlobalConfig
+
+
+def style_message(msg):
+ if should_enable_styling():
+ import colorama # pylint: disable=import-error
+
+ try:
+ msg = colorama.Style.BRIGHT + msg + colorama.Style.RESET_ALL
+ except KeyError:
+ pass
+ return msg
+
+
+def should_enable_styling():
+ try:
+ if GlobalConfig.ENABLE_STYLING and sys.stdout.isatty():
+ return True
+ except AttributeError:
+ pass
+ return False
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/azext_metadata.json b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/azext_metadata.json
new file mode 100644
index 00000000000..6a44beb25b4
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/azext_metadata.json
@@ -0,0 +1,4 @@
+{
+ "azext.isPreview": true,
+ "azext.minCliCoreVersion": "2.4.0"
+}
\ No newline at end of file
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/commands.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/commands.py
new file mode 100644
index 00000000000..0732b3eba2c
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/commands.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.
+# --------------------------------------------------------------------------------------------
+
+# pylint: disable=line-too-long
+
+
+def load_command_table(self, _):
+
+ with self.command_group('ai-did-you-mean-this', is_preview=True) as g:
+ g.custom_command('version', 'show_extension_version')
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/custom.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/custom.py
new file mode 100644
index 00000000000..ede97b1c7e4
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/custom.py
@@ -0,0 +1,242 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+import json
+from http import HTTPStatus
+
+import requests
+from requests import RequestException
+
+import azure.cli.core.telemetry as telemetry
+
+from knack.log import get_logger
+from knack.util import CLIError # pylint: disable=unused-import
+
+from azext_ai_did_you_mean_this.failure_recovery_recommendation import FailureRecoveryRecommendation
+from azext_ai_did_you_mean_this._style import style_message
+from azext_ai_did_you_mean_this._const import (
+ RECOMMENDATION_HEADER_FMT_STR,
+ UNABLE_TO_HELP_FMT_STR,
+ TELEMETRY_MUST_BE_ENABLED_STR,
+ TELEMETRY_MISSING_SUBSCRIPTION_ID_STR,
+ TELEMETRY_MISSING_CORRELATION_ID_STR,
+ UNABLE_TO_CALL_SERVICE_STR
+)
+from azext_ai_did_you_mean_this._cmd_table import CommandTable
+
+logger = get_logger(__name__)
+
+
+# Commands
+# note: at least one command is required in order for the CLI to load the extension.
+def show_extension_version():
+ print(f'Current version: 0.1.0')
+
+
+def _log_debug(msg, *args, **kwargs):
+ # TODO: see if there's a way to change the log formatter locally without printing to stdout
+ msg = f'[Thoth]: {msg}'
+ logger.debug(msg, *args, **kwargs)
+
+
+def get_parameter_table(cmd_table, command, recurse=True):
+ az_cli_command = cmd_table.get(command, None)
+ parameter_table = az_cli_command.arguments if az_cli_command else None
+
+ # if the specified command was not found and recursive search is enabled...
+ if not az_cli_command and recurse:
+ # if there are at least two tokens separated by whitespace, remove the last token
+ last_delim_idx = command.rfind(' ')
+ if last_delim_idx != -1:
+ _log_debug('Removing unknown token "%s" from command.', command[last_delim_idx + 1:])
+ # try to find the truncated command.
+ parameter_table, command = get_parameter_table(cmd_table, command[:last_delim_idx], recurse=False)
+
+ return parameter_table, command
+
+
+def normalize_and_sort_parameters(cmd_table, command, parameters):
+ from knack.deprecation import Deprecated
+ _log_debug('normalize_and_sort_parameters: command: "%s", parameters: "%s"', command, parameters)
+
+ parameter_set = set()
+ parameter_table, command = get_parameter_table(cmd_table, command)
+
+ if parameters:
+ # TODO: Avoid setting rules for global parameters manually.
+ rules = {
+ '-h': '--help',
+ '-o': '--output',
+ '--only-show-errors': None,
+ '--help': None,
+ '--output': None,
+ '--query': None,
+ '--debug': None,
+ '--verbose': None
+ }
+
+ blocklisted = {'--debug', '--verbose'}
+
+ if parameter_table:
+ for argument in parameter_table.values():
+ options = argument.type.settings['options_list']
+ # remove deprecated arguments.
+ options = (option for option in options if not isinstance(option, Deprecated))
+
+ # attempt to create a rule for each potential parameter.
+ try:
+ # sort parameters by decreasing length.
+ sorted_options = sorted(options, key=len, reverse=True)
+ # select the longest parameter as the standard form
+ standard_form = sorted_options[0]
+
+ for option in sorted_options[1:]:
+ rules[option] = standard_form
+
+ # don't apply any rules for the parameter's standard form.
+ rules[standard_form] = None
+ except TypeError:
+ # ignore cases in which one of the option objects is of an unsupported type.
+ _log_debug('Unexpected argument options `%s` of type `%s`.', options, type(options).__name__)
+
+ for parameter in parameters:
+ if parameter in rules:
+ # normalize the parameter or do nothing if already normalized
+ normalized_form = rules.get(parameter, None) or parameter
+ # add the parameter to our result set
+ parameter_set.add(normalized_form)
+ else:
+ # ignore any parameters that we were unable to validate.
+ _log_debug('"%s" is an invalid parameter for command "%s".', parameter, command)
+
+ # remove any special global parameters that would typically be removed by the CLI
+ parameter_set.difference_update(blocklisted)
+
+ # get the list of parameters as a comma-separated list
+ return command, ','.join(sorted(parameter_set))
+
+
+def recommend_recovery_options(version, command, parameters, extension):
+ from timeit import default_timer as timer
+ start_time = timer()
+ elapsed_time = None
+
+ result = []
+ cmd_tbl = CommandTable.CMD_TBL
+ _log_debug('recommend_recovery_options: version: "%s", command: "%s", parameters: "%s", extension: "%s"',
+ version, command, parameters, extension)
+
+ # if the user doesn't agree to telemetry...
+ if not telemetry.is_telemetry_enabled():
+ _log_debug(TELEMETRY_MUST_BE_ENABLED_STR)
+ return result
+
+ # if the command is empty...
+ if not command:
+ # try to get the raw command field from telemetry.
+ session = telemetry._session # pylint: disable=protected-access
+ # get the raw command parsed by the CommandInvoker object.
+ command = session.raw_command
+ if command:
+ _log_debug(f'Setting command to [{command}] from telemtry.')
+
+ def append(line):
+ result.append(line)
+
+ def unable_to_help(command):
+ msg = UNABLE_TO_HELP_FMT_STR.format(command=command)
+ append(msg)
+
+ def show_recommendation_header(command):
+ msg = RECOMMENDATION_HEADER_FMT_STR.format(command=command)
+ append(style_message(msg))
+
+ if extension:
+ _log_debug('Detected extension. No action to perform.')
+ if not command:
+ _log_debug('Command is empty. No action to perform.')
+
+ # if an extension is in-use or the command is empty...
+ if extension or not command:
+ return result
+
+ # perform some rudimentary parsing to extract the parameters and command in a standard form
+ command, parameters = normalize_and_sort_parameters(cmd_tbl, command, parameters)
+ response = call_aladdin_service(command, parameters, version)
+
+ # only show recommendations when we can contact the service.
+ if response and response.status_code == HTTPStatus.OK:
+ recommendations = get_recommendations_from_http_response(response)
+
+ if recommendations:
+ show_recommendation_header(command)
+
+ for recommendation in recommendations:
+ append(f"\t{recommendation}")
+ # only prompt user to use "az find" for valid CLI commands
+ # note: pylint has trouble resolving statically initialized variables, which is why
+ # we need to disable the unsupported membership test rule
+ elif any(cmd.startswith(command) for cmd in cmd_tbl.keys()): # pylint: disable=unsupported-membership-test
+ unable_to_help(command)
+
+ elapsed_time = timer() - start_time
+ _log_debug('The overall time it took to process failure recovery recommendations was %.2fms.', elapsed_time * 1000)
+
+ return result
+
+
+def get_recommendations_from_http_response(response):
+ recommendations = []
+
+ for suggestion in response.json():
+ recommendations.append(FailureRecoveryRecommendation(suggestion))
+
+ return recommendations
+
+
+def call_aladdin_service(command, parameters, version):
+ _log_debug('call_aladdin_service: version: "%s", command: "%s", parameters: "%s"',
+ version, command, parameters)
+
+ response = None
+
+ correlation_id = telemetry._session.correlation_id # pylint: disable=protected-access
+ subscription_id = telemetry._get_azure_subscription_id() # pylint: disable=protected-access
+
+ if subscription_id and correlation_id:
+ context = {
+ "sessionId": correlation_id,
+ "subscriptionId": subscription_id,
+ "versionNumber": version
+ }
+
+ query = {
+ "command": command,
+ "parameters": parameters
+ }
+
+ api_url = 'https://app.aladdindev.microsoft.com/api/v1.0/suggestions'
+ headers = {'Content-Type': 'application/json'}
+
+ try:
+ response = requests.get(
+ api_url,
+ params={
+ 'query': json.dumps(query),
+ 'clientType': 'AzureCli',
+ 'context': json.dumps(context)
+ },
+ headers=headers)
+ except RequestException as ex:
+ _log_debug('requests.get() exception: %s', ex)
+ else:
+ if subscription_id is None:
+ _log_debug(TELEMETRY_MISSING_SUBSCRIPTION_ID_STR)
+ if correlation_id is None:
+ _log_debug(TELEMETRY_MISSING_CORRELATION_ID_STR)
+
+ _log_debug(UNABLE_TO_CALL_SERVICE_STR)
+
+ return response
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/failure_recovery_recommendation.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/failure_recovery_recommendation.py
new file mode 100644
index 00000000000..e52c9cb567b
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/failure_recovery_recommendation.py
@@ -0,0 +1,64 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+
+def assert_has_split_method(field, value):
+ if not getattr(value, 'split') or not callable(value.split):
+ raise TypeError(f'value assigned to `{field}` must contain split method')
+
+
+class FailureRecoveryRecommendation():
+ def __init__(self, data):
+ data['SuccessCommand'] = data.get('SuccessCommand', '')
+ data['SuccessCommand_Parameters'] = data.get('SuccessCommand_Parameters', '')
+ data['SuccessCommand_ArgumentPlaceholders'] = data.get('SuccessCommand_ArgumentPlaceholders', '')
+
+ self._command = data['SuccessCommand']
+ self._parameters = data['SuccessCommand_Parameters']
+ self._placeholders = data['SuccessCommand_ArgumentPlaceholders']
+
+ for attr in ('_parameters', '_placeholders'):
+ value = getattr(self, attr)
+ value = '' if value == '{}' else value
+ setattr(self, attr, value)
+
+ @property
+ def command(self):
+ return self._command
+
+ @command.setter
+ def command(self, value):
+ self._command = value
+
+ @property
+ def parameters(self):
+ return self._parameters.split(',')
+
+ @parameters.setter
+ def parameters(self, value):
+ assert_has_split_method('parameters', value)
+ self._parameters = value
+
+ @property
+ def placeholders(self):
+ return self._placeholders.split(',')
+
+ @placeholders.setter
+ def placeholders(self, value):
+ assert_has_split_method('placeholders', value)
+ self._placeholders = value
+
+ def __str__(self):
+ parameter_and_argument_buffer = []
+
+ for pair in zip(self.parameters, self.placeholders):
+ parameter_and_argument_buffer.append(' '.join(pair))
+
+ return f"az {self.command} {' '.join(parameter_and_argument_buffer)}"
+
+ def __eq__(self, value):
+ return (self.command == value.command and
+ self.parameters == value.parameters and
+ self.placeholders == value.placeholders)
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/__init__.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/__init__.py
new file mode 100644
index 00000000000..99c0f28cd71
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/__init__.py
@@ -0,0 +1,5 @@
+# -----------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+# -----------------------------------------------------------------------------
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/__init__.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/__init__.py
new file mode 100644
index 00000000000..99c0f28cd71
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/__init__.py
@@ -0,0 +1,5 @@
+# -----------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+# -----------------------------------------------------------------------------
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/_commands.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/_commands.py
new file mode 100644
index 00000000000..32f97e1a602
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/_commands.py
@@ -0,0 +1,132 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+from collections import namedtuple
+from enum import Enum
+
+GLOBAL_ARGS = set(('--debug', '--verbose', '--help', '--only-show-errors', '--output', '--query'))
+GLOBAL_ARG_BLACKLIST = set(('--debug', '--verbose'))
+GLOBAL_ARG_WHITELIST = GLOBAL_ARGS.difference(GLOBAL_ARG_BLACKLIST)
+GLOBAL_ARGS_SHORTHAND_MAP = {'-h': '--help', '-o': '--output'}
+GLOBAL_ARG_LIST = tuple(GLOBAL_ARGS) + tuple(GLOBAL_ARGS_SHORTHAND_MAP.keys())
+
+Arguments = namedtuple('Arguments', ['actual', 'expected'])
+CliCommand = namedtuple('CliCommand', ['module', 'command', 'args'])
+
+
+def get_expected_args(args):
+ return [arg for arg in args if arg.startswith('--')]
+
+
+VM_MODULE_ARGS = ['-g', '--name', '-n', '--resource-group', '--subscription']
+VM_MODULE_EXPECTED_ARGS = get_expected_args(VM_MODULE_ARGS)
+
+VM_SHOW_ARGS = Arguments(
+ actual=VM_MODULE_ARGS,
+ expected=VM_MODULE_EXPECTED_ARGS
+)
+
+_VM_CREATE_ARGS = ['--zone', '-z', '--vmss', '--location', '-l', '--nsg', '--subnet']
+
+VM_CREATE_ARGS = Arguments(
+ actual=VM_MODULE_ARGS + _VM_CREATE_ARGS,
+ expected=VM_MODULE_EXPECTED_ARGS + get_expected_args(_VM_CREATE_ARGS)
+)
+
+ACCOUNT_ARGS = Arguments(
+ actual=[],
+ expected=[]
+)
+
+ACCOUNT_SET_ARGS = Arguments(
+ actual=['-s', '--subscription'],
+ expected=['--subscription']
+)
+
+EXTENSION_LIST_ARGS = Arguments(
+ actual=['--foo', '--bar'],
+ expected=[]
+)
+
+AI_DID_YOU_MEAN_THIS_VERSION_ARGS = Arguments(
+ actual=['--baz'],
+ expected=[]
+)
+
+KUSTO_CLUSTER_CREATE_ARGS = Arguments(
+ actual=['-l', '-g', '--no-wait'],
+ expected=['--location', '--resource-group', '--no-wait']
+)
+
+
+def add_global_args(args, global_args=GLOBAL_ARG_LIST):
+ expected_global_args = list(GLOBAL_ARG_WHITELIST)
+ args.actual.extend(global_args)
+ args.expected.extend(expected_global_args)
+ return args
+
+
+class AzCommandType(Enum):
+ VM_SHOW = CliCommand(
+ module='vm',
+ command='vm show',
+ args=add_global_args(VM_SHOW_ARGS)
+ )
+ VM_CREATE = CliCommand(
+ module='vm',
+ command='vm create',
+ args=add_global_args(VM_CREATE_ARGS)
+ )
+ ACCOUNT = CliCommand(
+ module='account',
+ command='account',
+ args=add_global_args(ACCOUNT_ARGS)
+ )
+ ACCOUNT_SET = CliCommand(
+ module='account',
+ command='account set',
+ args=add_global_args(ACCOUNT_SET_ARGS)
+ )
+ EXTENSION_LIST = CliCommand(
+ module='extension',
+ command='extension list',
+ args=add_global_args(EXTENSION_LIST_ARGS)
+ )
+ AI_DID_YOU_MEAN_THIS_VERSION = CliCommand(
+ module='ai-did-you-mean-this',
+ command='ai-did-you-mean-this version',
+ args=add_global_args(AI_DID_YOU_MEAN_THIS_VERSION_ARGS)
+ )
+ KUSTO_CLUSTER_CREATE = CliCommand(
+ module='kusto',
+ command='kusto cluster create',
+ args=add_global_args(KUSTO_CLUSTER_CREATE_ARGS)
+ )
+
+ def __init__(self, module, command, args):
+ self._expected_args = list(sorted(args.expected))
+ self._args = args.actual
+ self._module = module
+ self._command = command
+
+ @property
+ def parameters(self):
+ return self._args
+
+ @property
+ def expected_parameters(self):
+ return ','.join(self._expected_args)
+
+ @property
+ def module(self):
+ return self._module
+
+ @property
+ def command(self):
+ return self._command
+
+
+def get_commands():
+ return list({command_type.command for command_type in AzCommandType})
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/_mock.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/_mock.py
new file mode 100644
index 00000000000..9617c48d3ba
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/_mock.py
@@ -0,0 +1,103 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+import os
+import json
+import unittest.mock as mock
+from enum import Enum, auto
+from http import HTTPStatus
+from collections import namedtuple
+from contextlib import contextmanager
+
+import requests
+
+from azext_ai_did_you_mean_this.failure_recovery_recommendation import FailureRecoveryRecommendation
+
+# mock service call context attributes
+MOCK_UUID = '00000000-0000-0000-0000-000000000000'
+MOCK_VERSION = '2.4.0'
+
+# mock recommendation data constants
+MOCK_MODEL_DIR = 'model'
+MOCK_RECOMMENDATION_MODEL_FILENAME = 'recommendations.json'
+
+
+RecommendationData = namedtuple('RecommendationData', ['recommendations', 'arguments', 'user_fault_type', 'extension'])
+
+
+class UserFaultType(Enum):
+ MISSING_REQUIRED_SUBCOMMAND = auto()
+ NOT_IN_A_COMMAND_GROUP = auto()
+ EXPECTED_AT_LEAST_ONE_ARGUMENT = auto()
+ UNRECOGNIZED_ARGUMENTS = auto()
+ INVALID_JMESPATH_QUERY = auto()
+ NOT_APPLICABLE = auto()
+
+
+def get_mock_recommendation_model_path(folder):
+ return os.path.join(folder, MOCK_MODEL_DIR, MOCK_RECOMMENDATION_MODEL_FILENAME)
+
+
+def _parse_entity(entity):
+ kwargs = {}
+ kwargs['recommendations'] = entity.get('recommendations', [])
+ kwargs['arguments'] = entity.get('arguments', '')
+ kwargs['extension'] = entity.get('extension', None)
+ kwargs['user_fault_type'] = UserFaultType[entity.get('user_fault_type', 'not_applicable').upper()]
+ return RecommendationData(**kwargs)
+
+
+class MockRecommendationModel():
+ MODEL = None
+ NO_DATA = None
+
+ @classmethod
+ def load(cls, path):
+ content = None
+ model = {}
+
+ with open(os.path.join(path), 'r') as test_recommendation_data_file:
+ content = json.load(test_recommendation_data_file)
+
+ for command, entity in content.items():
+ model[command] = _parse_entity(entity)
+
+ cls.MODEL = model
+ cls.NO_DATA = _parse_entity({})
+
+ @classmethod
+ def create_mock_aladdin_service_http_response(cls, command):
+ mock_response = requests.Response()
+ mock_response.status_code = HTTPStatus.OK.value
+ data = cls.get_recommendation_data(command)
+ mock_response._content = bytes(json.dumps(data.recommendations), 'utf-8') # pylint: disable=protected-access
+ return mock_response
+
+ @classmethod
+ def get_recommendation_data(cls, command):
+ return cls.MODEL.get(command, cls.NO_DATA)
+
+ @classmethod
+ def get_recommendations(cls, command):
+ data = cls.get_recommendation_data(command)
+ recommendations = [FailureRecoveryRecommendation(recommendation) for recommendation in data.recommendations]
+ return recommendations
+
+ @classmethod
+ def get_test_cases(cls):
+ cases = []
+ model = cls.MODEL or {}
+ for command, entity in model.items():
+ cases.append((command, entity))
+ return cases
+
+
+@contextmanager
+def mock_aladdin_service_call(command):
+ handlers = {}
+ handler = handlers.get(command, MockRecommendationModel.create_mock_aladdin_service_http_response)
+
+ with mock.patch('requests.get', return_value=handler(command)):
+ yield None
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/aladdin_scenario_test_base.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/aladdin_scenario_test_base.py
new file mode 100644
index 00000000000..ba8215b698e
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/aladdin_scenario_test_base.py
@@ -0,0 +1,152 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+import re
+import logging
+import unittest.mock as mock
+
+from azure_devtools.scenario_tests import mock_in_unit_test
+from azure.cli.testsdk import ScenarioTest
+
+from azext_ai_did_you_mean_this._const import UNABLE_TO_HELP_FMT_STR, RECOMMENDATION_HEADER_FMT_STR
+from azext_ai_did_you_mean_this._cmd_table import CommandTable
+from azext_ai_did_you_mean_this.tests.latest._mock import MOCK_UUID, MOCK_VERSION
+from azext_ai_did_you_mean_this.custom import recommend_recovery_options
+from azext_ai_did_you_mean_this.tests.latest._mock import UserFaultType
+
+TELEMETRY_MODULE = 'azure.cli.core.telemetry'
+TELEMETRY_SESSION_OBJECT = f'{TELEMETRY_MODULE}._session'
+
+USER_FAULT_TYPE_KEYWORDS = {
+ UserFaultType.EXPECTED_AT_LEAST_ONE_ARGUMENT: 'expected',
+ UserFaultType.INVALID_JMESPATH_QUERY: 'jmespath',
+ UserFaultType.MISSING_REQUIRED_SUBCOMMAND: '_subcommand',
+ UserFaultType.NOT_IN_A_COMMAND_GROUP: 'command group',
+ UserFaultType.UNRECOGNIZED_ARGUMENTS: 'unrecognized'
+}
+
+FMT_STR_PATTERN_REGEX = r'\[[^\]]+\]|{[^}]+}'
+SUGGEST_AZ_FIND_PATTERN_REGEX = re.sub(FMT_STR_PATTERN_REGEX, r'.*', UNABLE_TO_HELP_FMT_STR)
+SHOW_RECOMMENDATIONS_PATTERN_REGEX = re.sub(FMT_STR_PATTERN_REGEX, r'.*', RECOMMENDATION_HEADER_FMT_STR)
+
+
+def patch_ids(unit_test):
+ def _mock_uuid(*args, **kwargs): # pylint: disable=unused-argument
+ return MOCK_UUID
+
+ mock_in_unit_test(unit_test,
+ f'{TELEMETRY_SESSION_OBJECT}.correlation_id',
+ _mock_uuid())
+ mock_in_unit_test(unit_test,
+ f'{TELEMETRY_MODULE}._get_azure_subscription_id',
+ _mock_uuid)
+
+
+def patch_version(unit_test):
+ mock_in_unit_test(unit_test,
+ 'azure.cli.core.__version__',
+ MOCK_VERSION)
+
+
+def patch_telemetry(unit_test):
+ mock_in_unit_test(unit_test,
+ 'azure.cli.core.telemetry.is_telemetry_enabled',
+ lambda: True)
+
+
+class AladdinScenarioTest(ScenarioTest):
+ def __init__(self, method_name, **kwargs):
+ super().__init__(method_name, **kwargs)
+
+ default_telemetry_patches = {
+ patch_ids,
+ patch_version,
+ patch_telemetry
+ }
+
+ self._exception = None
+ self._exit_code = None
+ self._parser_error_msg = ''
+ self._recommendation_msg = ''
+ self._recommender_positional_arguments = None
+
+ self.telemetry_patches = kwargs.pop('telemetry_patches', default_telemetry_patches)
+ self.recommendations = []
+
+ def setUp(self):
+ super().setUp()
+
+ for patch in self.telemetry_patches:
+ patch(self)
+
+ def cmd(self, command, checks=None, expect_failure=False, expect_user_fault_failure=False):
+ from azure.cli.core.azlogging import AzCliLogging
+
+ func = recommend_recovery_options
+ logger_name = AzCliLogging._COMMAND_METADATA_LOGGER # pylint: disable=protected-access
+ base = super()
+
+ def _hook(*args, **kwargs):
+ self._recommender_positional_arguments = args
+ result = func(*args, **kwargs)
+ self.recommendations = result
+ return result
+
+ def run_cmd():
+ base.cmd(command, checks=checks, expect_failure=expect_failure)
+
+ with mock.patch('azext_ai_did_you_mean_this.custom.recommend_recovery_options', wraps=_hook):
+ with self.assertLogs(logger_name, level=logging.ERROR) as parser_logs:
+ if expect_user_fault_failure:
+ with self.assertRaises(SystemExit) as cm:
+ run_cmd()
+
+ self._exception = cm.exception
+ self._exit_code = self._exception.code
+ self._parser_error_msg = '\n'.join(parser_logs.output)
+ self._recommendation_msg = '\n'.join(self.recommendations)
+
+ if expect_user_fault_failure:
+ self.assert_cmd_was_user_fault_failure()
+ else:
+ run_cmd()
+
+ if expect_user_fault_failure:
+ self.assert_cmd_table_not_empty()
+ self.assert_user_fault_is_of_correct_type(expect_user_fault_failure)
+
+ def assert_user_fault_is_of_correct_type(self, expect_user_fault_failure):
+ # check the user fault type where applicable
+ if isinstance(expect_user_fault_failure, UserFaultType):
+ keyword = USER_FAULT_TYPE_KEYWORDS.get(expect_user_fault_failure, None)
+ if keyword:
+ self.assertRegex(self._parser_error_msg, keyword)
+
+ def assert_cmd_was_user_fault_failure(self):
+ is_user_fault_failure = (isinstance(self._exception, SystemExit) and
+ self._exit_code == 2)
+
+ self.assertTrue(is_user_fault_failure)
+
+ def assert_cmd_table_not_empty(self):
+ self.assertIsNotNone(CommandTable.CMD_TBL)
+
+ def assert_recommendations_were_shown(self):
+ self.assertRegex(self._recommendation_msg, SHOW_RECOMMENDATIONS_PATTERN_REGEX)
+
+ def assert_az_find_was_suggested(self):
+ self.assertRegex(self._recommendation_msg, SUGGEST_AZ_FIND_PATTERN_REGEX)
+
+ def assert_nothing_is_shown(self):
+ self.assertEqual(self._recommendation_msg, '')
+
+ @property
+ def cli_version(self):
+ from azure.cli.core import __version__ as core_version
+ return core_version
+
+ @property
+ def recommender_postional_arguments(self):
+ return self._recommender_positional_arguments
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/model/recommendations.json b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/model/recommendations.json
new file mode 100644
index 00000000000..5359be372f9
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/model/recommendations.json
@@ -0,0 +1,75 @@
+{
+ "account": {
+ "recommendations": [
+ {
+ "SuccessCommand": "account list",
+ "SuccessCommand_Parameters": "",
+ "SuccessCommand_ArgumentPlaceholders": ""
+ },
+ {
+ "SuccessCommand": "account show",
+ "SuccessCommand_Parameters": "",
+ "SuccessCommand_ArgumentPlaceholders": ""
+ },
+ {
+ "SuccessCommand": "account set",
+ "SuccessCommand_Parameters": "--subscription",
+ "SuccessCommand_ArgumentPlaceholders": "Subscription"
+ }
+ ],
+ "user_fault_type": "missing_required_subcommand"
+
+ },
+ "boi": {
+ "user_fault_type": "not_in_a_command_group"
+ },
+ "vm show": {
+ "arguments": "--name \"BigJay\" --ids",
+ "user_fault_type": "expected_at_least_one_argument"
+ },
+ "ai-did-you-mean-this ve": {
+ "user_fault_type": "not_in_a_command_group",
+ "extension": "ai-did-you-mean-this"
+ },
+ "ai-did-you-mean-this version": {
+ "user_fault_type": "unrecognized_arguments",
+ "arguments": "--name \"Christopher\"",
+ "extension": "ai-did-you-mean-this"
+ },
+ "extension": {
+ "recommendations": [
+ {
+ "SuccessCommand": "extension list",
+ "SuccessCommand_Parameters": "",
+ "SuccessCommand_ArgumentPlaceholders": ""
+ }
+ ],
+ "user_fault_type": "missing_required_subcommand"
+ },
+ "vm": {
+ "recommendations": [
+ {
+ "SuccessCommand": "vm list",
+ "SuccessCommand_Parameters": "",
+ "SuccessCommand_ArgumentPlaceholders": ""
+ }
+ ],
+ "user_fault_type": "missing_required_subcommand",
+ "arguments": "--debug"
+ },
+ "account get-access-token": {
+ "user_fault_type": "unrecognized_arguments",
+ "arguments": "--test a --debug"
+ },
+ "vm list": {
+ "recommendations": [
+ {
+ "SuccessCommand": "vm list",
+ "SuccessCommand_Parameters": "--output,--query",
+ "SuccessCommand_ArgumentPlaceholders": "json,\"[].id\""
+ }
+ ],
+ "arguments": "--query \".id\"",
+ "user_fault_type": "invalid_jmespath_query"
+ }
+}
\ No newline at end of file
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_ai_did_you_mean_this_scenario.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_ai_did_you_mean_this_scenario.py
new file mode 100644
index 00000000000..fa9578d1583
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_ai_did_you_mean_this_scenario.py
@@ -0,0 +1,75 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+import os
+import unittest
+import unittest.mock as mock
+import json
+from http import HTTPStatus
+from collections import defaultdict
+
+import requests
+
+from azext_ai_did_you_mean_this.custom import call_aladdin_service, get_recommendations_from_http_response
+from azext_ai_did_you_mean_this._cmd_table import CommandTable
+from azext_ai_did_you_mean_this.tests.latest._mock import (
+ get_mock_recommendation_model_path,
+ mock_aladdin_service_call,
+ MockRecommendationModel,
+ UserFaultType
+)
+from azext_ai_did_you_mean_this.tests.latest.aladdin_scenario_test_base import AladdinScenarioTest
+from azext_ai_did_you_mean_this.tests.latest._commands import AzCommandType
+
+TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..'))
+
+
+class AiDidYouMeanThisScenarioTest(AladdinScenarioTest):
+ @classmethod
+ def setUpClass(cls):
+ super().setUpClass()
+
+ MockRecommendationModel.load(get_mock_recommendation_model_path(TEST_DIR))
+ cls.test_cases = MockRecommendationModel.get_test_cases()
+
+ def setUp(self):
+ super().setUp()
+
+ def test_ai_did_you_mean_this_aladdin_service_call(self):
+ for command, entity in self.test_cases:
+ tokens = entity.arguments.split()
+ parameters = [token for token in tokens if token.startswith('-')]
+
+ with mock_aladdin_service_call(command):
+ response = call_aladdin_service(command, parameters, self.cli_version)
+
+ self.assertEqual(HTTPStatus.OK, response.status_code)
+ recommendations = get_recommendations_from_http_response(response)
+ expected_recommendations = MockRecommendationModel.get_recommendations(command)
+ self.assertEquals(recommendations, expected_recommendations)
+
+ def test_ai_did_you_mean_this_recommendations_for_user_fault_commands(self):
+ for command, entity in self.test_cases:
+ args = entity.arguments
+ command_with_args = command if not args else f'{command} {args}'
+
+ with mock_aladdin_service_call(command):
+ self.cmd(command_with_args, expect_user_fault_failure=entity.user_fault_type)
+
+ self.assert_cmd_table_not_empty()
+ cmd_tbl = CommandTable.CMD_TBL
+
+ _version, _command, _parameters, _extension = self.recommender_postional_arguments
+ partial_command_match = command and any(cmd.startswith(command) for cmd in cmd_tbl.keys())
+ self.assertEqual(_version, self.cli_version)
+ self.assertEqual(_command, command if partial_command_match else '')
+ self.assertEqual(bool(_extension), bool(entity.extension))
+
+ if entity.recommendations:
+ self.assert_recommendations_were_shown()
+ elif partial_command_match and not entity.extension:
+ self.assert_az_find_was_suggested()
+ else:
+ self.assert_nothing_is_shown()
diff --git a/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_normalize_and_sort_parameters.py b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_normalize_and_sort_parameters.py
new file mode 100644
index 00000000000..06729b8b39c
--- /dev/null
+++ b/src/ai-did-you-mean-this/azext_ai_did_you_mean_this/tests/latest/test_normalize_and_sort_parameters.py
@@ -0,0 +1,81 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+import unittest
+from enum import Enum, auto
+
+from azure.cli.core.mock import DummyCli
+from azure.cli.core import MainCommandsLoader
+
+from azext_ai_did_you_mean_this.custom import normalize_and_sort_parameters
+from azext_ai_did_you_mean_this.tests.latest._commands import get_commands, AzCommandType
+
+
+class TestNormalizeAndSortParameters(unittest.TestCase):
+ @classmethod
+ def setUpClass(cls):
+ super(TestNormalizeAndSortParameters, cls).setUpClass()
+
+ from knack.events import EVENT_INVOKER_POST_CMD_TBL_CREATE
+ from azure.cli.core.commands.events import EVENT_INVOKER_PRE_LOAD_ARGUMENTS, EVENT_INVOKER_POST_LOAD_ARGUMENTS
+ from azure.cli.core.commands.arm import register_global_subscription_argument, register_ids_argument
+
+ # setup a dummy CLI with a valid invocation object.
+ cls.cli = DummyCli()
+ cli_ctx = cls.cli.commands_loader.cli_ctx
+ cls.cli.invocation = cli_ctx.invocation_cls(cli_ctx=cli_ctx,
+ parser_cls=cli_ctx.parser_cls,
+ commands_loader_cls=cli_ctx.commands_loader_cls,
+ help_cls=cli_ctx.help_cls)
+ # load command table for every module
+ cmd_loader = cls.cli.invocation.commands_loader
+ cmd_loader.load_command_table(None)
+
+ # Note: Both of the below events rely on EVENT_INVOKER_POST_CMD_TBL_CREATE.
+ # register handler for adding subscription argument
+ register_global_subscription_argument(cli_ctx)
+ # register handler for adding ids argument.
+ register_ids_argument(cli_ctx)
+
+ cli_ctx.raise_event(EVENT_INVOKER_PRE_LOAD_ARGUMENTS, commands_loader=cmd_loader)
+
+ # load arguments for each command
+ for cmd in get_commands():
+ # simulate command invocation by filling in required metadata.
+ cmd_loader.command_name = cmd
+ cli_ctx.invocation.data['command_string'] = cmd
+ # load argument info for the given command.
+ cmd_loader.load_arguments(cmd)
+
+ cli_ctx.raise_event(EVENT_INVOKER_POST_LOAD_ARGUMENTS, commands_loader=cmd_loader)
+ cli_ctx.raise_event(EVENT_INVOKER_POST_CMD_TBL_CREATE, commands_loader=cmd_loader)
+
+ cls.cmd_tbl = cmd_loader.command_table
+
+ def test_custom_normalize_and_sort_parameters(self):
+ for cmd in AzCommandType:
+ command, parameters = normalize_and_sort_parameters(self.cmd_tbl, cmd.command, cmd.parameters)
+ self.assertEqual(parameters, cmd.expected_parameters)
+ self.assertEqual(command, cmd.command)
+
+ def test_custom_normalize_and_sort_parameters_remove_invalid_command_token(self):
+ for cmd in AzCommandType:
+ cmd_with_invalid_token = f'{cmd.command} oops'
+ command, parameters = normalize_and_sort_parameters(self.cmd_tbl, cmd_with_invalid_token, cmd.parameters)
+ self.assertEqual(parameters, cmd.expected_parameters)
+ self.assertEqual(command, cmd.command)
+
+ def test_custom_normalize_and_sort_parameters_empty_parameter_list(self):
+ cmd = AzCommandType.ACCOUNT_SET
+ command, parameters = normalize_and_sort_parameters(self.cmd_tbl, cmd.command, '')
+ self.assertEqual(parameters, '')
+ self.assertEqual(command, cmd.command)
+
+ def test_custom_normalize_and_sort_parameters_invalid_command(self):
+ invalid_cmd = 'Lorem ipsum.'
+ command, parameters = normalize_and_sort_parameters(self.cmd_tbl, invalid_cmd, ['--foo', '--baz'])
+ self.assertEqual(parameters, '')
+ # verify that recursive parsing removes the last invalid whitespace delimited token.
+ self.assertEqual(command, 'Lorem')
diff --git a/src/ai-did-you-mean-this/setup.cfg b/src/ai-did-you-mean-this/setup.cfg
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/src/ai-did-you-mean-this/setup.py b/src/ai-did-you-mean-this/setup.py
new file mode 100644
index 00000000000..dc93ac897f0
--- /dev/null
+++ b/src/ai-did-you-mean-this/setup.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python
+
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+
+from codecs import open
+from setuptools import setup, find_packages
+try:
+ from azure_bdist_wheel import cmdclass
+except ImportError:
+ from distutils import log as logger
+ logger.warn("Wheel is not available, disabling bdist_wheel hook")
+
+VERSION = '0.1.0'
+
+# The full list of classifiers is available at
+# https://pypi.python.org/pypi?%3Aaction=list_classifiers
+CLASSIFIERS = [
+ 'Development Status :: 4 - Beta',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: System Administrators',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
+ 'License :: OSI Approved :: MIT License',
+]
+
+DEPENDENCIES = []
+
+with open('README.md', 'r', encoding='utf-8') as f:
+ README = f.read()
+with open('HISTORY.rst', 'r', encoding='utf-8') as f:
+ HISTORY = f.read()
+
+setup(
+ name='ai_did_you_mean_this',
+ version=VERSION,
+ description='Recommend recovery options on failure.',
+ # TODO: Update author and email, if applicable
+ author="Christopher O'Toole",
+ author_email='chotool@microsoft.com',
+ # TODO: consider pointing directly to your source code instead of the generic repo
+ url='https://github.com/Azure/azure-cli-extensions/ai-did-you-mean-this',
+ long_description=README + '\n\n' + HISTORY,
+ license='MIT',
+ classifiers=CLASSIFIERS,
+ packages=find_packages(),
+ install_requires=DEPENDENCIES,
+ package_data={'azext_ai_did_you_mean_this': ['azext_metadata.json']},
+)
diff --git a/src/aks-preview/HISTORY.md b/src/aks-preview/HISTORY.md
index 6f83c079f4d..6b5aeb291f7 100644
--- a/src/aks-preview/HISTORY.md
+++ b/src/aks-preview/HISTORY.md
@@ -2,6 +2,14 @@
Release History
===============
+0.4.45
++++++
+* Add "--aks-custom-headers" for "az aks nodepool add" and "az aks update"
+
+0.4.43
++++++
+* Fix issues with monitoring addon enabling with CLI versions 2.4.0+
+
0.4.43
+++++
* Add support for VMSS node public IP.
diff --git a/src/aks-preview/azext_aks_preview/_help.py b/src/aks-preview/azext_aks_preview/_help.py
index f0983247f0a..45075dc7b35 100644
--- a/src/aks-preview/azext_aks_preview/_help.py
+++ b/src/aks-preview/azext_aks_preview/_help.py
@@ -181,10 +181,10 @@
long-summary: If specified, please make sure the kubernetes version is larger than 1.10.6.
- name: --min-count
type: int
- short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100].
+ short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].
- name: --max-count
type: int
- short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100].
+ short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100].
- name: --cluster-autoscaler-profile
type: list
short-summary: Space-separated list of key=value pairs for configuring cluster autoscaler. Pass an empty string to clear the profile.
@@ -199,7 +199,7 @@
short-summary: The node resource group is the resource group where all customer's resources will be created in, such as virtual machines.
- name: --uptime-sla
type: bool
- short-summary: Enable paid managed cluster service with high availability.
+ short-summary: Enable a paid managed cluster service with a financially backed SLA.
- name: --attach-acr
type: string
short-summary: Grant the 'acrpull' role assignment to the ACR specified by name or resource ID.
@@ -307,10 +307,10 @@
short-summary: Update min-count or max-count for cluster autoscaler.
- name: --min-count
type: int
- short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100]
+ short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100]
- name: --max-count
type: int
- short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100]
+ short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100]
- name: --cluster-autoscaler-profile
type: list
short-summary: Space-separated list of key=value pairs for configuring cluster autoscaler. Pass an empty string to clear the profile.
@@ -355,6 +355,9 @@
- name: --aad-tenant-id
type: string
short-summary: The ID of an Azure Active Directory tenant.
+ - name: --aks-custom-headers
+ type: string
+ short-summary: Send custom headers. When specified, format should be Key1=Value1,Key2=Value2
examples:
- name: Enable cluster-autoscaler within node count range [1,5]
text: az aks update --enable-cluster-autoscaler --min-count 1 --max-count 5 -g MyResourceGroup -n MyManagedCluster
@@ -486,10 +489,10 @@
short-summary: Enable cluster autoscaler.
- name: --min-count
type: int
- short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100]
+ short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100]
- name: --max-count
type: int
- short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100]
+ short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100]
- name: --node-taints
type: string
short-summary: The node taints for the node pool. You can't change the node taints through CLI after the node pool is created.
@@ -511,6 +514,9 @@
- name: --mode
type: string
short-summary: The mode for a node pool which defines a node pool's primary function. If set as "System", AKS prefers system pods scheduling to node pools with mode `System`. Learn more at https://aka.ms/aks/nodepool/mode.
+ - name: --aks-custom-headers
+ type: string
+ short-summary: Send custom headers. When specified, format should be Key1=Value1,Key2=Value2
"""
helps['aks nodepool scale'] = """
@@ -546,10 +552,10 @@
short-summary: Update min-count or max-count for cluster autoscaler.
- name: --min-count
type: int
- short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100]
+ short-summary: Minimun nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100]
- name: --max-count
type: int
- short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specifying the value in the range of [1, 100]
+ short-summary: Maximum nodes count used for autoscaler, when "--enable-cluster-autoscaler" specified. Please specify the value in the range of [1, 100]
- name: --mode
type: string
short-summary: The mode for a node pool which defines a node pool's primary function. If set as "System", AKS prefers system pods scheduling to node pools with mode `System`. Learn more at https://aka.ms/aks/nodepool/mode.
diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py
index badf811cd07..338a44cc4fe 100644
--- a/src/aks-preview/azext_aks_preview/_params.py
+++ b/src/aks-preview/azext_aks_preview/_params.py
@@ -119,6 +119,7 @@ def load_arguments(self, _):
c.argument('disable_pod_security_policy', action='store_true')
c.argument('attach_acr', acr_arg_type, validator=validate_acr)
c.argument('detach_acr', acr_arg_type, validator=validate_acr)
+ c.argument('aks_custom_headers')
with self.argument_context('aks scale') as c:
c.argument('nodepool_name', type=str,
@@ -146,6 +147,7 @@ def load_arguments(self, _):
c.argument('spot_max_price', type=float, validator=validate_spot_max_price)
c.argument('labels', nargs='*', validator=validate_nodepool_labels)
c.argument('mode', arg_type=get_enum_type([CONST_NODEPOOL_MODE_SYSTEM, CONST_NODEPOOL_MODE_USER]))
+ c.argument('aks_custom_headers')
for scope in ['aks nodepool show', 'aks nodepool delete', 'aks nodepool scale', 'aks nodepool upgrade', 'aks nodepool update']:
with self.argument_context(scope) as c:
diff --git a/src/aks-preview/azext_aks_preview/custom.py b/src/aks-preview/azext_aks_preview/custom.py
index ed15b648ae8..37a673da365 100644
--- a/src/aks-preview/azext_aks_preview/custom.py
+++ b/src/aks-preview/azext_aks_preview/custom.py
@@ -262,11 +262,11 @@ def load_service_principals(config_path):
def _invoke_deployment(cli_ctx, resource_group_name, deployment_name, template, parameters, validate, no_wait,
subscription_id=None):
- from azure.mgmt.resource.resources import ResourceManagementClient
- from azure.mgmt.resource.resources.models import DeploymentProperties
-
+ from azure.cli.core.profiles import ResourceType, get_sdk
+ DeploymentProperties = get_sdk(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, 'DeploymentProperties', mod='models')
properties = DeploymentProperties(template=template, parameters=parameters, mode='incremental')
- smc = get_mgmt_service_client(cli_ctx, ResourceManagementClient, subscription_id=subscription_id).deployments
+ smc = get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES,
+ subscription_id=subscription_id).deployments
if validate:
logger.info('==== BEGIN TEMPLATE ====')
logger.info(json.dumps(template, indent=2))
@@ -1009,15 +1009,7 @@ def aks_create(cmd, # pylint: disable=too-many-locals,too-many-statements,to
tier="Paid"
)
- headers = {}
- if aks_custom_headers is not None:
- if aks_custom_headers != "":
- for pair in aks_custom_headers.split(','):
- parts = pair.split('=')
- if len(parts) != 2:
- raise CLIError('custom headers format is incorrect')
-
- headers[parts[0]] = parts[1]
+ headers = get_aks_custom_headers(aks_custom_headers)
# Due to SPN replication latency, we do a few retries here
max_retry = 30
@@ -1096,7 +1088,8 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches,
attach_acr=None,
detach_acr=None,
aad_tenant_id=None,
- aad_admin_group_object_ids=None):
+ aad_admin_group_object_ids=None,
+ aks_custom_headers=None):
update_autoscaler = enable_cluster_autoscaler or disable_cluster_autoscaler or update_cluster_autoscaler
update_acr = attach_acr is not None or detach_acr is not None
update_pod_security = enable_pod_security_policy or disable_pod_security_policy
@@ -1136,18 +1129,14 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches,
raise CLIError('There is more than one node pool in the cluster. Please use "az aks nodepool" command '
'to update per node pool auto scaler settings')
- node_count = instance.agent_pool_profiles[0].count
-
if min_count is None or max_count is None:
if enable_cluster_autoscaler or update_cluster_autoscaler:
- raise CLIError('Please specifying both min-count and max-count when --enable-cluster-autoscaler or '
+ raise CLIError('Please specify both min-count and max-count when --enable-cluster-autoscaler or '
'--update-cluster-autoscaler set.')
if min_count is not None and max_count is not None:
if int(min_count) > int(max_count):
raise CLIError('value of min-count should be less than or equal to value of max-count.')
- if int(node_count) < int(min_count) or int(node_count) > int(max_count):
- raise CLIError("current node count '{}' is not in the range of min-count and max-count.".format(node_count))
if enable_cluster_autoscaler:
if instance.agent_pool_profiles[0].enable_auto_scaling:
@@ -1248,7 +1237,8 @@ def aks_update(cmd, # pylint: disable=too-many-statements,too-many-branches,
if aad_admin_group_object_ids is not None:
instance.aad_profile.admin_group_object_ids = _parse_comma_separated_list(aad_admin_group_object_ids)
- return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, name, instance)
+ headers = get_aks_custom_headers(aks_custom_headers)
+ return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, name, instance, custom_headers=headers)
def aks_show(cmd, client, resource_group_name, name): # pylint: disable=unused-argument
@@ -1416,7 +1406,7 @@ def aks_kollect(cmd, # pylint: disable=too-many-statements,too-many-locals
sas_token = sas_token.strip('?')
deployment_yaml = urlopen(
- "https://raw.githubusercontent.com/Azure/aks-periscope/v0.2/deployment/aks-periscope.yaml").read().decode()
+ "https://raw.githubusercontent.com/Azure/aks-periscope/latest/deployment/aks-periscope.yaml").read().decode()
deployment_yaml = deployment_yaml.replace("# ",
(base64.b64encode(bytes(storage_account_name, 'ascii'))).decode('ascii'))
deployment_yaml = deployment_yaml.replace("# ",
@@ -1963,7 +1953,7 @@ def _check_cluster_autoscaler_flag(enable_cluster_autoscaler,
agent_pool_profile):
if enable_cluster_autoscaler:
if min_count is None or max_count is None:
- raise CLIError('Please specifying both min-count and max-count when --enable-cluster-autoscaler enabled')
+ raise CLIError('Please specify both min-count and max-count when --enable-cluster-autoscaler enabled')
if int(min_count) > int(max_count):
raise CLIError('value of min-count should be less than or equal to value of max-count')
if int(node_count) < int(min_count) or int(node_count) > int(max_count):
@@ -2075,6 +2065,7 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local
spot_max_price=float('nan'),
labels=None,
mode="User",
+ aks_custom_headers=None,
no_wait=False):
instances = client.list(resource_group_name, cluster_name)
for agentpool_profile in instances:
@@ -2128,7 +2119,8 @@ def aks_agentpool_add(cmd, # pylint: disable=unused-argument,too-many-local
if node_osdisk_size:
agent_pool.os_disk_size_gb = int(node_osdisk_size)
- return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, agent_pool)
+ headers = get_aks_custom_headers(aks_custom_headers)
+ return sdk_no_wait(no_wait, client.create_or_update, resource_group_name, cluster_name, nodepool_name, agent_pool, custom_headers=headers)
def aks_agentpool_scale(cmd, # pylint: disable=unused-argument
@@ -2183,17 +2175,14 @@ def aks_agentpool_update(cmd, # pylint: disable=unused-argument
'"--tags" or "--mode"')
instance = client.get(resource_group_name, cluster_name, nodepool_name)
- node_count = instance.count
if min_count is None or max_count is None:
if enable_cluster_autoscaler or update_cluster_autoscaler:
- raise CLIError('Please specifying both min-count and max-count when --enable-cluster-autoscaler or '
+ raise CLIError('Please specify both min-count and max-count when --enable-cluster-autoscaler or '
'--update-cluster-autoscaler set.')
if min_count is not None and max_count is not None:
if int(min_count) > int(max_count):
raise CLIError('value of min-count should be less than or equal to value of max-count.')
- if int(node_count) < int(min_count) or int(node_count) > int(max_count):
- raise CLIError("current node count '{}' is not in the range of min-count and max-count.".format(node_count))
if enable_cluster_autoscaler:
if instance.enable_auto_scaling:
@@ -2684,3 +2673,15 @@ def format_bright(msg):
def format_hyperlink(the_link):
return f'\033[1m{colorama.Style.BRIGHT}{colorama.Fore.BLUE}{the_link}{colorama.Style.RESET_ALL}'
+
+
+def get_aks_custom_headers(aks_custom_headers=None):
+ headers = {}
+ if aks_custom_headers is not None:
+ if aks_custom_headers != "":
+ for pair in aks_custom_headers.split(','):
+ parts = pair.split('=')
+ if len(parts) != 2:
+ raise CLIError('custom headers format is incorrect')
+ headers[parts[0]] = parts[1]
+ return headers
diff --git a/src/aks-preview/setup.py b/src/aks-preview/setup.py
index 41999f613e5..7acb3a823c0 100644
--- a/src/aks-preview/setup.py
+++ b/src/aks-preview/setup.py
@@ -8,7 +8,7 @@
from codecs import open as open1
from setuptools import setup, find_packages
-VERSION = "0.4.43"
+VERSION = "0.4.45"
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
diff --git a/src/application-insights/HISTORY.rst b/src/application-insights/HISTORY.rst
index f45725c5d5e..1e27d7f2521 100644
--- a/src/application-insights/HISTORY.rst
+++ b/src/application-insights/HISTORY.rst
@@ -1,3 +1,11 @@
+0.1.7
+++++++++++++++++++
+
+* support linked storage account for application insights component.
+* support link one log analytics workspace to application insights component.
+* support setting public network access for application insights component.
+* one fix for api-key creation.
+
0.1.6
++++++++++++++++++
diff --git a/src/application-insights/azext_applicationinsights/_client_factory.py b/src/application-insights/azext_applicationinsights/_client_factory.py
index ba29ec88ce1..1b1a6d58eec 100644
--- a/src/application-insights/azext_applicationinsights/_client_factory.py
+++ b/src/application-insights/azext_applicationinsights/_client_factory.py
@@ -36,7 +36,7 @@ def cf_events(cli_ctx, _):
def cf_components(cli_ctx, _):
- return applicationinsights_mgmt_plane_client(cli_ctx).components
+ return applicationinsights_mgmt_plane_client(cli_ctx, api_version='2018-05-01-preview').components
def cf_component_billing(cli_ctx, _):
@@ -45,3 +45,7 @@ def cf_component_billing(cli_ctx, _):
def cf_api_key(cli_ctx, _):
return applicationinsights_mgmt_plane_client(cli_ctx).api_keys
+
+
+def cf_component_linked_storage_accounts(cli_ctx, _):
+ return applicationinsights_mgmt_plane_client(cli_ctx).component_linked_storage_accounts
diff --git a/src/application-insights/azext_applicationinsights/_help.py b/src/application-insights/azext_applicationinsights/_help.py
index 044f2a6d78b..7bd517b7f1b 100644
--- a/src/application-insights/azext_applicationinsights/_help.py
+++ b/src/application-insights/azext_applicationinsights/_help.py
@@ -242,3 +242,28 @@
text: |
az monitor app-insights events show --app 578f0e27-12e9-4631-bc02-50b965da2633 --type availabilityResults --offset 24h
"""
+
+helps['monitor app-insights component linked-storage'] = """
+ type: group
+ short-summary: Manage linked storage account for an Application Insights component.
+"""
+
+helps['monitor app-insights component linked-storage show'] = """
+ type: command
+ short-summary: Show the details of linked storage account for an Application Insights component.
+"""
+
+helps['monitor app-insights component linked-storage link'] = """
+ type: command
+ short-summary: Link a storage account with an Application Insights component.
+"""
+
+helps['monitor app-insights component linked-storage update'] = """
+ type: command
+ short-summary: Update the linked storage account for an Application Insights component.
+"""
+
+helps['monitor app-insights component linked-storage unlink'] = """
+ type: command
+ short-summary: Unlink a storage account with an Application Insights component.
+"""
diff --git a/src/application-insights/azext_applicationinsights/_params.py b/src/application-insights/azext_applicationinsights/_params.py
index d4965f0e96a..8cc27377630 100644
--- a/src/application-insights/azext_applicationinsights/_params.py
+++ b/src/application-insights/azext_applicationinsights/_params.py
@@ -3,10 +3,10 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
-# pylint: disable=line-too-long
-from azure.cli.core.commands.parameters import get_datetime_type, get_location_type, tags_type, get_three_state_flag
+# pylint: disable=line-too-long, too-many-statements
+from azure.cli.core.commands.parameters import get_datetime_type, get_location_type, tags_type, get_three_state_flag, get_enum_type
from azure.cli.command_modules.monitor.actions import get_period_type
-from ._validators import validate_applications
+from ._validators import validate_applications, validate_storage_account_name_or_id, validate_log_analytic_workspace_name_or_id
def load_arguments(self, _):
@@ -24,6 +24,15 @@ def load_arguments(self, _):
c.argument('application-type', options_list=['application-type', '--type', '-t'], help="Type of application being monitored. Possible values include: 'web', 'other'. Default value: 'web' .")
c.argument('kind', options_list=['--kind', '-k'], help='The kind of application that this component refers to, used to customize UI. This value is a freeform string, values should typically be one of the following: web, ios, other, store, java, phone.')
+ with self.argument_context('monitor app-insights component') as c:
+ c.argument('workspace_resource_id', options_list=['--workspace'], validator=validate_log_analytic_workspace_name_or_id,
+ help='Name or resource ID of a log analytics workspace')
+ from .vendored_sdks.mgmt_applicationinsights.models import PublicNetworkAccessType
+ c.argument('public_network_access_for_ingestion', options_list=['--ingestion-access'], help='The public network access type for accessing Application Insights ingestion.',
+ arg_type=get_enum_type(PublicNetworkAccessType))
+ c.argument('public_network_access_for_query', options_list=['--query-access'], help='The public network access type for accessing Application Insights query.',
+ arg_type=get_enum_type(PublicNetworkAccessType))
+
with self.argument_context('monitor app-insights component update-tags') as c:
c.argument('tags', tags_type)
@@ -65,3 +74,7 @@ def load_arguments(self, _):
c.argument('start_time', arg_type=get_datetime_type(help='Start-time of time range for which to retrieve data.'))
c.argument('end_time', arg_type=get_datetime_type(help='End of time range for current operation. Defaults to the current time.'))
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 component linked-storage') as c:
+ c.argument('storage_account_id', options_list=['--storage-account', '-s'], validator=validate_storage_account_name_or_id,
+ help='Name or ID of a linked storage account.')
diff --git a/src/application-insights/azext_applicationinsights/_validators.py b/src/application-insights/azext_applicationinsights/_validators.py
index 1b9fbebff67..a41f07163ee 100644
--- a/src/application-insights/azext_applicationinsights/_validators.py
+++ b/src/application-insights/azext_applicationinsights/_validators.py
@@ -16,3 +16,31 @@ def validate_applications(namespace):
raise CLIError("Specify either a full resource id or an application name and resource group.")
else:
raise CLIError("Resource group only allowed with a single application name.")
+
+
+def validate_storage_account_name_or_id(cmd, namespace):
+ if namespace.storage_account_id:
+ from msrestazure.tools import resource_id
+ from azure.cli.core.commands.client_factory import get_subscription_id
+ if not is_valid_resource_id(namespace.storage_account_id):
+ namespace.storage_account_id = resource_id(
+ subscription=get_subscription_id(cmd.cli_ctx),
+ resource_group=namespace.resource_group_name,
+ namespace='Microsoft.Storage',
+ type='storageAccounts',
+ name=namespace.storage_account_id
+ )
+
+
+def validate_log_analytic_workspace_name_or_id(cmd, namespace):
+ if namespace.workspace_resource_id:
+ from msrestazure.tools import resource_id
+ from azure.cli.core.commands.client_factory import get_subscription_id
+ if not is_valid_resource_id(namespace.workspace_resource_id):
+ namespace.workspace_resource_id = resource_id(
+ subscription=get_subscription_id(cmd.cli_ctx),
+ resource_group=namespace.resource_group_name,
+ namespace='microsoft.OperationalInsights',
+ type='workspaces',
+ name=namespace.workspace_resource_id
+ )
diff --git a/src/application-insights/azext_applicationinsights/commands.py b/src/application-insights/azext_applicationinsights/commands.py
index af8384faa65..ba1fcce2faa 100644
--- a/src/application-insights/azext_applicationinsights/commands.py
+++ b/src/application-insights/azext_applicationinsights/commands.py
@@ -13,7 +13,8 @@
cf_query,
cf_components,
cf_api_key,
- cf_component_billing
+ cf_component_billing,
+ cf_component_linked_storage_accounts
)
@@ -63,6 +64,11 @@ def load_command_table(self, _):
client_factory=cf_api_key
)
+ component_linked_storage_accounts_custom_sdk = CliCommandType(
+ operations_tmpl='azext_applicationinsights.custom#{}',
+ client_factory=cf_component_linked_storage_accounts
+ )
+
with self.command_group('monitor app-insights component', command_type=components_sdk, custom_command_type=components_custom_sdk) as g:
g.custom_command('create', 'create_or_update_component')
g.custom_command('update', 'update_component')
@@ -88,3 +94,9 @@ def load_command_table(self, _):
with self.command_group('monitor app-insights', query_sdk) as g:
g.custom_command('query', 'execute_query')
+
+ with self.command_group('monitor app-insights component linked-storage', custom_command_type=component_linked_storage_accounts_custom_sdk) as g:
+ g.custom_show_command('show', 'get_component_linked_storage_account')
+ g.custom_command('link', 'create_component_linked_storage_account')
+ g.custom_command('update', 'update_component_linked_storage_account')
+ g.custom_command('unlink', 'delete_component_linked_storage_account')
diff --git a/src/application-insights/azext_applicationinsights/custom.py b/src/application-insights/azext_applicationinsights/custom.py
index 34e7106ebed..d9a2536f280 100644
--- a/src/application-insights/azext_applicationinsights/custom.py
+++ b/src/application-insights/azext_applicationinsights/custom.py
@@ -3,14 +3,16 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
-# pylint: disable=line-too-long
+# pylint: disable=line-too-long, protected-access
from knack.util import CLIError
from knack.log import get_logger
from azext_applicationinsights.vendored_sdks.applicationinsights.models import ErrorResponseException
+from msrestazure.azure_exceptions import CloudError
from .util import get_id_from_azure_resource, get_query_targets, get_timespan, get_linked_properties
logger = get_logger(__name__)
+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):
@@ -40,17 +42,59 @@ 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 create_or_update_component(client, application, resource_group_name, location, tags=None, kind="web", application_type='web'):
- from .vendored_sdks.mgmt_applicationinsights.models import ApplicationInsightsComponent
- component = ApplicationInsightsComponent(location, kind, application_type=application_type, tags=tags)
- return client.create_or_update(resource_group_name, application, component)
+def create_or_update_component(cmd, client, application, resource_group_name, location, tags=None,
+ kind="web", application_type='web', workspace_resource_id=None,
+ public_network_access_for_ingestion=None, public_network_access_for_query=None):
+ # due to service limitation, we have to do such a hack. We must refract the logic later.
+ if workspace_resource_id is None:
+ from .vendored_sdks.mgmt_applicationinsights.v2018_05_01_preview.models import ApplicationInsightsComponent
+ component = ApplicationInsightsComponent(location=location, kind=kind, application_type=application_type, tags=tags,
+ public_network_access_for_ingestion=public_network_access_for_ingestion,
+ public_network_access_for_query=public_network_access_for_query)
+ return client.create_or_update(resource_group_name, application, component)
+
+ from .vendored_sdks.mgmt_applicationinsights.v2020_02_02_preview.models import ApplicationInsightsComponent
+ component = ApplicationInsightsComponent(location=location, kind=kind, application_type=application_type,
+ tags=tags, workspace_resource_id=workspace_resource_id,
+ public_network_access_for_ingestion=public_network_access_for_ingestion,
+ public_network_access_for_query=public_network_access_for_query)
+ from ._client_factory import applicationinsights_mgmt_plane_client
+ client = applicationinsights_mgmt_plane_client(cmd.cli_ctx, api_version='2020-02-02-preview').components
+ try:
+ return client.create_or_update(resource_group_name, application, component)
+ except CloudError as ex:
+ ex.error._message = ex.error._message + HELP_MESSAGE
+ raise ex
-def update_component(client, application, resource_group_name, kind=None):
- existing_component = client.get(resource_group_name, application)
+def update_component(cmd, client, application, resource_group_name, kind=None, workspace_resource_id=None,
+ public_network_access_for_ingestion=None, public_network_access_for_query=None):
+ from ._client_factory import applicationinsights_mgmt_plane_client
+ existing_component = None
+ if workspace_resource_id is not None:
+ latest_client = applicationinsights_mgmt_plane_client(cmd.cli_ctx, api_version='2020-02-02-preview').components
+ try:
+ existing_component = latest_client.get(resource_group_name, application)
+ except CloudError as ex:
+ ex.error._message = ex.error._message + HELP_MESSAGE
+ raise ex
+ existing_component.workspace_resource_id = workspace_resource_id or None
+ else:
+ existing_component = client.get(resource_group_name, application)
if kind:
existing_component.kind = kind
- return client.create_or_update(resource_group_name, application, existing_component)
+ if public_network_access_for_ingestion is not None:
+ existing_component.public_network_access_for_ingestion = public_network_access_for_ingestion
+ if public_network_access_for_query is not None:
+ existing_component.public_network_access_for_query = public_network_access_for_query
+
+ if hasattr(existing_component, 'workspace_resource_id') and existing_component.workspace_resource_id is not None:
+ client = applicationinsights_mgmt_plane_client(cmd.cli_ctx, api_version='2020-02-02-preview').components
+ return client.create_or_update(resource_group_name, application, existing_component)
+
+ from .vendored_sdks.mgmt_applicationinsights.v2018_05_01_preview.models import ApplicationInsightsComponent
+ component = ApplicationInsightsComponent(**(vars(existing_component)))
+ return client.create_or_update(resource_group_name, application, component)
def update_component_tags(client, application, resource_group_name, tags):
@@ -61,10 +105,17 @@ def get_component(client, application, resource_group_name):
return client.get(resource_group_name, application)
-def show_components(client, application=None, resource_group_name=None):
+def show_components(cmd, client, application=None, resource_group_name=None):
+ from ._client_factory import applicationinsights_mgmt_plane_client
if application:
if resource_group_name:
- return client.get(resource_group_name, application)
+ latest_client = applicationinsights_mgmt_plane_client(cmd.cli_ctx,
+ api_version='2020-02-02-preview').components
+ try:
+ return latest_client.get(resource_group_name, application)
+ except CloudError:
+ logger.warning(HELP_MESSAGE)
+ return client.get(resource_group_name, application)
raise CLIError("Application provided without resource group. Either specify app with resource group, or remove app.")
if resource_group_name:
return client.list_by_resource_group(resource_group_name)
@@ -82,7 +133,9 @@ def create_api_key(cmd, client, application, resource_group_name, api_key, read_
if write_properties is None:
write_properties = ['WriteAnnotations']
linked_read_properties, linked_write_properties = get_linked_properties(cmd.cli_ctx, application, resource_group_name, read_properties, write_properties)
- api_key_request = APIKeyRequest(api_key, linked_read_properties, linked_write_properties)
+ api_key_request = APIKeyRequest(name=api_key,
+ linked_read_properties=linked_read_properties,
+ linked_write_properties=linked_write_properties)
return client.create(resource_group_name, application, api_key_request)
@@ -118,3 +171,19 @@ def update_component_billing(client, application, resource_group_name, cap=None,
resource_name=application,
data_volume_cap=billing_features.data_volume_cap,
current_billing_features=billing_features.current_billing_features)
+
+
+def get_component_linked_storage_account(client, resource_group_name, application):
+ return client.get(resource_group_name=resource_group_name, resource_name=application)
+
+
+def create_component_linked_storage_account(client, resource_group_name, application, storage_account_id):
+ return client.create_and_update(resource_group_name=resource_group_name, resource_name=application, linked_storage_account=storage_account_id)
+
+
+def update_component_linked_storage_account(client, resource_group_name, application, storage_account_id):
+ return client.update(resource_group_name=resource_group_name, resource_name=application, linked_storage_account=storage_account_id)
+
+
+def delete_component_linked_storage_account(client, resource_group_name, application):
+ return client.delete(resource_group_name=resource_group_name, resource_name=application)
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_api_key.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_api_key.yaml
index 0bfa1baf516..01c0a19a671 100644
--- a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_api_key.yaml
+++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_api_key.yaml
@@ -1,7 +1,8 @@
interactions:
- request:
body: '{"location": "westus", "kind": "web", "properties": {"Application_Type":
- "web", "Flow_Type": "Bluefield", "Request_Source": "rest"}}'
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
+ 90}}'
headers:
Accept:
- application/json
@@ -12,32 +13,32 @@ interactions:
Connection:
- keep-alive
Content-Length:
- - '132'
+ - '155'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --app --location --kind -g --application-type
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
response:
body:
- string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"91001882-0000-0700-0000-5e54c0970000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"13cc755b-0ba4-4259-bb7a-5426dfb5b666","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"6a4bf3ad-4167-42de-b2e7-0baecf5b95a0","ConnectionString":"InstrumentationKey=6a4bf3ad-4167-42de-b2e7-0baecf5b95a0","Name":"demoApp","CreationDate":"2020-02-25T06:37:11.9695313+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null}}'
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"0800841c-0000-0700-0000-5ea2593e0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"5a7cdf10-6b7e-4f29-b41e-545309ec2a09","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"fa2f0e5b-bf95-42fa-8e90-ba1ea72adb40","ConnectionString":"InstrumentationKey=fa2f0e5b-bf95-42fa-8e90-ba1ea72adb40","Name":"demoApp","CreationDate":"2020-04-24T03:13:02.8547884+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- - '833'
+ - '957'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:37:16 GMT
+ - Fri, 24 Apr 2020 03:13:05 GMT
expires:
- '-1'
pragma:
@@ -55,7 +56,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- - '1199'
+ - '1197'
x-powered-by:
- ASP.NET
status:
@@ -81,16 +82,16 @@ interactions:
ParameterSetName:
- --app -g --api-key
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: POST
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/ApiKeys?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/ApiKeys?api-version=2015-05-01
response:
body:
- string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/3b4ab45d-11e3-4e30-b640-d156f12cde5f","name":"demoKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"apiKey":"0kflfmtdga2ztfecwq3er77281slb15ds5tqdzhn","createdDate":"Tue,
- 25 Feb 2020 06:37:19 GMT","integrationType":null,"integrationProperty":null}'
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/33d84fd7-1aa2-4626-8f54-07a2a7f625c3","name":"demoKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"apiKey":"hr0zj8fh1noyasqjf65j5jv8g2qnx7bdbb4t4rnm","createdDate":"Fri,
+ 24 Apr 2020 03:13:08 GMT","integrationType":null,"integrationProperty":null}'
headers:
access-control-expose-headers:
- Request-Context
@@ -101,7 +102,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:37:19 GMT
+ - Fri, 24 Apr 2020 03:13:07 GMT
expires:
- '-1'
pragma:
@@ -134,21 +135,19 @@ interactions:
- monitor app-insights api-key show
Connection:
- keep-alive
- Content-Type:
- - application/json; charset=utf-8
ParameterSetName:
- --app -g --api-key
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/ApiKeys?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/ApiKeys?api-version=2015-05-01
response:
body:
- string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/3b4ab45d-11e3-4e30-b640-d156f12cde5f","name":"demoKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Tue,
- 25 Feb 2020 06:37:19 GMT","integrationType":null,"integrationProperty":null}]}'
+ string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/33d84fd7-1aa2-4626-8f54-07a2a7f625c3","name":"demoKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Fri,
+ 24 Apr 2020 03:13:08 GMT","integrationType":null,"integrationProperty":null}]}'
headers:
access-control-expose-headers:
- Request-Context
@@ -159,7 +158,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:37:20 GMT
+ - Fri, 24 Apr 2020 03:13:10 GMT
expires:
- '-1'
pragma:
@@ -199,16 +198,16 @@ interactions:
ParameterSetName:
- --app -g --api-key
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: POST
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/ApiKeys?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/ApiKeys?api-version=2015-05-01
response:
body:
- string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/ec78280f-11d8-46b7-b587-ee1789e8c63a","name":"otherKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"apiKey":"sojhjt3f7fr0xz0lbwrw6ih0u58pb1ncd1ltft2j","createdDate":"Tue,
- 25 Feb 2020 06:37:24 GMT","integrationType":null,"integrationProperty":null}'
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/49870748-bf6a-4841-86de-09bf586c709d","name":"otherKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"apiKey":"wcffbrl38wmkgq4lp2mfrkb6aki76t8hmz6gcz0f","createdDate":"Fri,
+ 24 Apr 2020 03:13:13 GMT","integrationType":null,"integrationProperty":null}'
headers:
access-control-expose-headers:
- Request-Context
@@ -219,7 +218,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:37:23 GMT
+ - Fri, 24 Apr 2020 03:13:12 GMT
expires:
- '-1'
pragma:
@@ -242,43 +241,104 @@ interactions:
code: 200
message: OK
- request:
- body: null
+ body: 'b''{"name": "emptyKey", "linkedReadProperties": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api",
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],
+ "linkedWriteProperties": []}'''
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- - monitor app-insights api-key show
+ - monitor app-insights api-key create
Connection:
- keep-alive
+ Content-Length:
+ - '479'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
+ - --app -g --api-key --write-properties
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: POST
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/ApiKeys?api-version=2015-05-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/0101d573-96ad-49bd-b8bb-bfc810a6a7f8","name":"emptyKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":[],"apiKey":"lrdm01sidli8s1c22vj87vhz5wdew70x0kcxpnm7","createdDate":"Fri,
+ 24 Apr 2020 03:13:16 GMT","integrationType":null,"integrationProperty":null}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '864'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Fri, 24 Apr 2020 03:13:16 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights api-key show
+ Connection:
+ - keep-alive
+ ParameterSetName:
- --app -g
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/ApiKeys?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/ApiKeys?api-version=2015-05-01
response:
body:
- string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/ec78280f-11d8-46b7-b587-ee1789e8c63a","name":"otherKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Tue,
- 25 Feb 2020 06:37:24 GMT","integrationType":null,"integrationProperty":null},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/3b4ab45d-11e3-4e30-b640-d156f12cde5f","name":"demoKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Tue,
- 25 Feb 2020 06:37:19 GMT","integrationType":null,"integrationProperty":null}]}'
+ string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/0101d573-96ad-49bd-b8bb-bfc810a6a7f8","name":"emptyKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":[],"createdDate":"Fri,
+ 24 Apr 2020 03:13:16 GMT","integrationType":null,"integrationProperty":null},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/49870748-bf6a-4841-86de-09bf586c709d","name":"otherKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Fri,
+ 24 Apr 2020 03:13:13 GMT","integrationType":null,"integrationProperty":null},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/33d84fd7-1aa2-4626-8f54-07a2a7f625c3","name":"demoKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Fri,
+ 24 Apr 2020 03:13:08 GMT","integrationType":null,"integrationProperty":null}]}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- - '3662'
+ - '5284'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:37:25 GMT
+ - Fri, 24 Apr 2020 03:13:18 GMT
expires:
- '-1'
pragma:
@@ -309,33 +369,32 @@ interactions:
- monitor app-insights api-key delete
Connection:
- keep-alive
- Content-Type:
- - application/json; charset=utf-8
ParameterSetName:
- --app -g --api-key
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/ApiKeys?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/ApiKeys?api-version=2015-05-01
response:
body:
- string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/ec78280f-11d8-46b7-b587-ee1789e8c63a","name":"otherKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Tue,
- 25 Feb 2020 06:37:24 GMT","integrationType":null,"integrationProperty":null},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/3b4ab45d-11e3-4e30-b640-d156f12cde5f","name":"demoKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Tue,
- 25 Feb 2020 06:37:19 GMT","integrationType":null,"integrationProperty":null}]}'
+ string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/0101d573-96ad-49bd-b8bb-bfc810a6a7f8","name":"emptyKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":[],"createdDate":"Fri,
+ 24 Apr 2020 03:13:16 GMT","integrationType":null,"integrationProperty":null},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/49870748-bf6a-4841-86de-09bf586c709d","name":"otherKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Fri,
+ 24 Apr 2020 03:13:13 GMT","integrationType":null,"integrationProperty":null},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/33d84fd7-1aa2-4626-8f54-07a2a7f625c3","name":"demoKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Fri,
+ 24 Apr 2020 03:13:08 GMT","integrationType":null,"integrationProperty":null}]}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- - '3662'
+ - '5284'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:37:27 GMT
+ - Fri, 24 Apr 2020 03:13:20 GMT
expires:
- '-1'
pragma:
@@ -368,21 +427,19 @@ interactions:
- keep-alive
Content-Length:
- '0'
- Content-Type:
- - application/json; charset=utf-8
ParameterSetName:
- --app -g --api-key
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: DELETE
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/APIKeys/ec78280f-11d8-46b7-b587-ee1789e8c63a?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/APIKeys/49870748-bf6a-4841-86de-09bf586c709d?api-version=2015-05-01
response:
body:
- string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/ec78280f-11d8-46b7-b587-ee1789e8c63a","name":"otherKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Tue,
- 25 Feb 2020 06:37:24 GMT","integrationType":null,"integrationProperty":null}'
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/apikeys/49870748-bf6a-4841-86de-09bf586c709d","name":"otherKey","linkedReadProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/api","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/draft","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/extendqueries","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/search","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/aggregate","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/agentconfig"],"linkedWriteProperties":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/annotations"],"createdDate":"Fri,
+ 24 Apr 2020 03:13:13 GMT","integrationType":null,"integrationProperty":null}'
headers:
access-control-expose-headers:
- Request-Context
@@ -393,7 +450,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:37:29 GMT
+ - Fri, 24 Apr 2020 03:13:21 GMT
expires:
- '-1'
pragma:
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component.yaml
index bdb83e71408..dadd83825fe 100644
--- a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component.yaml
+++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component.yaml
@@ -1,7 +1,8 @@
interactions:
- request:
body: '{"location": "westus", "kind": "web", "properties": {"Application_Type":
- "web", "Flow_Type": "Bluefield", "Request_Source": "rest"}}'
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
+ 90}}'
headers:
Accept:
- application/json
@@ -12,32 +13,32 @@ interactions:
Connection:
- keep-alive
Content-Length:
- - '132'
+ - '155'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --app --location --kind -g --application-type
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
response:
body:
- string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"9100fa8e-0000-0700-0000-5e54c2440000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"de019f91-2846-48f1-95e6-c810b1874a3a","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"2d696d25-dd09-4385-86bb-2aff20723016","ConnectionString":"InstrumentationKey=2d696d25-dd09-4385-86bb-2aff20723016","Name":"demoApp","CreationDate":"2020-02-25T06:44:20.0141188+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null}}'
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"070084f6-0000-0700-0000-5ea256a90000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a7aa35f1-c96a-4ee9-82a4-eafae4ef2f18","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","ConnectionString":"InstrumentationKey=d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","Name":"demoApp","CreationDate":"2020-04-24T03:02:01.0980307+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- - '833'
+ - '957'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:44:21 GMT
+ - Fri, 24 Apr 2020 03:02:02 GMT
expires:
- '-1'
pragma:
@@ -72,31 +73,29 @@ interactions:
- monitor app-insights component billing show
Connection:
- keep-alive
- Content-Type:
- - application/json; charset=utf-8
ParameterSetName:
- --app -g
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/currentbillingfeatures?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/currentbillingfeatures?api-version=2015-05-01
response:
body:
- string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":100.0,"MaxHistoryCap":1000.0,"ResetTime":0,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"2018-04-02T13:00:00+00:00"}'
+ string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":100.0,"MaxHistoryCap":1000.0,"ResetTime":5,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"9999-12-31T23:59:59.9999999+00:00"}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- - '247'
+ - '255'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:44:25 GMT
+ - Fri, 24 Apr 2020 03:02:09 GMT
expires:
- '-1'
pragma:
@@ -129,31 +128,29 @@ interactions:
- monitor app-insights component billing update
Connection:
- keep-alive
- Content-Type:
- - application/json; charset=utf-8
ParameterSetName:
- --app -g --cap -s
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/currentbillingfeatures?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/currentbillingfeatures?api-version=2015-05-01
response:
body:
- string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":100.0,"MaxHistoryCap":1000.0,"ResetTime":0,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"2018-04-02T13:00:00+00:00"}'
+ string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":100.0,"MaxHistoryCap":1000.0,"ResetTime":5,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":false},"EndTime":"9999-12-31T23:59:59.9999999+00:00"}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- - '247'
+ - '255'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:44:27 GMT
+ - Fri, 24 Apr 2020 03:02:12 GMT
expires:
- '-1'
pragma:
@@ -194,12 +191,12 @@ interactions:
ParameterSetName:
- --app -g --cap -s
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/currentbillingfeatures?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp/currentbillingfeatures?api-version=2015-05-01
response:
body:
string: '{"CurrentBillingFeatures":["Basic"],"DataVolumeCap":{"Cap":200.0,"MaxHistoryCap":1000.0,"ResetTime":0,"WarningThreshold":90,"StopSendNotificationWhenHitThreshold":false,"StopSendNotificationWhenHitCap":true}}'
@@ -213,7 +210,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:44:34 GMT
+ - Fri, 24 Apr 2020 03:02:15 GMT
expires:
- '-1'
pragma:
@@ -231,7 +228,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- - '1199'
+ - '1198'
x-powered-by:
- ASP.NET
status:
@@ -248,31 +245,29 @@ interactions:
- monitor app-insights component update
Connection:
- keep-alive
- Content-Type:
- - application/json; charset=utf-8
ParameterSetName:
- --app --kind -g
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
response:
body:
- string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"9100fa8e-0000-0700-0000-5e54c2440000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"de019f91-2846-48f1-95e6-c810b1874a3a","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"2d696d25-dd09-4385-86bb-2aff20723016","ConnectionString":"InstrumentationKey=2d696d25-dd09-4385-86bb-2aff20723016","Name":"demoApp","CreationDate":"2020-02-25T06:44:20.0141188+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null}}'
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"070084f6-0000-0700-0000-5ea256a90000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a7aa35f1-c96a-4ee9-82a4-eafae4ef2f18","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","ConnectionString":"InstrumentationKey=d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","Name":"demoApp","CreationDate":"2020-04-24T03:02:01.0980307+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- - '833'
+ - '957'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:44:36 GMT
+ - Fri, 24 Apr 2020 03:02:17 GMT
expires:
- '-1'
pragma:
@@ -296,7 +291,9 @@ interactions:
message: OK
- request:
body: '{"location": "westus", "tags": {}, "kind": "ios", "properties": {"Application_Type":
- "web", "Flow_Type": "Bluefield", "Request_Source": "rest"}}'
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
+ 90, "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery":
+ "Enabled"}}'
headers:
Accept:
- application/json
@@ -307,32 +304,32 @@ interactions:
Connection:
- keep-alive
Content-Length:
- - '144'
+ - '255'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --app --kind -g
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
response:
body:
- string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"91009c8f-0000-0700-0000-5e54c2570000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"de019f91-2846-48f1-95e6-c810b1874a3a","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"2d696d25-dd09-4385-86bb-2aff20723016","ConnectionString":"InstrumentationKey=2d696d25-dd09-4385-86bb-2aff20723016","Name":"demoApp","CreationDate":"2020-02-25T06:44:20.0141188+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null}}'
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"07000ef8-0000-0700-0000-5ea256bc0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"a7aa35f1-c96a-4ee9-82a4-eafae4ef2f18","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","ConnectionString":"InstrumentationKey=d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","Name":"demoApp","CreationDate":"2020-04-24T03:02:01.0980307+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- - '833'
+ - '957'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:44:42 GMT
+ - Fri, 24 Apr 2020 03:02:24 GMT
expires:
- '-1'
pragma:
@@ -350,7 +347,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- - '1197'
+ - '1199'
x-powered-by:
- ASP.NET
status:
@@ -358,7 +355,8 @@ interactions:
message: OK
- request:
body: '{"location": "westus", "kind": "ios", "properties": {"Application_Type":
- "web", "Flow_Type": "Bluefield", "Request_Source": "rest"}}'
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
+ 90}}'
headers:
Accept:
- application/json
@@ -369,32 +367,32 @@ interactions:
Connection:
- keep-alive
Content-Length:
- - '132'
+ - '155'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --app --location --kind -g --application-type
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2018-05-01-preview
response:
body:
- string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"9100d58f-0000-0700-0000-5e54c25f0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"1460163c-e0b2-426c-817c-0e5a8c8c44d9","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"c2211cfa-2a95-4fcd-b6bf-53f8430f53a1","ConnectionString":"InstrumentationKey=c2211cfa-2a95-4fcd-b6bf-53f8430f53a1","Name":"testApp","CreationDate":"2020-02-25T06:44:47.0858616+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null}}'
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"0700a8f8-0000-0700-0000-5ea256c50000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"132039a5-8267-47d8-994a-1c95b97a2981","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"46097bff-27ec-47a7-80bd-cf87f3a564c6","ConnectionString":"InstrumentationKey=46097bff-27ec-47a7-80bd-cf87f3a564c6","Name":"testApp","CreationDate":"2020-04-24T03:02:29.8415209+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- - '833'
+ - '957'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:44:48 GMT
+ - Fri, 24 Apr 2020 03:02:31 GMT
expires:
- '-1'
pragma:
@@ -412,7 +410,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- - '1199'
+ - '1198'
x-powered-by:
- ASP.NET
status:
@@ -429,29 +427,27 @@ interactions:
- monitor app-insights component show
Connection:
- keep-alive
- Content-Type:
- - application/json; charset=utf-8
ParameterSetName:
- -g
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components?api-version=2018-05-01-preview
response:
body:
- string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"91009c8f-0000-0700-0000-5e54c2570000\"","properties":{"ApplicationId":"demoApp","AppId":"de019f91-2846-48f1-95e6-c810b1874a3a","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"2d696d25-dd09-4385-86bb-2aff20723016","ConnectionString":"InstrumentationKey=2d696d25-dd09-4385-86bb-2aff20723016","Name":"demoApp","CreationDate":"2020-02-25T06:44:20.0141188+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"9100d58f-0000-0700-0000-5e54c25f0000\"","properties":{"ApplicationId":"testApp","AppId":"1460163c-e0b2-426c-817c-0e5a8c8c44d9","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"c2211cfa-2a95-4fcd-b6bf-53f8430f53a1","ConnectionString":"InstrumentationKey=c2211cfa-2a95-4fcd-b6bf-53f8430f53a1","Name":"testApp","CreationDate":"2020-02-25T06:44:47.0858616+00:00","TenantId":"0b1f6471-1bf0-4dda-aec3-cb9272f09590","provisioningState":"Succeeded","SamplingPercentage":null}}]}'
+ string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"07000ef8-0000-0700-0000-5ea256bc0000\"","properties":{"ApplicationId":"demoApp","AppId":"a7aa35f1-c96a-4ee9-82a4-eafae4ef2f18","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","ConnectionString":"InstrumentationKey=d44e4479-7ed7-4798-82b8-b0ff8cdafeb0","Name":"demoApp","CreationDate":"2020-04-24T03:02:01.0980307+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"0700a8f8-0000-0700-0000-5ea256c50000\"","properties":{"ApplicationId":"testApp","AppId":"132039a5-8267-47d8-994a-1c95b97a2981","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"46097bff-27ec-47a7-80bd-cf87f3a564c6","ConnectionString":"InstrumentationKey=46097bff-27ec-47a7-80bd-cf87f3a564c6","Name":"testApp","CreationDate":"2020-04-24T03:02:29.8415209+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}]}'
headers:
cache-control:
- no-cache
content-length:
- - '1657'
+ - '1905'
content-type:
- application/json; charset=utf-8
date:
- - Tue, 25 Feb 2020 06:44:50 GMT
+ - Fri, 24 Apr 2020 03:02:33 GMT
expires:
- '-1'
pragma:
@@ -463,8 +459,115 @@ interactions:
x-content-type-options:
- nosniff
x-ms-original-request-ids:
- - 519849f5-579a-11ea-ba84-70bc107e5d50
- - 519849f5-579a-11ea-ba84-70bc107e5d50
+ - 0a473797-85d8-11ea-97c5-70bc107e5d50
+ - 0a473797-85d8-11ea-97c5-70bc107e5d50
+ 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:
+ - -g --app
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"error":{"code":"NoRegisteredProviderFound","message":"No registered
+ resource provider found for location ''westus'' and API version ''2020-02-02-preview''
+ for type ''components''. The supported api-versions are ''2014-04-01, 2014-08-01,
+ 2014-12-01-preview, 2015-05-01, 2018-05-01-preview''. The supported locations
+ are '', eastus, southcentralus, northeurope, westeurope, southeastasia, westus2,
+ uksouth, canadacentral, centralindia, japaneast, australiaeast, koreacentral,
+ francecentral, centralus, eastus2, eastasia, westus, southafricanorth, northcentralus,
+ brazilsouth, switzerlandnorth, australiasoutheast''."}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '608'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Fri, 24 Apr 2020 03:02:35 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-failure-cause:
+ - gateway
+ status:
+ code: 400
+ message: Bad Request
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component show
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g --app
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2018-05-01-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"0700a8f8-0000-0700-0000-5ea256c50000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"132039a5-8267-47d8-994a-1c95b97a2981","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"46097bff-27ec-47a7-80bd-cf87f3a564c6","ConnectionString":"InstrumentationKey=46097bff-27ec-47a7-80bd-cf87f3a564c6","Name":"testApp","CreationDate":"2020-04-24T03:02:29.8415209+00:00","TenantId":"114f01e8-de03-454a-ab74-723456e241cb","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '957'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Fri, 24 Apr 2020 03:02:36 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
status:
code: 200
message: OK
@@ -481,17 +584,15 @@ interactions:
- keep-alive
Content-Length:
- '0'
- Content-Type:
- - application/json; charset=utf-8
ParameterSetName:
- --app -g
User-Agent:
- - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.2
- azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python AZURECLI/2.1.0
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
accept-language:
- en-US
method: DELETE
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
response:
body:
string: ''
@@ -503,7 +604,7 @@ interactions:
content-length:
- '0'
date:
- - Tue, 25 Feb 2020 06:44:59 GMT
+ - Fri, 24 Apr 2020 03:02:43 GMT
expires:
- '-1'
pragma:
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_storage.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_storage.yaml
new file mode 100644
index 00000000000..4d0145920f1
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_storage.yaml
@@ -0,0 +1,525 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2019-07-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-04-27T08:29:38Z"},"properties":{"provisioningState":"Succeeded"}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '428'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:30:42 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "properties": {"sku": {"name": "PerGB2018"}, "retentionInDays":
+ 30}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '91'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"b62f4493-9090-4f5e-9f58-d4534318b46a\",\r\n \"provisioningState\": \"Creating\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 08:30:50 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Tue, 28 Apr 2020 07:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000004\",\r\n
+ \ \"name\": \"clitest000004\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1026'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 08:30:52 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1198'
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000004?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"b62f4493-9090-4f5e-9f58-d4534318b46a\",\r\n \"provisioningState\": \"Succeeded\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 08:30:50 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Tue, 28 Apr 2020 07:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000004\",\r\n
+ \ \"name\": \"clitest000004\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1027'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 08:31:24 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: 'b''{"location": "westus", "kind": "web", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "WorkspaceResourceId":
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000004"}}'''
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '373'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --location --kind -g --workspace --application-type
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"1900a607-0000-0700-0000-5ea698790000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"8c7760e8-1491-4215-91b9-e22e50f4ca31","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"70c408a2-1982-4e1f-a3c9-6eabf5a352e2","Name":"demoApp","CreationDate":"2020-04-27T08:31:53.5479888+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000004","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1079'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:31:56 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1197'
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: 'b''b\''{"properties": {"linkedStorageAccount": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/component000002"}}\'''''
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component linked-storage link
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '255'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app -g -s
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/serviceprofiler?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoapp/linkedstorageaccounts/serviceprofiler\",\r\n
+ \ \"name\": \"serviceprofiler\",\r\n \"type\": \"microsoft.insights/components/linkedstorageaccounts\",\r\n
+ \ \"properties\": {\r\n \"linkedStorageAccount\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/component000002\"\r\n
+ \ }\r\n}"
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '608'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:32:22 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1198'
+ 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 linked-storage show
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - --app -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/serviceprofiler?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoapp/linkedstorageaccounts/serviceprofiler\",\r\n
+ \ \"name\": \"serviceprofiler\",\r\n \"type\": \"microsoft.insights/components/linkedstorageaccounts\",\r\n
+ \ \"properties\": {\r\n \"linkedStorageAccount\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/component000002\"\r\n
+ \ }\r\n}"
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '608'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:32:26 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: 'b''b\''{"properties": {"linkedStorageAccount": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/component000003"}}\'''''
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component linked-storage update
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '255'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app -g -s
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PATCH
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/serviceprofiler?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.insights/components/demoapp/linkedstorageaccounts/serviceprofiler\",\r\n
+ \ \"name\": \"serviceprofiler\",\r\n \"type\": \"microsoft.insights/components/linkedstorageaccounts\",\r\n
+ \ \"properties\": {\r\n \"linkedStorageAccount\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/component000003\"\r\n
+ \ }\r\n}"
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '608'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:32:30 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1198'
+ 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 linked-storage unlink
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '0'
+ ParameterSetName:
+ - --app -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/serviceprofiler?api-version=2020-03-01-preview
+ response:
+ body:
+ string: ''
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '0'
+ date:
+ - Mon, 27 Apr 2020 08:32:34 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-deletes:
+ - '14999'
+ 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 linked-storage show
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - --app -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp/linkedStorageAccounts/serviceprofiler?api-version=2020-03-01-preview
+ response:
+ body:
+ string: 'null'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '4'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:32:38 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:7f83c1fe-8c94-4d55-9337-4ddc696f61ed
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 404
+ message: Not Found
+version: 1
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_workspace.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_workspace.yaml
new file mode 100644
index 00000000000..fe6a896e48b
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_linked_workspace.yaml
@@ -0,0 +1,946 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2019-07-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-04-27T08:22:57Z"},"properties":{"provisioningState":"Succeeded"}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '428'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:23:05 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "properties": {"sku": {"name": "PerGB2018"}, "retentionInDays":
+ 30}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '91'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000002?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"983849b5-158e-40d7-895e-cf64f78eedec\",\r\n \"provisioningState\": \"Creating\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 08:23:12 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Mon, 27 Apr 2020 16:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n
+ \ \"name\": \"clitest000002\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1026'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 08:23:13 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000002?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"983849b5-158e-40d7-895e-cf64f78eedec\",\r\n \"provisioningState\": \"Succeeded\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 08:23:12 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Mon, 27 Apr 2020 16:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n
+ \ \"name\": \"clitest000002\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1027'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 08:23:45 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2019-07-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-04-27T08:22:57Z"},"properties":{"provisioningState":"Succeeded"}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '428'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:23:47 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "properties": {"sku": {"name": "PerGB2018"}, "retentionInDays":
+ 30}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '91'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"bea273ee-b49e-4e3d-a012-5093204d0e6d\",\r\n \"provisioningState\": \"Creating\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 08:23:54 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Mon, 27 Apr 2020 10:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n
+ \ \"name\": \"clitest000003\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1026'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 08:23:55 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1198'
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"bea273ee-b49e-4e3d-a012-5093204d0e6d\",\r\n \"provisioningState\": \"Succeeded\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 08:23:54 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Mon, 27 Apr 2020 10:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n
+ \ \"name\": \"clitest000003\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1027'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 08:24:28 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "kind": "web", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
+ 90}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '155'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --location --kind -g --application-type
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"1800d0ff-0000-0700-0000-5ea696c50000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","ConnectionString":"InstrumentationKey=697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '957'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:24:40 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1198'
+ 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 update
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - --app --workspace -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"1800d0ff-0000-0700-0000-5ea696c50000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '880'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:24:43 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: 'b''{"location": "westus", "tags": {}, "kind": "web", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "WorkspaceResourceId":
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002",
+ "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery":
+ "Enabled"}}'''
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component update
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '473'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --workspace -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"1800faff-0000-0700-0000-5ea696cf0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1119'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:24:49 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1197'
+ 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 update
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - --app --workspace -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"1800faff-0000-0700-0000-5ea696cf0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1119'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:24:51 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: 'b''{"location": "westus", "tags": {}, "kind": "web", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "WorkspaceResourceId":
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003",
+ "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery":
+ "Enabled"}}'''
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component update
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '473'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --workspace -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"19002d00-0000-0700-0000-5ea696d60000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1119'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:24:56 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1198'
+ 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 update
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - --app --workspace --kind -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"19002d00-0000-0700-0000-5ea696d60000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1119'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:24:59 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: 'b''{"location": "westus", "tags": {}, "kind": "ios", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "WorkspaceResourceId":
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002",
+ "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery":
+ "Enabled"}}'''
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component update
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '473'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --workspace --kind -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"19007500-0000-0700-0000-5ea696ea0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"aea67cde-e179-42d5-b51f-efe4548c63c4","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"697eb707-a56f-4ae1-948a-478e3159d171","Name":"demoApp","CreationDate":"2020-04-27T08:24:37.8571823+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1119'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:25:19 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1198'
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: 'b''{"location": "westus", "kind": "ios", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "WorkspaceResourceId":
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003"}}'''
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '373'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --workspace --location --kind -g --application-type
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"19000801-0000-0700-0000-5ea6970b0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"6d710c63-8820-4729-b78c-8344fd5adce2","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","Name":"testApp","CreationDate":"2020-04-27T08:25:47.5261462+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1079'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:25:49 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ 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 update
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - --app --kind -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2018-05-01-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"19000801-0000-0700-0000-5ea6970b0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"6d710c63-8820-4729-b78c-8344fd5adce2","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","ConnectionString":"InstrumentationKey=869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","Name":"testApp","CreationDate":"2020-04-27T08:25:47.5261462+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1156'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:25:52 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "tags": {}, "kind": "ios", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "publicNetworkAccessForIngestion":
+ "Enabled", "publicNetworkAccessForQuery": "Enabled"}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component update
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '232'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --kind -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2018-05-01-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"19003b01-0000-0700-0000-5ea697120000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"6d710c63-8820-4729-b78c-8344fd5adce2","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","ConnectionString":"InstrumentationKey=869dc5d3-0c6e-42ee-b873-fbd1ad8c31fd","Name":"testApp","CreationDate":"2020-04-27T08:25:47.5261462+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '917'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 08:25:55 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+version: 1
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_public_network_access.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_public_network_access.yaml
new file mode 100644
index 00000000000..ef3f191ce37
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_component_with_public_network_access.yaml
@@ -0,0 +1,827 @@
+interactions:
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2019-07-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-04-27T06:55:02Z"},"properties":{"provisioningState":"Succeeded"}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '428'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:55:10 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "properties": {"sku": {"name": "PerGB2018"}, "retentionInDays":
+ 30}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '91'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000002?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"464dcbb5-8819-4ba0-8d6e-67606ba327cb\",\r\n \"provisioningState\": \"Creating\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 06:55:23 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Mon, 27 Apr 2020 21:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n
+ \ \"name\": \"clitest000002\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1026'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 06:55:24 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1197'
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000002?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"464dcbb5-8819-4ba0-8d6e-67606ba327cb\",\r\n \"provisioningState\": \"Succeeded\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 06:55:23 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Mon, 27 Apr 2020 21:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000002\",\r\n
+ \ \"name\": \"clitest000002\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1027'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 06:55:55 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-resource/9.0.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2019-07-01
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2020-04-27T06:55:02Z"},"properties":{"provisioningState":"Succeeded"}}'
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '428'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:55:57 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "properties": {"sku": {"name": "PerGB2018"}, "retentionInDays":
+ 30}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '91'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"17962751-b050-4e2e-b086-2a3d10b42343\",\r\n \"provisioningState\": \"Creating\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 06:56:06 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Mon, 27 Apr 2020 14:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n
+ \ \"name\": \"clitest000003\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1026'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 06:56:07 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 201
+ message: Created
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor log-analytics workspace create
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - -g -n
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-loganalytics/0.5.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.OperationalInsights/workspaces/clitest000003?api-version=2020-03-01-preview
+ response:
+ body:
+ string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\":
+ \"17962751-b050-4e2e-b086-2a3d10b42343\",\r\n \"provisioningState\": \"Succeeded\",\r\n
+ \ \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \"lastSkuUpdate\":
+ \"Mon, 27 Apr 2020 06:56:06 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\n
+ \ \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\": 1,\r\n
+ \ \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n },\r\n
+ \ \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n \"quotaNextResetTime\":
+ \"Mon, 27 Apr 2020 14:00:00 GMT\",\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n
+ \ },\r\n \"publicNetworkAccessForIngestion\": \"Enabled\",\r\n \"publicNetworkAccessForQuery\":
+ \"Enabled\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/microsoft.operationalinsights/workspaces/clitest000003\",\r\n
+ \ \"name\": \"clitest000003\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\",\r\n
+ \ \"location\": \"westus\"\r\n}"
+ headers:
+ cache-control:
+ - no-cache
+ content-length:
+ - '1027'
+ content-type:
+ - application/json
+ date:
+ - Mon, 27 Apr 2020 06:56:39 GMT
+ pragma:
+ - no-cache
+ server:
+ - Microsoft-IIS/10.0
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "kind": "web", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
+ 90}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '155'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --location --kind -g --application-type
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"1800ea8a-0000-0700-0000-5ea6822f0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"f448d256-9440-4108-ab46-8d981bc5cdb6","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"05c3355e-312c-4535-93c3-092995b4c998","ConnectionString":"InstrumentationKey=05c3355e-312c-4535-93c3-092995b4c998","Name":"demoApp","CreationDate":"2020-04-27T06:56:47.271582+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '956'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:56:49 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1198'
+ 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 update
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - --app --query-access --ingestion-access -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"1800ea8a-0000-0700-0000-5ea6822f0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"f448d256-9440-4108-ab46-8d981bc5cdb6","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"05c3355e-312c-4535-93c3-092995b4c998","ConnectionString":"InstrumentationKey=05c3355e-312c-4535-93c3-092995b4c998","Name":"demoApp","CreationDate":"2020-04-27T06:56:47.271582+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '956'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:56:52 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "tags": {}, "kind": "web", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "RetentionInDays":
+ 90, "publicNetworkAccessForIngestion": "Enabled", "publicNetworkAccessForQuery":
+ "Enabled"}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component update
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '255'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --query-access --ingestion-access -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2018-05-01-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"1800268b-0000-0700-0000-5ea682350000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"f448d256-9440-4108-ab46-8d981bc5cdb6","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"05c3355e-312c-4535-93c3-092995b4c998","ConnectionString":"InstrumentationKey=05c3355e-312c-4535-93c3-092995b4c998","Name":"demoApp","CreationDate":"2020-04-27T06:56:47.271582+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '956'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:56:54 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ 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 update
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - --app --workspace --query-access --ingestion-access -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"1800268b-0000-0700-0000-5ea682350000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"f448d256-9440-4108-ab46-8d981bc5cdb6","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"05c3355e-312c-4535-93c3-092995b4c998","Name":"demoApp","CreationDate":"2020-04-27T06:56:47.271582+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","publicNetworkAccessForIngestion":"Enabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '879'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:56:57 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: 'b''{"location": "westus", "tags": {}, "kind": "web", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "WorkspaceResourceId":
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002",
+ "publicNetworkAccessForIngestion": "Disabled", "publicNetworkAccessForQuery":
+ "Disabled"}}'''
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component update
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '475'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --workspace --query-access --ingestion-access -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/demoApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/demoApp","name":"demoApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"18004e8b-0000-0700-0000-5ea6823c0000\"","properties":{"Ver":"v2","ApplicationId":"demoApp","AppId":"f448d256-9440-4108-ab46-8d981bc5cdb6","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"05c3355e-312c-4535-93c3-092995b4c998","Name":"demoApp","CreationDate":"2020-04-27T06:56:47.271582+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"RetentionInDays":90,"Retention":"P90D","WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000002","publicNetworkAccessForIngestion":"Disabled","publicNetworkAccessForQuery":"Disabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1120'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:57:01 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1196'
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: 'b''{"location": "westus", "kind": "web", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "WorkspaceResourceId":
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003",
+ "publicNetworkAccessForIngestion": "Disabled", "publicNetworkAccessForQuery":
+ "Enabled"}}'''
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component create
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '462'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --workspace --location --query-access --ingestion-access -g --application-type
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2020-02-02-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"18009c8b-0000-0700-0000-5ea682480000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"33ebfb02-f196-4fe9-baaf-14f44b722442","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"edb44ffb-496c-4d0b-a8fd-7e4a1b47799b","Name":"testApp","CreationDate":"2020-04-27T06:57:11.5863937+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","publicNetworkAccessForIngestion":"Disabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1080'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:57:13 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1199'
+ 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 update
+ Connection:
+ - keep-alive
+ ParameterSetName:
+ - --app --kind -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2018-05-01-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"web","etag":"\"18009c8b-0000-0700-0000-5ea682480000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"33ebfb02-f196-4fe9-baaf-14f44b722442","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"edb44ffb-496c-4d0b-a8fd-7e4a1b47799b","ConnectionString":"InstrumentationKey=edb44ffb-496c-4d0b-a8fd-7e4a1b47799b","Name":"testApp","CreationDate":"2020-04-27T06:57:11.5863937+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"WorkspaceResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.OperationalInsights/workspaces/clitest000003","publicNetworkAccessForIngestion":"Disabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '1157'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:57:16 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-powered-by:
+ - ASP.NET
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '{"location": "westus", "tags": {}, "kind": "ios", "properties": {"Application_Type":
+ "web", "Flow_Type": "Bluefield", "Request_Source": "rest", "publicNetworkAccessForIngestion":
+ "Disabled", "publicNetworkAccessForQuery": "Enabled"}}'
+ headers:
+ Accept:
+ - application/json
+ Accept-Encoding:
+ - gzip, deflate
+ CommandName:
+ - monitor app-insights component update
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '233'
+ Content-Type:
+ - application/json; charset=utf-8
+ ParameterSetName:
+ - --app --kind -g
+ User-Agent:
+ - python/3.8.0 (Windows-10-10.0.18362-SP0) msrest/0.6.10 msrest_azure/0.6.3
+ azure-mgmt-applicationinsights/0.2.0 Azure-SDK-For-Python AZURECLI/2.4.0
+ accept-language:
+ - en-US
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Insights/components/testApp?api-version=2018-05-01-preview
+ response:
+ body:
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/components/testApp","name":"testApp","type":"microsoft.insights/components","location":"westus","tags":{},"kind":"ios","etag":"\"1800c68b-0000-0700-0000-5ea6824e0000\"","properties":{"Ver":"v2","ApplicationId":"testApp","AppId":"33ebfb02-f196-4fe9-baaf-14f44b722442","Application_Type":"web","Flow_Type":"Bluefield","Request_Source":"rest","InstrumentationKey":"edb44ffb-496c-4d0b-a8fd-7e4a1b47799b","ConnectionString":"InstrumentationKey=edb44ffb-496c-4d0b-a8fd-7e4a1b47799b","Name":"testApp","CreationDate":"2020-04-27T06:57:11.5863937+00:00","TenantId":"57947cb5-aadd-4b6c-9e8e-27f545bb7bf5","provisioningState":"Succeeded","SamplingPercentage":null,"publicNetworkAccessForIngestion":"Disabled","publicNetworkAccessForQuery":"Enabled"}}'
+ headers:
+ access-control-expose-headers:
+ - Request-Context
+ cache-control:
+ - no-cache
+ content-length:
+ - '918'
+ content-type:
+ - application/json; charset=utf-8
+ date:
+ - Mon, 27 Apr 2020 06:57:22 GMT
+ expires:
+ - '-1'
+ pragma:
+ - no-cache
+ request-context:
+ - appId=cid-v1:920e14b1-13f3-461a-a4bb-b4fe6f1a4525
+ server:
+ - Microsoft-IIS/10.0
+ strict-transport-security:
+ - max-age=31536000; includeSubDomains
+ transfer-encoding:
+ - chunked
+ vary:
+ - Accept-Encoding
+ x-content-type-options:
+ - nosniff
+ x-ms-ratelimit-remaining-subscription-writes:
+ - '1197'
+ 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.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_show.yaml
index e93f37588e6..ca8b29fc84c 100644
--- a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_show.yaml
+++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_metrics_show.yaml
@@ -60,10 +60,10 @@ interactions:
accept-language:
- en-US
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/Microsoft.Insights/components/ace-test?api-version=2015-05-01
response:
body:
- string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test","name":"ace-test","type":"microsoft.insights/components","location":"westus2","tags":{},"kind":"Node.JS","etag":"\"08005c73-0000-0000-0000-59f3fe650000\"","properties":{"Ver":"v2","ApplicationId":"ace-test","AppId":"578f0e27-12e9-4631-bc02-50b965da2633","Application_Type":"Node.JS","Flow_Type":"Redfield","Request_Source":"IbizaAIExtension","InstrumentationKey":"1145833f-6099-4855-9cb1-557cea26389e","Name":"ace-test","CreationDate":"2017-10-28T03:49:57.2801146+00:00","PackageId":null,"TenantId":"056f3d78-504f-4b60-b19a-276b6f1687db","HockeyAppId":"","HockeyAppToken":null,"provisioningState":"Succeeded","SamplingPercentage":null,"CustomMetricsOptedInType":null,"Retention":null}}'
+ string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/Microsoft.Insights/components/ace-test","name":"ace-test","type":"Microsoft.Insights/components","location":"westus2","tags":{},"kind":"Node.JS","etag":"\"08005c73-0000-0000-0000-59f3fe650000\"","properties":{"Ver":"v2","ApplicationId":"ace-test","AppId":"578f0e27-12e9-4631-bc02-50b965da2633","Application_Type":"Node.JS","Flow_Type":"Redfield","Request_Source":"IbizaAIExtension","InstrumentationKey":"1145833f-6099-4855-9cb1-557cea26389e","Name":"ace-test","CreationDate":"2017-10-28T03:49:57.2801146+00:00","PackageId":null,"TenantId":"056f3d78-504f-4b60-b19a-276b6f1687db","HockeyAppId":"","HockeyAppToken":null,"provisioningState":"Succeeded","SamplingPercentage":null,"CustomMetricsOptedInType":null,"Retention":null}}'
headers:
access-control-expose-headers:
- Request-Context
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_query_execute.yaml b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_query_execute.yaml
index 517d90b6118..4432874c755 100644
--- a/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_query_execute.yaml
+++ b/src/application-insights/azext_applicationinsights/tests/latest/recordings/test_query_execute.yaml
@@ -64,9 +64,9 @@ interactions:
azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python]
accept-language: [en-US]
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/Microsoft.Insights/components/ace-test?api-version=2015-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test","name":"ace-test","type":"microsoft.insights/components","location":"westus2","tags":{},"kind":"Node.JS","etag":"\"08005c73-0000-0000-0000-59f3fe650000\"","properties":{"Ver":"v2","ApplicationId":"ace-test","AppId":"578f0e27-12e9-4631-bc02-50b965da2633","Application_Type":"Node.JS","Flow_Type":"Redfield","Request_Source":"IbizaAIExtension","InstrumentationKey":"1145833f-6099-4855-9cb1-557cea26389e","Name":"ace-test","CreationDate":"2017-10-28T03:49:57.2801146+00:00","PackageId":null,"TenantId":"056f3d78-504f-4b60-b19a-276b6f1687db","HockeyAppId":"","HockeyAppToken":null,"provisioningState":"Succeeded","SamplingPercentage":null,"CustomMetricsOptedInType":null}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/Microsoft.Insights/components/ace-test","name":"ace-test","type":"Microsoft.Insights/components","location":"westus2","tags":{},"kind":"Node.JS","etag":"\"08005c73-0000-0000-0000-59f3fe650000\"","properties":{"Ver":"v2","ApplicationId":"ace-test","AppId":"578f0e27-12e9-4631-bc02-50b965da2633","Application_Type":"Node.JS","Flow_Type":"Redfield","Request_Source":"IbizaAIExtension","InstrumentationKey":"1145833f-6099-4855-9cb1-557cea26389e","Name":"ace-test","CreationDate":"2017-10-28T03:49:57.2801146+00:00","PackageId":null,"TenantId":"056f3d78-504f-4b60-b19a-276b6f1687db","HockeyAppId":"","HockeyAppToken":null,"provisioningState":"Succeeded","SamplingPercentage":null,"CustomMetricsOptedInType":null}}'}
headers:
access-control-expose-headers: [Request-Context]
cache-control: [no-cache]
@@ -122,9 +122,9 @@ interactions:
azure-mgmt-applicationinsights/0.1.1 Azure-SDK-For-Python]
accept-language: [en-US]
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test?api-version=2015-05-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/Microsoft.Insights/components/ace-test?api-version=2015-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/microsoft.insights/components/ace-test","name":"ace-test","type":"microsoft.insights/components","location":"westus2","tags":{},"kind":"Node.JS","etag":"\"08005c73-0000-0000-0000-59f3fe650000\"","properties":{"Ver":"v2","ApplicationId":"ace-test","AppId":"578f0e27-12e9-4631-bc02-50b965da2633","Application_Type":"Node.JS","Flow_Type":"Redfield","Request_Source":"IbizaAIExtension","InstrumentationKey":"1145833f-6099-4855-9cb1-557cea26389e","Name":"ace-test","CreationDate":"2017-10-28T03:49:57.2801146+00:00","PackageId":null,"TenantId":"056f3d78-504f-4b60-b19a-276b6f1687db","HockeyAppId":"","HockeyAppToken":null,"provisioningState":"Succeeded","SamplingPercentage":null,"CustomMetricsOptedInType":null}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ace-test/providers/Microsoft.Insights/components/ace-test","name":"ace-test","type":"Microsoft.Insights/components","location":"westus2","tags":{},"kind":"Node.JS","etag":"\"08005c73-0000-0000-0000-59f3fe650000\"","properties":{"Ver":"v2","ApplicationId":"ace-test","AppId":"578f0e27-12e9-4631-bc02-50b965da2633","Application_Type":"Node.JS","Flow_Type":"Redfield","Request_Source":"IbizaAIExtension","InstrumentationKey":"1145833f-6099-4855-9cb1-557cea26389e","Name":"ace-test","CreationDate":"2017-10-28T03:49:57.2801146+00:00","PackageId":null,"TenantId":"056f3d78-504f-4b60-b19a-276b6f1687db","HockeyAppId":"","HockeyAppToken":null,"provisioningState":"Succeeded","SamplingPercentage":null,"CustomMetricsOptedInType":null}}'}
headers:
access-control-expose-headers: [Request-Context]
cache-control: [no-cache]
diff --git a/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_mgmt.py b/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_mgmt.py
index 6ca55a9ec3a..e0766d01526 100644
--- a/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_mgmt.py
+++ b/src/application-insights/azext_applicationinsights/tests/latest/test_applicationinsights_mgmt.py
@@ -4,7 +4,7 @@
# --------------------------------------------------------------------------------------------
# pylint: disable=line-too-long
-from azure.cli.testsdk import ResourceGroupPreparer, ScenarioTest
+from azure.cli.testsdk import ResourceGroupPreparer, ScenarioTest, StorageAccountPreparer
class ApplicationInsightsManagementClientTests(ScenarioTest):
@@ -54,6 +54,10 @@ def test_component(self, resource_group, location):
apps = self.cmd('az monitor app-insights component show -g {resource_group}').get_output_in_json()
assert len(apps) == 2
+ self.cmd('az monitor app-insights component show -g {resource_group} --app {name_b}', checks=[
+ self.check('name', '{name_b}')
+ ])
+
self.cmd('az monitor app-insights component delete --app {name_a} -g {resource_group}', checks=[self.is_empty()])
return
@@ -66,6 +70,7 @@ def test_api_key(self, resource_group, location):
'name': 'demoApp',
'apiKey': 'demoKey',
'apiKeyB': 'otherKey',
+ 'apiKeyC': 'emptyKey',
'kind': 'web',
'application_type': 'web'
})
@@ -83,10 +88,140 @@ def test_api_key(self, resource_group, location):
api_key = self.cmd('az monitor app-insights api-key create --app {name} -g {resource_group} --api-key {apiKeyB}').get_output_in_json()
assert (api_key['apiKey'] is not None)
+ api_key = self.cmd('az monitor app-insights api-key create --app {name} -g {resource_group} --api-key {apiKeyC} --write-properties ""').get_output_in_json()
+ assert len(api_key['linkedReadProperties']) >= 2 # Some are not user configurable but will be added automatically
+ assert len(api_key['linkedWriteProperties']) == 0
+
api_keys = self.cmd('az monitor app-insights api-key show --app {name} -g {resource_group}').get_output_in_json()
- assert len(api_keys) == 2
+ assert len(api_keys) == 3
self.cmd('az monitor app-insights api-key delete --app {name} -g {resource_group} --api-key {apiKeyB}', checks=[
self.check('name', '{apiKeyB}')
])
return
+
+ @ResourceGroupPreparer(parameter_name_for_location='location')
+ @StorageAccountPreparer(name_prefix='component', kind='StorageV2')
+ @StorageAccountPreparer(name_prefix='component', kind='StorageV2', parameter_name='storage_account_2')
+ def test_component_with_linked_storage(self, resource_group, location, storage_account, storage_account_2):
+ self.kwargs.update({
+ 'loc': location,
+ 'resource_group': resource_group,
+ 'name_a': 'demoApp',
+ 'kind': 'web',
+ 'application_type': 'web',
+ 'storage_account': storage_account,
+ 'ws_1': self.create_random_name('clitest', 20),
+ 'storage_account_2': storage_account_2
+ })
+ self.cmd('monitor log-analytics workspace create -g {resource_group} -n {ws_1}')
+ self.cmd(
+ 'monitor app-insights component create --app {name_a} --location {loc} --kind {kind} -g {resource_group} --workspace {ws_1} --application-type {application_type}',
+ checks=[
+ self.check('name', '{name_a}'),
+ self.check('location', '{loc}'),
+ self.check('kind', '{kind}'),
+ self.check('applicationType', '{application_type}'),
+ self.check('applicationId', '{name_a}'),
+ self.check('provisioningState', 'Succeeded'),
+ ])
+
+ output_json = self.cmd('monitor app-insights component linked-storage link --app {name_a} -g {resource_group} -s {storage_account}').get_output_in_json()
+ assert self.kwargs['storage_account'] in output_json['linkedStorageAccount']
+ output_json = self.cmd('monitor app-insights component linked-storage show --app {name_a} -g {resource_group}').get_output_in_json()
+ assert self.kwargs['storage_account'] in output_json['linkedStorageAccount']
+ output_json = self.cmd('monitor app-insights component linked-storage update --app {name_a} -g {resource_group} -s {storage_account_2}').get_output_in_json()
+ assert self.kwargs['storage_account_2'] in output_json['linkedStorageAccount']
+ self.cmd('monitor app-insights component linked-storage unlink --app {name_a} -g {resource_group}')
+ with self.assertRaisesRegexp(SystemExit, '3'):
+ self.cmd('monitor app-insights component linked-storage show --app {name_a} -g {resource_group}')
+
+ @ResourceGroupPreparer(parameter_name_for_location='location')
+ def test_component_with_linked_workspace(self, resource_group, location):
+ self.kwargs.update({
+ 'loc': location,
+ 'resource_group': resource_group,
+ 'name_a': 'demoApp',
+ 'name_b': 'testApp',
+ 'kind': 'web',
+ 'application_type': 'web',
+ 'ws_1': self.create_random_name('clitest', 20),
+ 'ws_2': self.create_random_name('clitest', 20)
+ })
+
+ self.cmd('monitor log-analytics workspace create -g {resource_group} -n {ws_1}')
+ self.cmd('monitor log-analytics workspace create -g {resource_group} -n {ws_2}')
+ self.cmd(
+ 'monitor app-insights component create --app {name_a} --location {loc} --kind {kind} -g {resource_group} --application-type {application_type}',
+ checks=[
+ self.check('name', '{name_a}'),
+ self.check('location', '{loc}'),
+ self.check('kind', '{kind}'),
+ self.check('applicationType', '{application_type}'),
+ self.check('applicationId', '{name_a}'),
+ self.check('provisioningState', 'Succeeded'),
+ ])
+
+ self.kwargs.update({
+ 'kind': 'ios'
+ })
+
+ output_json = self.cmd('az monitor app-insights component update --app {name_a} --workspace {ws_1} -g {resource_group}').get_output_in_json()
+ assert self.kwargs['ws_1'] in output_json['workspaceResourceId']
+ output_json = self.cmd('az monitor app-insights component update --app {name_a} --workspace {ws_2} -g {resource_group}').get_output_in_json()
+ assert self.kwargs['ws_2'] in output_json['workspaceResourceId']
+
+ output_json = self.cmd('az monitor app-insights component update --app {name_a} --workspace {ws_1} --kind {kind} -g {resource_group}').get_output_in_json()
+ assert self.kwargs['ws_1'] in output_json['workspaceResourceId']
+ assert output_json['kind'] == self.kwargs['kind']
+ output_json = self.cmd('az monitor app-insights component create --app {name_b} --workspace {ws_2} --location {loc} --kind {kind} -g {resource_group} --application-type {application_type}').get_output_in_json()
+ assert self.kwargs['ws_2'] in output_json['workspaceResourceId']
+ assert output_json['kind'] == self.kwargs['kind']
+ output_json = self.cmd('az monitor app-insights component update --app {name_b} --kind {kind} -g {resource_group}').get_output_in_json()
+ assert output_json['kind'] == self.kwargs['kind']
+
+ @ResourceGroupPreparer(parameter_name_for_location='location')
+ def test_component_with_public_network_access(self, resource_group, location):
+ self.kwargs.update({
+ 'loc': location,
+ 'resource_group': resource_group,
+ 'name_a': 'demoApp',
+ 'name_b': 'testApp',
+ 'kind': 'web',
+ 'application_type': 'web',
+ 'ws_1': self.create_random_name('clitest', 20),
+ 'ws_2': self.create_random_name('clitest', 20)
+ })
+
+ self.cmd('monitor log-analytics workspace create -g {resource_group} -n {ws_1}')
+ self.cmd('monitor log-analytics workspace create -g {resource_group} -n {ws_2}')
+ self.cmd(
+ 'monitor app-insights component create --app {name_a} --location {loc} --kind {kind} -g {resource_group} --application-type {application_type}',
+ checks=[
+ self.check('name', '{name_a}'),
+ self.check('location', '{loc}'),
+ self.check('kind', '{kind}'),
+ self.check('applicationType', '{application_type}'),
+ self.check('applicationId', '{name_a}'),
+ self.check('provisioningState', 'Succeeded'),
+ ])
+
+ output_json = self.cmd('az monitor app-insights component update --app {name_a} --query-access Enabled --ingestion-access Enabled -g {resource_group}').get_output_in_json()
+ assert output_json['publicNetworkAccessForIngestion'] == 'Enabled'
+ assert output_json['publicNetworkAccessForQuery'] == 'Enabled'
+ output_json = self.cmd('az monitor app-insights component update --app {name_a} --workspace {ws_1} --query-access Disabled --ingestion-access Disabled -g {resource_group}').get_output_in_json()
+ assert self.kwargs['ws_1'] in output_json['workspaceResourceId']
+ assert output_json['publicNetworkAccessForIngestion'] == 'Disabled'
+ assert output_json['publicNetworkAccessForQuery'] == 'Disabled'
+ output_json = self.cmd('az monitor app-insights component create --app {name_b} --workspace {ws_2} --location {loc} --query-access Enabled --ingestion-access Disabled -g {resource_group} --application-type {application_type}').get_output_in_json()
+ assert self.kwargs['ws_2'] in output_json['workspaceResourceId']
+ assert output_json['publicNetworkAccessForIngestion'] == 'Disabled'
+ assert output_json['publicNetworkAccessForQuery'] == 'Enabled'
+
+ self.kwargs.update({
+ 'kind': 'ios'
+ })
+
+ self.cmd('az monitor app-insights component update --app {name_b} --kind {kind} -g {resource_group}', checks=[
+ self.check('kind', '{kind}')
+ ])
diff --git a/src/application-insights/azext_applicationinsights/util.py b/src/application-insights/azext_applicationinsights/util.py
index 0550e1e5d6b..ad4ecb0c045 100644
--- a/src/application-insights/azext_applicationinsights/util.py
+++ b/src/application-insights/azext_applicationinsights/util.py
@@ -6,17 +6,19 @@
from datetime import datetime
import dateutil.parser # pylint: disable=import-error
from msrestazure.tools import is_valid_resource_id, parse_resource_id
-from azext_applicationinsights._client_factory import cf_components, applicationinsights_mgmt_plane_client
+from azext_applicationinsights._client_factory import applicationinsights_mgmt_plane_client
def get_id_from_azure_resource(cli_ctx, app, resource_group=None):
if is_valid_resource_id(app):
parsed = parse_resource_id(app)
resource_group, name, subscription = parsed["resource_group"], parsed["name"], parsed["subscription"]
- client = applicationinsights_mgmt_plane_client(cli_ctx, subscription_id=subscription).components
+ client = applicationinsights_mgmt_plane_client(cli_ctx, subscription_id=subscription,
+ api_version='2015-05-01').components
return client.get(resource_group, name).app_id
if resource_group:
- return cf_components(cli_ctx, None).get(resource_group, app).app_id
+ client = applicationinsights_mgmt_plane_client(cli_ctx, api_version='2015-05-01').components
+ return client.get(resource_group, app).app_id
return app
@@ -63,12 +65,12 @@ def get_linked_properties(cli_ctx, app, resource_group, read_properties=None, wr
if isinstance(read_properties, list):
propLen = len(read_properties)
- linked_read_properties = ['{}/{}'.format(tmpl, roles[read_properties[i]]) for i in range(propLen)]
+ linked_read_properties = ['{}/{}'.format(tmpl, roles[read_properties[i]]) for i in range(propLen) if read_properties[i]] # pylint: disable=line-too-long
else:
linked_read_properties = ['{}/{}'.format(tmpl, roles[read_properties])]
if isinstance(write_properties, list):
propLen = len(write_properties)
- linked_write_properties = ['{}/{}'.format(tmpl, roles[write_properties[i]]) for i in range(propLen)]
+ linked_write_properties = ['{}/{}'.format(tmpl, roles[write_properties[i]]) for i in range(propLen) if write_properties[i]] # pylint: disable=line-too-long
else:
linked_write_properties = ['{}/{}'.format(tmpl, roles[write_properties])]
return linked_read_properties, linked_write_properties
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/__init__.py
index e33c5d13ed5..298512941d9 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/__init__.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/__init__.py
@@ -9,10 +9,11 @@
# regenerated.
# --------------------------------------------------------------------------
-from .application_insights_management_client import ApplicationInsightsManagementClient
-from .version import VERSION
+from ._configuration import ApplicationInsightsManagementClientConfiguration
+from ._application_insights_management_client import ApplicationInsightsManagementClient
+__all__ = ['ApplicationInsightsManagementClient', 'ApplicationInsightsManagementClientConfiguration']
-__all__ = ['ApplicationInsightsManagementClient']
+from .version import VERSION
__version__ = VERSION
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/_application_insights_management_client.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/_application_insights_management_client.py
new file mode 100644
index 00000000000..d2d1abb1bbf
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/_application_insights_management_client.py
@@ -0,0 +1,455 @@
+# 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 Serializer, Deserializer
+
+from azure.profiles import KnownProfiles, ProfileDefinition
+from azure.profiles.multiapiclient import MultiApiClientMixin
+from ._configuration import ApplicationInsightsManagementClientConfiguration
+
+
+
+class ApplicationInsightsManagementClient(MultiApiClientMixin, SDKClient):
+ """Composite Swagger for Application Insights Management Client
+
+ This ready contains multiple API versions, to help you deal with all Azure clouds
+ (Azure Stack, Azure Government, Azure China, etc.).
+ By default, uses latest API version available on public Azure.
+ For production, you should stick a particular api-version and/or profile.
+ The profile sets a mapping between the operation group and an API version.
+ The api-version parameter sets the default API version if the operation
+ group is not described in the profile.
+
+ :ivar config: Configuration for client.
+ :vartype config: ApplicationInsightsManagementClientConfiguration
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: Subscription credentials which uniquely identify
+ Microsoft Azure subscription. The subscription ID forms part of the URI
+ for every service call.
+ :type subscription_id: str
+ :param str api_version: API version to use if no profile is provided, or if
+ missing in profile.
+ :param str base_url: Service URL
+ :param profile: A profile definition, from KnownProfiles to dict.
+ :type profile: azure.profiles.KnownProfiles
+ """
+
+ DEFAULT_API_VERSION = '2020-03-01-preview'
+ _PROFILE_TAG = "azure.mgmt.applicationinsights.ApplicationInsightsManagementClient"
+ LATEST_PROFILE = ProfileDefinition({
+ _PROFILE_TAG: {
+ None: DEFAULT_API_VERSION,
+ 'analytics_items': '2015-05-01',
+ 'annotations': '2015-05-01',
+ 'api_keys': '2015-05-01',
+ 'component_available_features': '2015-05-01',
+ 'component_current_billing_features': '2015-05-01',
+ 'component_current_pricing_plan': '2017-10-01',
+ 'component_feature_capabilities': '2015-05-01',
+ 'component_quota_status': '2015-05-01',
+ 'components': '2020-02-02-preview',
+ 'ea_subscription_list_migration_date': '2017-10-01',
+ 'ea_subscription_migrate_to_new_pricing_model': '2017-10-01',
+ 'ea_subscription_rollback_to_legacy_pricing_model': '2017-10-01',
+ 'export_configurations': '2015-05-01',
+ 'favorites': '2015-05-01',
+ 'operations': '2015-05-01',
+ 'proactive_detection_configurations': '2018-05-01-preview',
+ 'queries': '2019-09-01-preview',
+ 'query_packs': '2019-09-01-preview',
+ 'web_test_locations': '2015-05-01',
+ 'web_tests': '2015-05-01',
+ 'work_item_configurations': '2015-05-01',
+ 'workbook_templates': '2019-10-17-preview',
+ 'workbooks': '2018-06-17-preview',
+ }},
+ _PROFILE_TAG + " latest"
+ )
+
+ def __init__(self, credentials, subscription_id, api_version=None, base_url=None, profile=KnownProfiles.default):
+ self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
+ super(ApplicationInsightsManagementClient, self).__init__(
+ credentials,
+ self.config,
+ api_version=api_version,
+ profile=profile
+ )
+
+ @classmethod
+ def _models_dict(cls, api_version):
+ return {k: v for k, v in cls.models(api_version).__dict__.items() if isinstance(v, type)}
+
+ @classmethod
+ def models(cls, api_version=DEFAULT_API_VERSION):
+ """Module depends on the API version:
+
+ * 2015-05-01: :mod:`v2015_05_01.models`
+ * 2017-10-01: :mod:`v2017_10_01.models`
+ * 2018-05-01-preview: :mod:`v2018_05_01_preview.models`
+ * 2018-06-17-preview: :mod:`v2018_06_17_preview.models`
+ * 2019-09-01-preview: :mod:`v2019_09_01_preview.models`
+ * 2019-10-17-preview: :mod:`v2019_10_17_preview.models`
+ * 2020-02-02-preview: :mod:`v2020_02_02_preview.models`
+ * 2020-03-01-preview: :mod:`v2020_03_01_preview.models`
+ """
+ if api_version == '2015-05-01':
+ from .v2015_05_01 import models
+ return models
+ elif api_version == '2017-10-01':
+ from .v2017_10_01 import models
+ return models
+ elif api_version == '2018-05-01-preview':
+ from .v2018_05_01_preview import models
+ return models
+ elif api_version == '2018-06-17-preview':
+ from .v2018_06_17_preview import models
+ return models
+ elif api_version == '2019-09-01-preview':
+ from .v2019_09_01_preview import models
+ return models
+ elif api_version == '2019-10-17-preview':
+ from .v2019_10_17_preview import models
+ return models
+ elif api_version == '2020-02-02-preview':
+ from .v2020_02_02_preview import models
+ return models
+ elif api_version == '2020-03-01-preview':
+ from .v2020_03_01_preview import models
+ return models
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+
+ @property
+ def analytics_items(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`AnalyticsItemsOperations`
+ """
+ api_version = self._get_api_version('analytics_items')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import AnalyticsItemsOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def annotations(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`AnnotationsOperations`
+ """
+ api_version = self._get_api_version('annotations')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import AnnotationsOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def api_keys(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`APIKeysOperations`
+ """
+ api_version = self._get_api_version('api_keys')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import APIKeysOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def component_available_features(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`ComponentAvailableFeaturesOperations`
+ """
+ api_version = self._get_api_version('component_available_features')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import ComponentAvailableFeaturesOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def component_current_billing_features(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`ComponentCurrentBillingFeaturesOperations`
+ """
+ api_version = self._get_api_version('component_current_billing_features')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import ComponentCurrentBillingFeaturesOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def component_current_pricing_plan(self):
+ """Instance depends on the API version:
+
+ * 2017-10-01: :class:`ComponentCurrentPricingPlanOperations`
+ """
+ api_version = self._get_api_version('component_current_pricing_plan')
+ if api_version == '2017-10-01':
+ from .v2017_10_01.operations import ComponentCurrentPricingPlanOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def component_feature_capabilities(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`ComponentFeatureCapabilitiesOperations`
+ """
+ api_version = self._get_api_version('component_feature_capabilities')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import ComponentFeatureCapabilitiesOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def component_linked_storage_accounts(self):
+ """Instance depends on the API version:
+
+ * 2020-03-01-preview: :class:`ComponentLinkedStorageAccountsOperations`
+ """
+ api_version = self._get_api_version('component_linked_storage_accounts')
+ if api_version == '2020-03-01-preview':
+ from .v2020_03_01_preview.operations import ComponentLinkedStorageAccountsOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def component_quota_status(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`ComponentQuotaStatusOperations`
+ """
+ api_version = self._get_api_version('component_quota_status')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import ComponentQuotaStatusOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def components(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`ComponentsOperations`
+ * 2018-05-01-preview: :class:`ComponentsOperations`
+ * 2020-02-02-preview: :class:`ComponentsOperations`
+ """
+ api_version = self._get_api_version('components')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import ComponentsOperations as OperationClass
+ elif api_version == '2018-05-01-preview':
+ from .v2018_05_01_preview.operations import ComponentsOperations as OperationClass
+ elif api_version == '2020-02-02-preview':
+ from .v2020_02_02_preview.operations import ComponentsOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def ea_subscription_list_migration_date(self):
+ """Instance depends on the API version:
+
+ * 2017-10-01: :class:`EASubscriptionListMigrationDateOperations`
+ """
+ api_version = self._get_api_version('ea_subscription_list_migration_date')
+ if api_version == '2017-10-01':
+ from .v2017_10_01.operations import EASubscriptionListMigrationDateOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def ea_subscription_migrate_to_new_pricing_model(self):
+ """Instance depends on the API version:
+
+ * 2017-10-01: :class:`EASubscriptionMigrateToNewPricingModelOperations`
+ """
+ api_version = self._get_api_version('ea_subscription_migrate_to_new_pricing_model')
+ if api_version == '2017-10-01':
+ from .v2017_10_01.operations import EASubscriptionMigrateToNewPricingModelOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def ea_subscription_rollback_to_legacy_pricing_model(self):
+ """Instance depends on the API version:
+
+ * 2017-10-01: :class:`EASubscriptionRollbackToLegacyPricingModelOperations`
+ """
+ api_version = self._get_api_version('ea_subscription_rollback_to_legacy_pricing_model')
+ if api_version == '2017-10-01':
+ from .v2017_10_01.operations import EASubscriptionRollbackToLegacyPricingModelOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def export_configurations(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`ExportConfigurationsOperations`
+ """
+ api_version = self._get_api_version('export_configurations')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import ExportConfigurationsOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def favorites(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`FavoritesOperations`
+ """
+ api_version = self._get_api_version('favorites')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import FavoritesOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def operations(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`Operations`
+ """
+ api_version = self._get_api_version('operations')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import Operations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def proactive_detection_configurations(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`ProactiveDetectionConfigurationsOperations`
+ * 2018-05-01-preview: :class:`ProactiveDetectionConfigurationsOperations`
+ """
+ api_version = self._get_api_version('proactive_detection_configurations')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import ProactiveDetectionConfigurationsOperations as OperationClass
+ elif api_version == '2018-05-01-preview':
+ from .v2018_05_01_preview.operations import ProactiveDetectionConfigurationsOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def queries(self):
+ """Instance depends on the API version:
+
+ * 2019-09-01-preview: :class:`QueriesOperations`
+ """
+ api_version = self._get_api_version('queries')
+ if api_version == '2019-09-01-preview':
+ from .v2019_09_01_preview.operations import QueriesOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def query_packs(self):
+ """Instance depends on the API version:
+
+ * 2019-09-01-preview: :class:`QueryPacksOperations`
+ """
+ api_version = self._get_api_version('query_packs')
+ if api_version == '2019-09-01-preview':
+ from .v2019_09_01_preview.operations import QueryPacksOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def web_test_locations(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`WebTestLocationsOperations`
+ """
+ api_version = self._get_api_version('web_test_locations')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import WebTestLocationsOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def web_tests(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`WebTestsOperations`
+ """
+ api_version = self._get_api_version('web_tests')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import WebTestsOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def work_item_configurations(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`WorkItemConfigurationsOperations`
+ """
+ api_version = self._get_api_version('work_item_configurations')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import WorkItemConfigurationsOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def workbook_templates(self):
+ """Instance depends on the API version:
+
+ * 2019-10-17-preview: :class:`WorkbookTemplatesOperations`
+ """
+ api_version = self._get_api_version('workbook_templates')
+ if api_version == '2019-10-17-preview':
+ from .v2019_10_17_preview.operations import WorkbookTemplatesOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
+
+ @property
+ def workbooks(self):
+ """Instance depends on the API version:
+
+ * 2015-05-01: :class:`WorkbooksOperations`
+ * 2018-06-17-preview: :class:`WorkbooksOperations`
+ """
+ api_version = self._get_api_version('workbooks')
+ if api_version == '2015-05-01':
+ from .v2015_05_01.operations import WorkbooksOperations as OperationClass
+ elif api_version == '2018-06-17-preview':
+ from .v2018_06_17_preview.operations import WorkbooksOperations as OperationClass
+ else:
+ raise NotImplementedError("APIVersion {} is not available".format(api_version))
+ return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version)))
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/_configuration.py
new file mode 100644
index 00000000000..6c855295a4b
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/_configuration.py
@@ -0,0 +1,48 @@
+# 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 msrestazure import AzureConfiguration
+
+from .version import VERSION
+
+
+class ApplicationInsightsManagementClientConfiguration(AzureConfiguration):
+ """Configuration for ApplicationInsightsManagementClient
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ if credentials is None:
+ raise ValueError("Parameter 'credentials' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if not base_url:
+ base_url = 'https://management.azure.com'
+
+ super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url)
+
+ # Starting Autorest.Python 4.0.64, make connection pool activated by default
+ self.keep_alive = True
+
+ self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION))
+ self.add_user_agent('Azure-SDK-For-Python')
+
+ self.credentials = credentials
+ self.subscription_id = subscription_id
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/application_insights_management_client.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/application_insights_management_client.py
deleted file mode 100644
index 241589ea580..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/application_insights_management_client.py
+++ /dev/null
@@ -1,116 +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 ServiceClient
-from msrest import Serializer, Deserializer
-from msrestazure import AzureConfiguration
-from .version import VERSION
-from .operations.operations import Operations
-from .operations.components_operations import ComponentsOperations
-from .operations.web_tests_operations import WebTestsOperations
-from .operations.export_configurations_operations import ExportConfigurationsOperations
-from .operations.proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations
-from .operations.component_current_billing_features_operations import ComponentCurrentBillingFeaturesOperations
-from .operations.component_quota_status_operations import ComponentQuotaStatusOperations
-from .operations.api_keys_operations import APIKeysOperations
-from . import models
-
-
-class ApplicationInsightsManagementClientConfiguration(AzureConfiguration):
- """Configuration for ApplicationInsightsManagementClient
- Note that all parameters used to create this instance are saved as instance
- attributes.
-
- :param credentials: Credentials needed for the client to connect to Azure.
- :type credentials: :mod:`A msrestazure Credentials
- object`
- :param subscription_id: The Azure subscription ID.
- :type subscription_id: str
- :param str base_url: Service URL
- """
-
- def __init__(
- self, credentials, subscription_id, base_url=None):
-
- if credentials is None:
- raise ValueError("Parameter 'credentials' must not be None.")
- if subscription_id is None:
- raise ValueError("Parameter 'subscription_id' must not be None.")
- if not base_url:
- base_url = 'https://management.azure.com'
-
- super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url)
-
- self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION))
- self.add_user_agent('Azure-SDK-For-Python')
-
- self.credentials = credentials
- self.subscription_id = subscription_id
-
-
-class ApplicationInsightsManagementClient(object):
- """Composite Swagger for Application Insights Management Client
-
- :ivar config: Configuration for client.
- :vartype config: ApplicationInsightsManagementClientConfiguration
-
- :ivar operations: Operations operations
- :vartype operations: azure.mgmt.applicationinsights.operations.Operations
- :ivar components: Components operations
- :vartype components: azure.mgmt.applicationinsights.operations.ComponentsOperations
- :ivar web_tests: WebTests operations
- :vartype web_tests: azure.mgmt.applicationinsights.operations.WebTestsOperations
- :ivar export_configurations: ExportConfigurations operations
- :vartype export_configurations: azure.mgmt.applicationinsights.operations.ExportConfigurationsOperations
- :ivar proactive_detection_configurations: ProactiveDetectionConfigurations operations
- :vartype proactive_detection_configurations: azure.mgmt.applicationinsights.operations.ProactiveDetectionConfigurationsOperations
- :ivar component_current_billing_features: ComponentCurrentBillingFeatures operations
- :vartype component_current_billing_features: azure.mgmt.applicationinsights.operations.ComponentCurrentBillingFeaturesOperations
- :ivar component_quota_status: ComponentQuotaStatus operations
- :vartype component_quota_status: azure.mgmt.applicationinsights.operations.ComponentQuotaStatusOperations
- :ivar api_keys: APIKeys operations
- :vartype api_keys: azure.mgmt.applicationinsights.operations.APIKeysOperations
-
- :param credentials: Credentials needed for the client to connect to Azure.
- :type credentials: :mod:`A msrestazure Credentials
- object`
- :param subscription_id: The Azure subscription ID.
- :type subscription_id: str
- :param str base_url: Service URL
- """
-
- def __init__(
- self, credentials, subscription_id, base_url=None):
-
- self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
- self._client = ServiceClient(self.config.credentials, self.config)
-
- client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
- self.api_version = '2015-05-01'
- self._serialize = Serializer(client_models)
- self._deserialize = Deserializer(client_models)
-
- self.operations = Operations(
- self._client, self.config, self._serialize, self._deserialize)
- self.components = ComponentsOperations(
- self._client, self.config, self._serialize, self._deserialize)
- self.web_tests = WebTestsOperations(
- self._client, self.config, self._serialize, self._deserialize)
- self.export_configurations = ExportConfigurationsOperations(
- self._client, self.config, self._serialize, self._deserialize)
- self.proactive_detection_configurations = ProactiveDetectionConfigurationsOperations(
- self._client, self.config, self._serialize, self._deserialize)
- self.component_current_billing_features = ComponentCurrentBillingFeaturesOperations(
- self._client, self.config, self._serialize, self._deserialize)
- self.component_quota_status = ComponentQuotaStatusOperations(
- self._client, self.config, self._serialize, self._deserialize)
- self.api_keys = APIKeysOperations(
- self._client, self.config, self._serialize, self._deserialize)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models.py
new file mode 100644
index 00000000000..b2518264a52
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models.py
@@ -0,0 +1,14 @@
+# 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.
+# --------------------------------------------------------------------------
+from .v2015_05_01.models import *
+from .v2017_10_01.models import *
+from .v2018_05_01_preview.models import *
+from .v2018_06_17_preview.models import *
+from .v2019_09_01_preview.models import *
+from .v2019_10_17_preview.models import *
+from .v2020_02_02_preview.models import *
+from .v2020_03_01_preview.models import *
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/__init__.py
deleted file mode 100644
index 40e594f9b55..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/__init__.py
+++ /dev/null
@@ -1,68 +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 .error_response import ErrorResponse, ErrorResponseException
-from .operation_display import OperationDisplay
-from .operation import Operation
-from .resource import Resource
-from .tags_resource import TagsResource
-from .application_insights_component import ApplicationInsightsComponent
-from .web_test_geolocation import WebTestGeolocation
-from .web_test_properties_configuration import WebTestPropertiesConfiguration
-from .web_test import WebTest
-from .application_insights_component_export_request import ApplicationInsightsComponentExportRequest
-from .application_insights_component_export_configuration import ApplicationInsightsComponentExportConfiguration
-from .application_insights_component_proactive_detection_configuration_rule_definitions import ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions
-from .application_insights_component_proactive_detection_configuration import ApplicationInsightsComponentProactiveDetectionConfiguration
-from .application_insights_component_data_volume_cap import ApplicationInsightsComponentDataVolumeCap
-from .application_insights_component_billing_features import ApplicationInsightsComponentBillingFeatures
-from .application_insights_component_quota_status import ApplicationInsightsComponentQuotaStatus
-from .api_key_request import APIKeyRequest
-from .application_insights_component_api_key import ApplicationInsightsComponentAPIKey
-from .operation_paged import OperationPaged
-from .application_insights_component_paged import ApplicationInsightsComponentPaged
-from .web_test_paged import WebTestPaged
-from .application_insights_component_api_key_paged import ApplicationInsightsComponentAPIKeyPaged
-from .application_insights_management_client_enums import (
- ApplicationType,
- FlowType,
- RequestSource,
- WebTestKind,
-)
-
-__all__ = [
- 'ErrorResponse', 'ErrorResponseException',
- 'OperationDisplay',
- 'Operation',
- 'Resource',
- 'TagsResource',
- 'ApplicationInsightsComponent',
- 'WebTestGeolocation',
- 'WebTestPropertiesConfiguration',
- 'WebTest',
- 'ApplicationInsightsComponentExportRequest',
- 'ApplicationInsightsComponentExportConfiguration',
- 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions',
- 'ApplicationInsightsComponentProactiveDetectionConfiguration',
- 'ApplicationInsightsComponentDataVolumeCap',
- 'ApplicationInsightsComponentBillingFeatures',
- 'ApplicationInsightsComponentQuotaStatus',
- 'APIKeyRequest',
- 'ApplicationInsightsComponentAPIKey',
- 'OperationPaged',
- 'ApplicationInsightsComponentPaged',
- 'WebTestPaged',
- 'ApplicationInsightsComponentAPIKeyPaged',
- 'ApplicationType',
- 'FlowType',
- 'RequestSource',
- 'WebTestKind',
-]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/api_key_request.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/api_key_request.py
deleted file mode 100644
index a802d1544b8..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/api_key_request.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 APIKeyRequest(Model):
- """An Application Insights component API Key createion request definition.
-
- :param name: The name of the API Key.
- :type name: str
- :param linked_read_properties: The read access rights of this API Key.
- :type linked_read_properties: list[str]
- :param linked_write_properties: The write access rights of this API Key.
- :type linked_write_properties: list[str]
- """
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'},
- 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'},
- }
-
- def __init__(self, name=None, linked_read_properties=None, linked_write_properties=None):
- super(APIKeyRequest, self).__init__()
- self.name = name
- self.linked_read_properties = linked_read_properties
- self.linked_write_properties = linked_write_properties
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component.py
deleted file mode 100644
index f3c11134bfe..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component.py
+++ /dev/null
@@ -1,132 +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 .resource import Resource
-
-
-class ApplicationInsightsComponent(Resource):
- """An Application Insights component definition.
-
- Variables are only populated by the server, and will be ignored when
- sending a request.
-
- :ivar id: Azure resource Id
- :vartype id: str
- :ivar name: Azure resource name
- :vartype name: str
- :ivar type: Azure resource type
- :vartype type: str
- :param location: Resource location
- :type location: str
- :param tags: Resource tags
- :type tags: dict[str, str]
- :param kind: The kind of application that this component refers to, used
- to customize UI. This value is a freeform string, values should typically
- be one of the following: web, ios, other, store, java, phone.
- :type kind: str
- :ivar application_id: The unique ID of your application. This field
- mirrors the 'Name' field and cannot be changed.
- :vartype application_id: str
- :ivar app_id: Application Insights Unique ID for your Application.
- :vartype app_id: str
- :param application_type: Type of application being monitored. Possible
- values include: 'web', 'other'. Default value: "web" .
- :type application_type: str or
- ~azure.mgmt.applicationinsights.models.ApplicationType
- :param flow_type: Used by the Application Insights system to determine
- what kind of flow this component was created by. This is to be set to
- 'Bluefield' when creating/updating a component via the REST API. Possible
- values include: 'Bluefield'. Default value: "Bluefield" .
- :type flow_type: str or ~azure.mgmt.applicationinsights.models.FlowType
- :param request_source: Describes what tool created this Application
- Insights component. Customers using this API should set this to the
- default 'rest'. Possible values include: 'rest'. Default value: "rest" .
- :type request_source: str or
- ~azure.mgmt.applicationinsights.models.RequestSource
- :ivar instrumentation_key: Application Insights Instrumentation key. A
- read-only value that applications can use to identify the destination for
- all telemetry sent to Azure Application Insights. This value will be
- supplied upon construction of each new Application Insights component.
- :vartype instrumentation_key: str
- :ivar creation_date: Creation Date for the Application Insights component,
- in ISO 8601 format.
- :vartype creation_date: datetime
- :ivar tenant_id: Azure Tenant Id.
- :vartype tenant_id: str
- :param hockey_app_id: The unique application ID created when a new
- application is added to HockeyApp, used for communications with HockeyApp.
- :type hockey_app_id: str
- :ivar hockey_app_token: Token used to authenticate communications with
- between Application Insights and HockeyApp.
- :vartype hockey_app_token: str
- :ivar provisioning_state: Current state of this component: whether or not
- is has been provisioned within the resource group it is defined. Users
- cannot change this value but are able to read from it. Values will include
- Succeeded, Deploying, Canceled, and Failed.
- :vartype provisioning_state: str
- :param sampling_percentage: Percentage of the data produced by the
- application being monitored that is being sampled for Application Insights
- telemetry.
- :type sampling_percentage: float
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'name': {'readonly': True},
- 'type': {'readonly': True},
- 'location': {'required': True},
- 'kind': {'required': True},
- 'application_id': {'readonly': True},
- 'app_id': {'readonly': True},
- 'application_type': {'required': True},
- 'instrumentation_key': {'readonly': True},
- 'creation_date': {'readonly': True},
- 'tenant_id': {'readonly': True},
- 'hockey_app_token': {'readonly': True},
- 'provisioning_state': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'location': {'key': 'location', 'type': 'str'},
- 'tags': {'key': 'tags', 'type': '{str}'},
- 'kind': {'key': 'kind', 'type': 'str'},
- 'application_id': {'key': 'properties.ApplicationId', 'type': 'str'},
- 'app_id': {'key': 'properties.AppId', 'type': 'str'},
- 'application_type': {'key': 'properties.Application_Type', 'type': 'str'},
- 'flow_type': {'key': 'properties.Flow_Type', 'type': 'str'},
- 'request_source': {'key': 'properties.Request_Source', 'type': 'str'},
- 'instrumentation_key': {'key': 'properties.InstrumentationKey', 'type': 'str'},
- 'creation_date': {'key': 'properties.CreationDate', 'type': 'iso-8601'},
- 'tenant_id': {'key': 'properties.TenantId', 'type': 'str'},
- 'hockey_app_id': {'key': 'properties.HockeyAppId', 'type': 'str'},
- 'hockey_app_token': {'key': 'properties.HockeyAppToken', 'type': 'str'},
- 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
- 'sampling_percentage': {'key': 'properties.SamplingPercentage', 'type': 'float'},
- }
-
- def __init__(self, location, kind, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id=None, sampling_percentage=None):
- super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags)
- self.kind = kind
- self.application_id = None
- self.app_id = None
- self.application_type = application_type
- self.flow_type = flow_type
- self.request_source = request_source
- self.instrumentation_key = None
- self.creation_date = None
- self.tenant_id = None
- self.hockey_app_id = hockey_app_id
- self.hockey_app_token = None
- self.provisioning_state = None
- self.sampling_percentage = sampling_percentage
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_api_key.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_api_key.py
deleted file mode 100644
index b5d76a45250..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_api_key.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 ApplicationInsightsComponentAPIKey(Model):
- """Properties that define an API key of an Application Insights Component.
-
- Variables are only populated by the server, and will be ignored when
- sending a request.
-
- :ivar id: The unique ID of the API key inside an Applciation Insights
- component. It is auto generated when the API key is created.
- :vartype id: str
- :ivar api_key: The API key value. It will be only return once when the API
- Key was created.
- :vartype api_key: str
- :param created_date: The create date of this API key.
- :type created_date: str
- :param name: The name of the API key.
- :type name: str
- :param linked_read_properties: The read access rights of this API Key.
- :type linked_read_properties: list[str]
- :param linked_write_properties: The write access rights of this API Key.
- :type linked_write_properties: list[str]
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'api_key': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'api_key': {'key': 'apiKey', 'type': 'str'},
- 'created_date': {'key': 'createdDate', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'},
- 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'},
- }
-
- def __init__(self, created_date=None, name=None, linked_read_properties=None, linked_write_properties=None):
- super(ApplicationInsightsComponentAPIKey, self).__init__()
- self.id = None
- self.api_key = None
- self.created_date = created_date
- self.name = name
- self.linked_read_properties = linked_read_properties
- self.linked_write_properties = linked_write_properties
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_billing_features.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_billing_features.py
deleted file mode 100644
index c6a653660cd..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_billing_features.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 ApplicationInsightsComponentBillingFeatures(Model):
- """An Application Insights component billing features.
-
- :param data_volume_cap: An Application Insights component daily data
- volumne cap
- :type data_volume_cap:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap
- :param current_billing_features: Current enabled pricing plan. When the
- component is in the Enterprise plan, this will list both 'Basic' and
- 'Application Insights Enterprise'.
- :type current_billing_features: list[str]
- """
-
- _attribute_map = {
- 'data_volume_cap': {'key': 'DataVolumeCap', 'type': 'ApplicationInsightsComponentDataVolumeCap'},
- 'current_billing_features': {'key': 'CurrentBillingFeatures', 'type': '[str]'},
- }
-
- def __init__(self, data_volume_cap=None, current_billing_features=None):
- super(ApplicationInsightsComponentBillingFeatures, self).__init__()
- self.data_volume_cap = data_volume_cap
- self.current_billing_features = current_billing_features
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_data_volume_cap.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_data_volume_cap.py
deleted file mode 100644
index 3fd7a709fc2..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_data_volume_cap.py
+++ /dev/null
@@ -1,59 +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 ApplicationInsightsComponentDataVolumeCap(Model):
- """An Application Insights component daily data volumne cap.
-
- Variables are only populated by the server, and will be ignored when
- sending a request.
-
- :param cap: Daily data volume cap in GB.
- :type cap: float
- :ivar reset_time: Daily data volume cap UTC reset hour.
- :vartype reset_time: int
- :param warning_threshold: Reserved, not used for now.
- :type warning_threshold: int
- :param stop_send_notification_when_hit_threshold: Reserved, not used for
- now.
- :type stop_send_notification_when_hit_threshold: bool
- :param stop_send_notification_when_hit_cap: Do not send a notification
- email when the daily data volume cap is met.
- :type stop_send_notification_when_hit_cap: bool
- :ivar max_history_cap: Maximum daily data volume cap that the user can set
- for this component.
- :vartype max_history_cap: float
- """
-
- _validation = {
- 'reset_time': {'readonly': True},
- 'max_history_cap': {'readonly': True},
- }
-
- _attribute_map = {
- 'cap': {'key': 'Cap', 'type': 'float'},
- 'reset_time': {'key': 'ResetTime', 'type': 'int'},
- 'warning_threshold': {'key': 'WarningThreshold', 'type': 'int'},
- 'stop_send_notification_when_hit_threshold': {'key': 'StopSendNotificationWhenHitThreshold', 'type': 'bool'},
- 'stop_send_notification_when_hit_cap': {'key': 'StopSendNotificationWhenHitCap', 'type': 'bool'},
- 'max_history_cap': {'key': 'MaxHistoryCap', 'type': 'float'},
- }
-
- def __init__(self, cap=None, warning_threshold=None, stop_send_notification_when_hit_threshold=None, stop_send_notification_when_hit_cap=None):
- super(ApplicationInsightsComponentDataVolumeCap, self).__init__()
- self.cap = cap
- self.reset_time = None
- self.warning_threshold = warning_threshold
- self.stop_send_notification_when_hit_threshold = stop_send_notification_when_hit_threshold
- self.stop_send_notification_when_hit_cap = stop_send_notification_when_hit_cap
- self.max_history_cap = None
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_export_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_export_configuration.py
deleted file mode 100644
index 33a28500dd7..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_export_configuration.py
+++ /dev/null
@@ -1,142 +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 ApplicationInsightsComponentExportConfiguration(Model):
- """Properties that define a Continuous Export configuration.
-
- Variables are only populated by the server, and will be ignored when
- sending a request.
-
- :ivar export_id: The unique ID of the export configuration inside an
- Applciation Insights component. It is auto generated when the Continuous
- Export configuration is created.
- :vartype export_id: str
- :ivar instrumentation_key: The instrumentation key of the Application
- Insights component.
- :vartype instrumentation_key: str
- :param record_types: This comma separated list of document types that will
- be exported. The possible values include 'Requests', 'Event',
- 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd',
- 'PerformanceCounters', 'Availability', 'Messages'.
- :type record_types: str
- :ivar application_name: The name of the Application Insights component.
- :vartype application_name: str
- :ivar subscription_id: The subscription of the Application Insights
- component.
- :vartype subscription_id: str
- :ivar resource_group: The resource group of the Application Insights
- component.
- :vartype resource_group: str
- :ivar destination_storage_subscription_id: The destination storage account
- subscription ID.
- :vartype destination_storage_subscription_id: str
- :ivar destination_storage_location_id: The destination account location
- ID.
- :vartype destination_storage_location_id: str
- :ivar destination_account_id: The name of destination account.
- :vartype destination_account_id: str
- :ivar destination_type: The destination type.
- :vartype destination_type: str
- :ivar is_user_enabled: This will be 'true' if the Continuous Export
- configuration is enabled, otherwise it will be 'false'.
- :vartype is_user_enabled: str
- :ivar last_user_update: Last time the Continuous Export configuration was
- updated.
- :vartype last_user_update: str
- :param notification_queue_enabled: Deprecated
- :type notification_queue_enabled: str
- :ivar export_status: This indicates current Continuous Export
- configuration status. The possible values are 'Preparing', 'Success',
- 'Failure'.
- :vartype export_status: str
- :ivar last_success_time: The last time data was successfully delivered to
- the destination storage container for this Continuous Export
- configuration.
- :vartype last_success_time: str
- :ivar last_gap_time: The last time the Continuous Export configuration
- started failing.
- :vartype last_gap_time: str
- :ivar permanent_error_reason: This is the reason the Continuous Export
- configuration started failing. It can be 'AzureStorageNotFound' or
- 'AzureStorageAccessDenied'.
- :vartype permanent_error_reason: str
- :ivar storage_name: The name of the destination storage account.
- :vartype storage_name: str
- :ivar container_name: The name of the destination storage container.
- :vartype container_name: str
- """
-
- _validation = {
- 'export_id': {'readonly': True},
- 'instrumentation_key': {'readonly': True},
- 'application_name': {'readonly': True},
- 'subscription_id': {'readonly': True},
- 'resource_group': {'readonly': True},
- 'destination_storage_subscription_id': {'readonly': True},
- 'destination_storage_location_id': {'readonly': True},
- 'destination_account_id': {'readonly': True},
- 'destination_type': {'readonly': True},
- 'is_user_enabled': {'readonly': True},
- 'last_user_update': {'readonly': True},
- 'export_status': {'readonly': True},
- 'last_success_time': {'readonly': True},
- 'last_gap_time': {'readonly': True},
- 'permanent_error_reason': {'readonly': True},
- 'storage_name': {'readonly': True},
- 'container_name': {'readonly': True},
- }
-
- _attribute_map = {
- 'export_id': {'key': 'ExportId', 'type': 'str'},
- 'instrumentation_key': {'key': 'InstrumentationKey', 'type': 'str'},
- 'record_types': {'key': 'RecordTypes', 'type': 'str'},
- 'application_name': {'key': 'ApplicationName', 'type': 'str'},
- 'subscription_id': {'key': 'SubscriptionId', 'type': 'str'},
- 'resource_group': {'key': 'ResourceGroup', 'type': 'str'},
- 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'},
- 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'},
- 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'},
- 'destination_type': {'key': 'DestinationType', 'type': 'str'},
- 'is_user_enabled': {'key': 'IsUserEnabled', 'type': 'str'},
- 'last_user_update': {'key': 'LastUserUpdate', 'type': 'str'},
- 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'},
- 'export_status': {'key': 'ExportStatus', 'type': 'str'},
- 'last_success_time': {'key': 'LastSuccessTime', 'type': 'str'},
- 'last_gap_time': {'key': 'LastGapTime', 'type': 'str'},
- 'permanent_error_reason': {'key': 'PermanentErrorReason', 'type': 'str'},
- 'storage_name': {'key': 'StorageName', 'type': 'str'},
- 'container_name': {'key': 'ContainerName', 'type': 'str'},
- }
-
- def __init__(self, record_types=None, notification_queue_enabled=None):
- super(ApplicationInsightsComponentExportConfiguration, self).__init__()
- self.export_id = None
- self.instrumentation_key = None
- self.record_types = record_types
- self.application_name = None
- self.subscription_id = None
- self.resource_group = None
- self.destination_storage_subscription_id = None
- self.destination_storage_location_id = None
- self.destination_account_id = None
- self.destination_type = None
- self.is_user_enabled = None
- self.last_user_update = None
- self.notification_queue_enabled = notification_queue_enabled
- self.export_status = None
- self.last_success_time = None
- self.last_gap_time = None
- self.permanent_error_reason = None
- self.storage_name = None
- self.container_name = None
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_export_request.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_export_request.py
deleted file mode 100644
index c35eb10ab56..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_export_request.py
+++ /dev/null
@@ -1,69 +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 ApplicationInsightsComponentExportRequest(Model):
- """An Application Insights component Continuous Export configuration request
- definition.
-
- :param record_types: The document types to be exported, as comma separated
- values. Allowed values include 'Requests', 'Event', 'Exceptions',
- 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd',
- 'PerformanceCounters', 'Availability', 'Messages'.
- :type record_types: str
- :param destination_type: The Continuous Export destination type. This has
- to be 'Blob'.
- :type destination_type: str
- :param destination_address: The SAS URL for the destination storage
- container. It must grant write permission.
- :type destination_address: str
- :param is_enabled: Set to 'true' to create a Continuous Export
- configuration as enabled, otherwise set it to 'false'.
- :type is_enabled: str
- :param notification_queue_enabled: Deprecated
- :type notification_queue_enabled: str
- :param notification_queue_uri: Deprecated
- :type notification_queue_uri: str
- :param destination_storage_subscription_id: The subscription ID of the
- destination storage container.
- :type destination_storage_subscription_id: str
- :param destination_storage_location_id: The location ID of the destination
- storage container.
- :type destination_storage_location_id: str
- :param destination_account_id: The name of destination storage account.
- :type destination_account_id: str
- """
-
- _attribute_map = {
- 'record_types': {'key': 'RecordTypes', 'type': 'str'},
- 'destination_type': {'key': 'DestinationType', 'type': 'str'},
- 'destination_address': {'key': 'DestinationAddress', 'type': 'str'},
- 'is_enabled': {'key': 'IsEnabled', 'type': 'str'},
- 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'},
- 'notification_queue_uri': {'key': 'NotificationQueueUri', 'type': 'str'},
- 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'},
- 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'},
- 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'},
- }
-
- def __init__(self, record_types=None, destination_type=None, destination_address=None, is_enabled=None, notification_queue_enabled=None, notification_queue_uri=None, destination_storage_subscription_id=None, destination_storage_location_id=None, destination_account_id=None):
- super(ApplicationInsightsComponentExportRequest, self).__init__()
- self.record_types = record_types
- self.destination_type = destination_type
- self.destination_address = destination_address
- self.is_enabled = is_enabled
- self.notification_queue_enabled = notification_queue_enabled
- self.notification_queue_uri = notification_queue_uri
- self.destination_storage_subscription_id = destination_storage_subscription_id
- self.destination_storage_location_id = destination_storage_location_id
- self.destination_account_id = destination_account_id
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_proactive_detection_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_proactive_detection_configuration.py
deleted file mode 100644
index 14734b3c0f6..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_proactive_detection_configuration.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 ApplicationInsightsComponentProactiveDetectionConfiguration(Model):
- """Properties that define a ProactiveDetection configuration.
-
- :param name: The rule name
- :type name: str
- :param enabled: A flag that indicates whether this rule is enabled by the
- user
- :type enabled: bool
- :param send_emails_to_subscription_owners: A flag that indicated whether
- notifications on this rule should be sent to subscription owners
- :type send_emails_to_subscription_owners: bool
- :param custom_emails: Custom email addresses for this rule notifications
- :type custom_emails: list[str]
- :param last_updated_time: The last time this rule was updated
- :type last_updated_time: str
- :param rule_definitions: Static definitions of the ProactiveDetection
- configuration rule (same values for all components).
- :type rule_definitions:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions
- """
-
- _attribute_map = {
- 'name': {'key': 'Name', 'type': 'str'},
- 'enabled': {'key': 'Enabled', 'type': 'bool'},
- 'send_emails_to_subscription_owners': {'key': 'SendEmailsToSubscriptionOwners', 'type': 'bool'},
- 'custom_emails': {'key': 'CustomEmails', 'type': '[str]'},
- 'last_updated_time': {'key': 'LastUpdatedTime', 'type': 'str'},
- 'rule_definitions': {'key': 'RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions'},
- }
-
- def __init__(self, name=None, enabled=None, send_emails_to_subscription_owners=None, custom_emails=None, last_updated_time=None, rule_definitions=None):
- super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__()
- self.name = name
- self.enabled = enabled
- self.send_emails_to_subscription_owners = send_emails_to_subscription_owners
- self.custom_emails = custom_emails
- self.last_updated_time = last_updated_time
- self.rule_definitions = rule_definitions
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py
deleted file mode 100644
index 8fafb0a49a2..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_proactive_detection_configuration_rule_definitions.py
+++ /dev/null
@@ -1,61 +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 ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions(Model):
- """Static definitions of the ProactiveDetection configuration rule (same
- values for all components).
-
- :param name: The rule name
- :type name: str
- :param display_name: The rule name as it is displayed in UI
- :type display_name: str
- :param description: The rule description
- :type description: str
- :param help_url: URL which displays aditional info about the proactive
- detection rule
- :type help_url: str
- :param is_hidden: A flag indicating whether the rule is hidden (from the
- UI)
- :type is_hidden: bool
- :param is_enabled_by_default: A flag indicating whether the rule is
- enabled by default
- :type is_enabled_by_default: bool
- :param is_in_preview: A flag indicating whether the rule is in preview
- :type is_in_preview: bool
- :param supports_email_notifications: A flag indicating whether email
- notifications are supported for detections for this rule
- :type supports_email_notifications: bool
- """
-
- _attribute_map = {
- 'name': {'key': 'Name', 'type': 'str'},
- 'display_name': {'key': 'DisplayName', 'type': 'str'},
- 'description': {'key': 'Description', 'type': 'str'},
- 'help_url': {'key': 'HelpUrl', 'type': 'str'},
- 'is_hidden': {'key': 'IsHidden', 'type': 'bool'},
- 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'},
- 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'},
- 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'},
- }
-
- def __init__(self, name=None, display_name=None, description=None, help_url=None, is_hidden=None, is_enabled_by_default=None, is_in_preview=None, supports_email_notifications=None):
- super(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, self).__init__()
- self.name = name
- self.display_name = display_name
- self.description = description
- self.help_url = help_url
- self.is_hidden = is_hidden
- self.is_enabled_by_default = is_enabled_by_default
- self.is_in_preview = is_in_preview
- self.supports_email_notifications = supports_email_notifications
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_quota_status.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_quota_status.py
deleted file mode 100644
index 6b559a50061..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_quota_status.py
+++ /dev/null
@@ -1,47 +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 ApplicationInsightsComponentQuotaStatus(Model):
- """An Application Insights component daily data volume cap status.
-
- Variables are only populated by the server, and will be ignored when
- sending a request.
-
- :ivar app_id: The Application ID for the Application Insights component.
- :vartype app_id: str
- :ivar should_be_throttled: The daily data volume cap is met, and data
- ingestion will be stopped.
- :vartype should_be_throttled: bool
- :ivar expiration_time: Date and time when the daily data volume cap will
- be reset, and data ingestion will resume.
- :vartype expiration_time: str
- """
-
- _validation = {
- 'app_id': {'readonly': True},
- 'should_be_throttled': {'readonly': True},
- 'expiration_time': {'readonly': True},
- }
-
- _attribute_map = {
- 'app_id': {'key': 'AppId', 'type': 'str'},
- 'should_be_throttled': {'key': 'ShouldBeThrottled', 'type': 'bool'},
- 'expiration_time': {'key': 'ExpirationTime', 'type': 'str'},
- }
-
- def __init__(self):
- super(ApplicationInsightsComponentQuotaStatus, self).__init__()
- self.app_id = None
- self.should_be_throttled = None
- self.expiration_time = None
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/error_response.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/error_response.py
deleted file mode 100644
index ba4967dac93..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/error_response.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
-from msrest.exceptions import HttpOperationError
-
-
-class ErrorResponse(Model):
- """Error reponse indicates Insights service is not able to process the
- incoming request. The reason is provided in the error message.
-
- :param code: Error code.
- :type code: str
- :param message: Error message indicating why the operation failed.
- :type message: str
- """
-
- _attribute_map = {
- 'code': {'key': 'code', 'type': 'str'},
- 'message': {'key': 'message', 'type': 'str'},
- }
-
- def __init__(self, code=None, message=None):
- super(ErrorResponse, self).__init__()
- self.code = code
- self.message = message
-
-
-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/mgmt_applicationinsights/models/operation.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/operation.py
deleted file mode 100644
index ff52ee65e1f..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/operation.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 Operation(Model):
- """CDN REST API operation.
-
- :param name: Operation name: {provider}/{resource}/{operation}
- :type name: str
- :param display: The object that represents the operation.
- :type display: ~azure.mgmt.applicationinsights.models.OperationDisplay
- """
-
- _attribute_map = {
- 'name': {'key': 'name', 'type': 'str'},
- 'display': {'key': 'display', 'type': 'OperationDisplay'},
- }
-
- def __init__(self, name=None, display=None):
- super(Operation, self).__init__()
- self.name = name
- self.display = display
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/operation_display.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/operation_display.py
deleted file mode 100644
index 1bd751e13fa..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/operation_display.py
+++ /dev/null
@@ -1,37 +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 OperationDisplay(Model):
- """The object that represents the operation.
-
- :param provider: Service provider: Microsoft.Cdn
- :type provider: str
- :param resource: Resource on which the operation is performed: Profile,
- endpoint, etc.
- :type resource: str
- :param operation: Operation type: Read, write, delete, etc.
- :type operation: str
- """
-
- _attribute_map = {
- 'provider': {'key': 'provider', 'type': 'str'},
- 'resource': {'key': 'resource', 'type': 'str'},
- 'operation': {'key': 'operation', 'type': 'str'},
- }
-
- def __init__(self, provider=None, resource=None, operation=None):
- super(OperationDisplay, self).__init__()
- self.provider = provider
- self.resource = resource
- self.operation = operation
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/resource.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/resource.py
deleted file mode 100644
index 1552cf70c86..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/resource.py
+++ /dev/null
@@ -1,54 +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 Resource(Model):
- """An azure resource object.
-
- Variables are only populated by the server, and will be ignored when
- sending a request.
-
- :ivar id: Azure resource Id
- :vartype id: str
- :ivar name: Azure resource name
- :vartype name: str
- :ivar type: Azure resource type
- :vartype type: str
- :param location: Resource location
- :type location: str
- :param tags: Resource tags
- :type tags: dict[str, str]
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'name': {'readonly': True},
- 'type': {'readonly': True},
- 'location': {'required': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'location': {'key': 'location', 'type': 'str'},
- 'tags': {'key': 'tags', 'type': '{str}'},
- }
-
- def __init__(self, location, tags=None):
- super(Resource, self).__init__()
- self.id = None
- self.name = None
- self.type = None
- self.location = location
- self.tags = tags
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/web_test.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/web_test.py
deleted file mode 100644
index 103aa8c9c06..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/web_test.py
+++ /dev/null
@@ -1,117 +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 .resource import Resource
-
-
-class WebTest(Resource):
- """An Application Insights web test definition.
-
- Variables are only populated by the server, and will be ignored when
- sending a request.
-
- :ivar id: Azure resource Id
- :vartype id: str
- :ivar name: Azure resource name
- :vartype name: str
- :ivar type: Azure resource type
- :vartype type: str
- :param location: Resource location
- :type location: str
- :param tags: Resource tags
- :type tags: dict[str, str]
- :param kind: The kind of web test that this web test watches. Choices are
- ping and multistep. Possible values include: 'ping', 'multistep'. Default
- value: "ping" .
- :type kind: str or ~azure.mgmt.applicationinsights.models.WebTestKind
- :param synthetic_monitor_id: Unique ID of this WebTest. This is typically
- the same value as the Name field.
- :type synthetic_monitor_id: str
- :param web_test_name: User defined name if this WebTest.
- :type web_test_name: str
- :param description: Purpose/user defined descriptive test for this
- WebTest.
- :type description: str
- :param enabled: Is the test actively being monitored.
- :type enabled: bool
- :param frequency: Interval in seconds between test runs for this WebTest.
- Default value is 300. Default value: 300 .
- :type frequency: int
- :param timeout: Seconds until this WebTest will timeout and fail. Default
- value is 30. Default value: 30 .
- :type timeout: int
- :param web_test_kind: The kind of web test this is, valid choices are ping
- and multistep. Possible values include: 'ping', 'multistep'. Default
- value: "ping" .
- :type web_test_kind: str or
- ~azure.mgmt.applicationinsights.models.WebTestKind
- :param retry_enabled: Allow for retries should this WebTest fail.
- :type retry_enabled: bool
- :param locations: A list of where to physically run the tests from to give
- global coverage for accessibility of your application.
- :type locations:
- list[~azure.mgmt.applicationinsights.models.WebTestGeolocation]
- :param configuration: An XML configuration specification for a WebTest.
- :type configuration:
- ~azure.mgmt.applicationinsights.models.WebTestPropertiesConfiguration
- :ivar provisioning_state: Current state of this component, whether or not
- is has been provisioned within the resource group it is defined. Users
- cannot change this value but are able to read from it. Values will include
- Succeeded, Deploying, Canceled, and Failed.
- :vartype provisioning_state: str
- """
-
- _validation = {
- 'id': {'readonly': True},
- 'name': {'readonly': True},
- 'type': {'readonly': True},
- 'location': {'required': True},
- 'synthetic_monitor_id': {'required': True},
- 'web_test_name': {'required': True},
- 'web_test_kind': {'required': True},
- 'locations': {'required': True},
- 'provisioning_state': {'readonly': True},
- }
-
- _attribute_map = {
- 'id': {'key': 'id', 'type': 'str'},
- 'name': {'key': 'name', 'type': 'str'},
- 'type': {'key': 'type', 'type': 'str'},
- 'location': {'key': 'location', 'type': 'str'},
- 'tags': {'key': 'tags', 'type': '{str}'},
- 'kind': {'key': 'kind', 'type': 'WebTestKind'},
- 'synthetic_monitor_id': {'key': 'properties.SyntheticMonitorId', 'type': 'str'},
- 'web_test_name': {'key': 'properties.Name', 'type': 'str'},
- 'description': {'key': 'properties.Description', 'type': 'str'},
- 'enabled': {'key': 'properties.Enabled', 'type': 'bool'},
- 'frequency': {'key': 'properties.Frequency', 'type': 'int'},
- 'timeout': {'key': 'properties.Timeout', 'type': 'int'},
- 'web_test_kind': {'key': 'properties.Kind', 'type': 'WebTestKind'},
- 'retry_enabled': {'key': 'properties.RetryEnabled', 'type': 'bool'},
- 'locations': {'key': 'properties.Locations', 'type': '[WebTestGeolocation]'},
- 'configuration': {'key': 'properties.Configuration', 'type': 'WebTestPropertiesConfiguration'},
- 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
- }
-
- def __init__(self, location, synthetic_monitor_id, web_test_name, locations, tags=None, kind="ping", description=None, enabled=None, frequency=300, timeout=30, web_test_kind="ping", retry_enabled=None, configuration=None):
- super(WebTest, self).__init__(location=location, tags=tags)
- self.kind = kind
- self.synthetic_monitor_id = synthetic_monitor_id
- self.web_test_name = web_test_name
- self.description = description
- self.enabled = enabled
- self.frequency = frequency
- self.timeout = timeout
- self.web_test_kind = web_test_kind
- self.retry_enabled = retry_enabled
- self.locations = locations
- self.configuration = configuration
- self.provisioning_state = None
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/web_test_geolocation.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/web_test_geolocation.py
deleted file mode 100644
index 8c52d9c31b8..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/web_test_geolocation.py
+++ /dev/null
@@ -1,29 +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 WebTestGeolocation(Model):
- """Geo-physical location to run a web test from. You must specify one or more
- locations for the test to run from.
-
- :param location: Location ID for the webtest to run from.
- :type location: str
- """
-
- _attribute_map = {
- 'location': {'key': 'Id', 'type': 'str'},
- }
-
- def __init__(self, location=None):
- super(WebTestGeolocation, self).__init__()
- self.location = location
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/web_test_properties_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/web_test_properties_configuration.py
deleted file mode 100644
index 6ddd1ec152c..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/web_test_properties_configuration.py
+++ /dev/null
@@ -1,29 +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 WebTestPropertiesConfiguration(Model):
- """An XML configuration specification for a WebTest.
-
- :param web_test: The XML specification of a WebTest to run against an
- application.
- :type web_test: str
- """
-
- _attribute_map = {
- 'web_test': {'key': 'WebTest', 'type': 'str'},
- }
-
- def __init__(self, web_test=None):
- super(WebTestPropertiesConfiguration, self).__init__()
- self.web_test = web_test
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/__init__.py
deleted file mode 100644
index d8de45a083e..00000000000
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/__init__.py
+++ /dev/null
@@ -1,30 +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 .operations import Operations
-from .components_operations import ComponentsOperations
-from .web_tests_operations import WebTestsOperations
-from .export_configurations_operations import ExportConfigurationsOperations
-from .proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations
-from .component_current_billing_features_operations import ComponentCurrentBillingFeaturesOperations
-from .component_quota_status_operations import ComponentQuotaStatusOperations
-from .api_keys_operations import APIKeysOperations
-
-__all__ = [
- 'Operations',
- 'ComponentsOperations',
- 'WebTestsOperations',
- 'ExportConfigurationsOperations',
- 'ProactiveDetectionConfigurationsOperations',
- 'ComponentCurrentBillingFeaturesOperations',
- 'ComponentQuotaStatusOperations',
- 'APIKeysOperations',
-]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/__init__.py
new file mode 100644
index 00000000000..298512941d9
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/__init__.py
@@ -0,0 +1,19 @@
+# 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 ._configuration import ApplicationInsightsManagementClientConfiguration
+from ._application_insights_management_client import ApplicationInsightsManagementClient
+__all__ = ['ApplicationInsightsManagementClient', 'ApplicationInsightsManagementClientConfiguration']
+
+from .version import VERSION
+
+__version__ = VERSION
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/_application_insights_management_client.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/_application_insights_management_client.py
new file mode 100644
index 00000000000..59e90899d57
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/_application_insights_management_client.py
@@ -0,0 +1,124 @@
+# 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 Serializer, Deserializer
+
+from ._configuration import ApplicationInsightsManagementClientConfiguration
+from .operations import Operations
+from .operations import AnnotationsOperations
+from .operations import APIKeysOperations
+from .operations import ExportConfigurationsOperations
+from .operations import ComponentCurrentBillingFeaturesOperations
+from .operations import ComponentQuotaStatusOperations
+from .operations import ComponentFeatureCapabilitiesOperations
+from .operations import ComponentAvailableFeaturesOperations
+from .operations import ProactiveDetectionConfigurationsOperations
+from .operations import ComponentsOperations
+from .operations import WorkItemConfigurationsOperations
+from .operations import FavoritesOperations
+from .operations import WebTestLocationsOperations
+from .operations import WebTestsOperations
+from .operations import AnalyticsItemsOperations
+from .operations import WorkbooksOperations
+from . import models
+
+
+class ApplicationInsightsManagementClient(SDKClient):
+ """Composite Swagger for Application Insights Management Client
+
+ :ivar config: Configuration for client.
+ :vartype config: ApplicationInsightsManagementClientConfiguration
+
+ :ivar operations: Operations operations
+ :vartype operations: azure.mgmt.applicationinsights.v2015_05_01.operations.Operations
+ :ivar annotations: Annotations operations
+ :vartype annotations: azure.mgmt.applicationinsights.v2015_05_01.operations.AnnotationsOperations
+ :ivar api_keys: APIKeys operations
+ :vartype api_keys: azure.mgmt.applicationinsights.v2015_05_01.operations.APIKeysOperations
+ :ivar export_configurations: ExportConfigurations operations
+ :vartype export_configurations: azure.mgmt.applicationinsights.v2015_05_01.operations.ExportConfigurationsOperations
+ :ivar component_current_billing_features: ComponentCurrentBillingFeatures operations
+ :vartype component_current_billing_features: azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentCurrentBillingFeaturesOperations
+ :ivar component_quota_status: ComponentQuotaStatus operations
+ :vartype component_quota_status: azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentQuotaStatusOperations
+ :ivar component_feature_capabilities: ComponentFeatureCapabilities operations
+ :vartype component_feature_capabilities: azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentFeatureCapabilitiesOperations
+ :ivar component_available_features: ComponentAvailableFeatures operations
+ :vartype component_available_features: azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentAvailableFeaturesOperations
+ :ivar proactive_detection_configurations: ProactiveDetectionConfigurations operations
+ :vartype proactive_detection_configurations: azure.mgmt.applicationinsights.v2015_05_01.operations.ProactiveDetectionConfigurationsOperations
+ :ivar components: Components operations
+ :vartype components: azure.mgmt.applicationinsights.v2015_05_01.operations.ComponentsOperations
+ :ivar work_item_configurations: WorkItemConfigurations operations
+ :vartype work_item_configurations: azure.mgmt.applicationinsights.v2015_05_01.operations.WorkItemConfigurationsOperations
+ :ivar favorites: Favorites operations
+ :vartype favorites: azure.mgmt.applicationinsights.v2015_05_01.operations.FavoritesOperations
+ :ivar web_test_locations: WebTestLocations operations
+ :vartype web_test_locations: azure.mgmt.applicationinsights.v2015_05_01.operations.WebTestLocationsOperations
+ :ivar web_tests: WebTests operations
+ :vartype web_tests: azure.mgmt.applicationinsights.v2015_05_01.operations.WebTestsOperations
+ :ivar analytics_items: AnalyticsItems operations
+ :vartype analytics_items: azure.mgmt.applicationinsights.v2015_05_01.operations.AnalyticsItemsOperations
+ :ivar workbooks: Workbooks operations
+ :vartype workbooks: azure.mgmt.applicationinsights.v2015_05_01.operations.WorkbooksOperations
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
+ super(ApplicationInsightsManagementClient, 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 = '2015-05-01'
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+
+ self.operations = Operations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.annotations = AnnotationsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.api_keys = APIKeysOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.export_configurations = ExportConfigurationsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.component_current_billing_features = ComponentCurrentBillingFeaturesOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.component_quota_status = ComponentQuotaStatusOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.component_feature_capabilities = ComponentFeatureCapabilitiesOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.component_available_features = ComponentAvailableFeaturesOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.proactive_detection_configurations = ProactiveDetectionConfigurationsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.components = ComponentsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.work_item_configurations = WorkItemConfigurationsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.favorites = FavoritesOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.web_test_locations = WebTestLocationsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.web_tests = WebTestsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.analytics_items = AnalyticsItemsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.workbooks = WorkbooksOperations(
+ self._client, self.config, self._serialize, self._deserialize)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/_configuration.py
new file mode 100644
index 00000000000..6c855295a4b
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/_configuration.py
@@ -0,0 +1,48 @@
+# 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 msrestazure import AzureConfiguration
+
+from .version import VERSION
+
+
+class ApplicationInsightsManagementClientConfiguration(AzureConfiguration):
+ """Configuration for ApplicationInsightsManagementClient
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ if credentials is None:
+ raise ValueError("Parameter 'credentials' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if not base_url:
+ base_url = 'https://management.azure.com'
+
+ super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url)
+
+ # Starting Autorest.Python 4.0.64, make connection pool activated by default
+ self.keep_alive = True
+
+ self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION))
+ self.add_user_agent('Azure-SDK-For-Python')
+
+ self.credentials = credentials
+ self.subscription_id = subscription_id
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/__init__.py
new file mode 100644
index 00000000000..44a11647cfb
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/__init__.py
@@ -0,0 +1,191 @@
+# 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 ._models_py3 import Annotation
+ from ._models_py3 import AnnotationError, AnnotationErrorException
+ from ._models_py3 import APIKeyRequest
+ from ._models_py3 import ApplicationInsightsComponent
+ from ._models_py3 import ApplicationInsightsComponentAnalyticsItem
+ from ._models_py3 import ApplicationInsightsComponentAnalyticsItemProperties
+ from ._models_py3 import ApplicationInsightsComponentAPIKey
+ from ._models_py3 import ApplicationInsightsComponentAvailableFeatures
+ from ._models_py3 import ApplicationInsightsComponentBillingFeatures
+ from ._models_py3 import ApplicationInsightsComponentDataVolumeCap
+ from ._models_py3 import ApplicationInsightsComponentExportConfiguration
+ from ._models_py3 import ApplicationInsightsComponentExportRequest
+ from ._models_py3 import ApplicationInsightsComponentFavorite
+ from ._models_py3 import ApplicationInsightsComponentFeature
+ from ._models_py3 import ApplicationInsightsComponentFeatureCapabilities
+ from ._models_py3 import ApplicationInsightsComponentFeatureCapability
+ from ._models_py3 import ApplicationInsightsComponentProactiveDetectionConfiguration
+ from ._models_py3 import ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions
+ from ._models_py3 import ApplicationInsightsComponentQuotaStatus
+ from ._models_py3 import ApplicationInsightsComponentWebTestLocation
+ from ._models_py3 import ComponentPurgeBody
+ from ._models_py3 import ComponentPurgeBodyFilters
+ from ._models_py3 import ComponentPurgeResponse
+ from ._models_py3 import ComponentPurgeStatusResponse
+ from ._models_py3 import ComponentsResource
+ from ._models_py3 import ErrorFieldContract
+ from ._models_py3 import ErrorResponse, ErrorResponseException
+ from ._models_py3 import InnerError
+ from ._models_py3 import LinkProperties
+ from ._models_py3 import Operation
+ from ._models_py3 import OperationDisplay
+ from ._models_py3 import PrivateLinkScopedResource
+ from ._models_py3 import TagsResource
+ from ._models_py3 import WebTest
+ from ._models_py3 import WebTestGeolocation
+ from ._models_py3 import WebTestPropertiesConfiguration
+ from ._models_py3 import WebtestsResource
+ from ._models_py3 import Workbook
+ from ._models_py3 import WorkbookError, WorkbookErrorException
+ from ._models_py3 import WorkbookResource
+ from ._models_py3 import WorkItemConfiguration
+ from ._models_py3 import WorkItemConfigurationError, WorkItemConfigurationErrorException
+ from ._models_py3 import WorkItemCreateConfiguration
+except (SyntaxError, ImportError):
+ from ._models import Annotation
+ from ._models import AnnotationError, AnnotationErrorException
+ from ._models import APIKeyRequest
+ from ._models import ApplicationInsightsComponent
+ from ._models import ApplicationInsightsComponentAnalyticsItem
+ from ._models import ApplicationInsightsComponentAnalyticsItemProperties
+ from ._models import ApplicationInsightsComponentAPIKey
+ from ._models import ApplicationInsightsComponentAvailableFeatures
+ from ._models import ApplicationInsightsComponentBillingFeatures
+ from ._models import ApplicationInsightsComponentDataVolumeCap
+ from ._models import ApplicationInsightsComponentExportConfiguration
+ from ._models import ApplicationInsightsComponentExportRequest
+ from ._models import ApplicationInsightsComponentFavorite
+ from ._models import ApplicationInsightsComponentFeature
+ from ._models import ApplicationInsightsComponentFeatureCapabilities
+ from ._models import ApplicationInsightsComponentFeatureCapability
+ from ._models import ApplicationInsightsComponentProactiveDetectionConfiguration
+ from ._models import ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions
+ from ._models import ApplicationInsightsComponentQuotaStatus
+ from ._models import ApplicationInsightsComponentWebTestLocation
+ from ._models import ComponentPurgeBody
+ from ._models import ComponentPurgeBodyFilters
+ from ._models import ComponentPurgeResponse
+ from ._models import ComponentPurgeStatusResponse
+ from ._models import ComponentsResource
+ from ._models import ErrorFieldContract
+ from ._models import ErrorResponse, ErrorResponseException
+ from ._models import InnerError
+ from ._models import LinkProperties
+ from ._models import Operation
+ from ._models import OperationDisplay
+ from ._models import PrivateLinkScopedResource
+ from ._models import TagsResource
+ from ._models import WebTest
+ from ._models import WebTestGeolocation
+ from ._models import WebTestPropertiesConfiguration
+ from ._models import WebtestsResource
+ from ._models import Workbook
+ from ._models import WorkbookError, WorkbookErrorException
+ from ._models import WorkbookResource
+ from ._models import WorkItemConfiguration
+ from ._models import WorkItemConfigurationError, WorkItemConfigurationErrorException
+ from ._models import WorkItemCreateConfiguration
+from ._paged_models import AnnotationPaged
+from ._paged_models import ApplicationInsightsComponentAPIKeyPaged
+from ._paged_models import ApplicationInsightsComponentPaged
+from ._paged_models import ApplicationInsightsComponentWebTestLocationPaged
+from ._paged_models import OperationPaged
+from ._paged_models import WebTestPaged
+from ._paged_models import WorkbookPaged
+from ._paged_models import WorkItemConfigurationPaged
+from ._application_insights_management_client_enums import (
+ ApplicationType,
+ FlowType,
+ RequestSource,
+ PurgeState,
+ PublicNetworkAccessType,
+ FavoriteType,
+ WebTestKind,
+ ItemScope,
+ ItemType,
+ SharedTypeKind,
+ FavoriteSourceType,
+ ItemScopePath,
+ ItemTypeParameter,
+ CategoryType,
+)
+
+__all__ = [
+ 'Annotation',
+ 'AnnotationError', 'AnnotationErrorException',
+ 'APIKeyRequest',
+ 'ApplicationInsightsComponent',
+ 'ApplicationInsightsComponentAnalyticsItem',
+ 'ApplicationInsightsComponentAnalyticsItemProperties',
+ 'ApplicationInsightsComponentAPIKey',
+ 'ApplicationInsightsComponentAvailableFeatures',
+ 'ApplicationInsightsComponentBillingFeatures',
+ 'ApplicationInsightsComponentDataVolumeCap',
+ 'ApplicationInsightsComponentExportConfiguration',
+ 'ApplicationInsightsComponentExportRequest',
+ 'ApplicationInsightsComponentFavorite',
+ 'ApplicationInsightsComponentFeature',
+ 'ApplicationInsightsComponentFeatureCapabilities',
+ 'ApplicationInsightsComponentFeatureCapability',
+ 'ApplicationInsightsComponentProactiveDetectionConfiguration',
+ 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions',
+ 'ApplicationInsightsComponentQuotaStatus',
+ 'ApplicationInsightsComponentWebTestLocation',
+ 'ComponentPurgeBody',
+ 'ComponentPurgeBodyFilters',
+ 'ComponentPurgeResponse',
+ 'ComponentPurgeStatusResponse',
+ 'ComponentsResource',
+ 'ErrorFieldContract',
+ 'ErrorResponse', 'ErrorResponseException',
+ 'InnerError',
+ 'LinkProperties',
+ 'Operation',
+ 'OperationDisplay',
+ 'PrivateLinkScopedResource',
+ 'TagsResource',
+ 'WebTest',
+ 'WebTestGeolocation',
+ 'WebTestPropertiesConfiguration',
+ 'WebtestsResource',
+ 'Workbook',
+ 'WorkbookError', 'WorkbookErrorException',
+ 'WorkbookResource',
+ 'WorkItemConfiguration',
+ 'WorkItemConfigurationError', 'WorkItemConfigurationErrorException',
+ 'WorkItemCreateConfiguration',
+ 'OperationPaged',
+ 'AnnotationPaged',
+ 'ApplicationInsightsComponentAPIKeyPaged',
+ 'ApplicationInsightsComponentPaged',
+ 'WorkItemConfigurationPaged',
+ 'ApplicationInsightsComponentWebTestLocationPaged',
+ 'WebTestPaged',
+ 'WorkbookPaged',
+ 'ApplicationType',
+ 'FlowType',
+ 'RequestSource',
+ 'PurgeState',
+ 'PublicNetworkAccessType',
+ 'FavoriteType',
+ 'WebTestKind',
+ 'ItemScope',
+ 'ItemType',
+ 'SharedTypeKind',
+ 'FavoriteSourceType',
+ 'ItemScopePath',
+ 'ItemTypeParameter',
+ 'CategoryType',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py
new file mode 100644
index 00000000000..64bf85e818c
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_application_insights_management_client_enums.py
@@ -0,0 +1,107 @@
+# 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 ApplicationType(str, Enum):
+
+ web = "web"
+ other = "other"
+
+
+class FlowType(str, Enum):
+
+ bluefield = "Bluefield"
+
+
+class RequestSource(str, Enum):
+
+ rest = "rest"
+
+
+class PurgeState(str, Enum):
+
+ pending = "pending"
+ completed = "completed"
+
+
+class PublicNetworkAccessType(str, Enum):
+
+ enabled = "Enabled" #: Enables connectivity to Application Insights through public DNS.
+ disabled = "Disabled" #: Disables public connectivity to Application Insights through public DNS.
+
+
+class FavoriteType(str, Enum):
+
+ shared = "shared"
+ user = "user"
+
+
+class WebTestKind(str, Enum):
+
+ ping = "ping"
+ multistep = "multistep"
+
+
+class ItemScope(str, Enum):
+
+ shared = "shared"
+ user = "user"
+
+
+class ItemType(str, Enum):
+
+ query = "query"
+ function = "function"
+ folder = "folder"
+ recent = "recent"
+
+
+class SharedTypeKind(str, Enum):
+
+ user = "user"
+ shared = "shared"
+
+
+class FavoriteSourceType(str, Enum):
+
+ retention = "retention"
+ notebook = "notebook"
+ sessions = "sessions"
+ events = "events"
+ userflows = "userflows"
+ funnel = "funnel"
+ impact = "impact"
+ segmentation = "segmentation"
+
+
+class ItemScopePath(str, Enum):
+
+ analytics_items = "analyticsItems"
+ myanalytics_items = "myanalyticsItems"
+
+
+class ItemTypeParameter(str, Enum):
+
+ none = "none"
+ query = "query"
+ function = "function"
+ folder = "folder"
+ recent = "recent"
+
+
+class CategoryType(str, Enum):
+
+ workbook = "workbook"
+ tsg = "TSG"
+ performance = "performance"
+ retention = "retention"
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_models.py
new file mode 100644
index 00000000000..472d68d4503
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_models.py
@@ -0,0 +1,1933 @@
+# 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 Annotation(Model):
+ """Annotation associated with an application insights resource.
+
+ :param annotation_name: Name of annotation
+ :type annotation_name: str
+ :param category: Category of annotation, free form
+ :type category: str
+ :param event_time: Time when event occurred
+ :type event_time: datetime
+ :param id: Unique Id for annotation
+ :type id: str
+ :param properties: Serialized JSON object for detailed properties
+ :type properties: str
+ :param related_annotation: Related parent annotation if any. Default
+ value: "null" .
+ :type related_annotation: str
+ """
+
+ _attribute_map = {
+ 'annotation_name': {'key': 'AnnotationName', 'type': 'str'},
+ 'category': {'key': 'Category', 'type': 'str'},
+ 'event_time': {'key': 'EventTime', 'type': 'iso-8601'},
+ 'id': {'key': 'Id', 'type': 'str'},
+ 'properties': {'key': 'Properties', 'type': 'str'},
+ 'related_annotation': {'key': 'RelatedAnnotation', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(Annotation, self).__init__(**kwargs)
+ self.annotation_name = kwargs.get('annotation_name', None)
+ self.category = kwargs.get('category', None)
+ self.event_time = kwargs.get('event_time', None)
+ self.id = kwargs.get('id', None)
+ self.properties = kwargs.get('properties', None)
+ self.related_annotation = kwargs.get('related_annotation', "null")
+
+
+class AnnotationError(Model):
+ """Error associated with trying to create annotation with Id that already
+ exist.
+
+ :param code: Error detail code and explanation
+ :type code: str
+ :param message: Error message
+ :type message: str
+ :param innererror:
+ :type innererror:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.InnerError
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'innererror': {'key': 'innererror', 'type': 'InnerError'},
+ }
+
+ def __init__(self, **kwargs):
+ super(AnnotationError, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.innererror = kwargs.get('innererror', None)
+
+
+class AnnotationErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'AnnotationError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(AnnotationErrorException, self).__init__(deserialize, response, 'AnnotationError', *args)
+
+
+class APIKeyRequest(Model):
+ """An Application Insights component API Key creation request definition.
+
+ :param name: The name of the API Key.
+ :type name: str
+ :param linked_read_properties: The read access rights of this API Key.
+ :type linked_read_properties: list[str]
+ :param linked_write_properties: The write access rights of this API Key.
+ :type linked_write_properties: list[str]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'},
+ 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(APIKeyRequest, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.linked_read_properties = kwargs.get('linked_read_properties', None)
+ self.linked_write_properties = kwargs.get('linked_write_properties', None)
+
+
+class ComponentsResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentsResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
+
+
+class ApplicationInsightsComponent(ComponentsResource):
+ """An Application Insights component definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param kind: Required. The kind of application that this component refers
+ to, used to customize UI. This value is a freeform string, values should
+ typically be one of the following: web, ios, other, store, java, phone.
+ :type kind: str
+ :ivar application_id: The unique ID of your application. This field
+ mirrors the 'Name' field and cannot be changed.
+ :vartype application_id: str
+ :ivar app_id: Application Insights Unique ID for your Application.
+ :vartype app_id: str
+ :param application_type: Required. Type of application being monitored.
+ Possible values include: 'web', 'other'. Default value: "web" .
+ :type application_type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationType
+ :param flow_type: Used by the Application Insights system to determine
+ what kind of flow this component was created by. This is to be set to
+ 'Bluefield' when creating/updating a component via the REST API. Possible
+ values include: 'Bluefield'. Default value: "Bluefield" .
+ :type flow_type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.FlowType
+ :param request_source: Describes what tool created this Application
+ Insights component. Customers using this API should set this to the
+ default 'rest'. Possible values include: 'rest'. Default value: "rest" .
+ :type request_source: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.RequestSource
+ :ivar instrumentation_key: Application Insights Instrumentation key. A
+ read-only value that applications can use to identify the destination for
+ all telemetry sent to Azure Application Insights. This value will be
+ supplied upon construction of each new Application Insights component.
+ :vartype instrumentation_key: str
+ :ivar creation_date: Creation Date for the Application Insights component,
+ in ISO 8601 format.
+ :vartype creation_date: datetime
+ :ivar tenant_id: Azure Tenant Id.
+ :vartype tenant_id: str
+ :param hockey_app_id: The unique application ID created when a new
+ application is added to HockeyApp, used for communications with HockeyApp.
+ :type hockey_app_id: str
+ :ivar hockey_app_token: Token used to authenticate communications with
+ between Application Insights and HockeyApp.
+ :vartype hockey_app_token: str
+ :ivar provisioning_state: Current state of this component: whether or not
+ is has been provisioned within the resource group it is defined. Users
+ cannot change this value but are able to read from it. Values will include
+ Succeeded, Deploying, Canceled, and Failed.
+ :vartype provisioning_state: str
+ :param sampling_percentage: Percentage of the data produced by the
+ application being monitored that is being sampled for Application Insights
+ telemetry.
+ :type sampling_percentage: float
+ :ivar connection_string: Application Insights component connection string.
+ :vartype connection_string: str
+ :param retention_in_days: Retention period in days. Default value: 90 .
+ :type retention_in_days: int
+ :param disable_ip_masking: Disable IP masking.
+ :type disable_ip_masking: bool
+ :param immediate_purge_data_on30_days: Purge data immediately after 30
+ days.
+ :type immediate_purge_data_on30_days: bool
+ :ivar private_link_scoped_resources: List of linked private link scope
+ resources.
+ :vartype private_link_scoped_resources:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.PrivateLinkScopedResource]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'kind': {'required': True},
+ 'application_id': {'readonly': True},
+ 'app_id': {'readonly': True},
+ 'application_type': {'required': True},
+ 'instrumentation_key': {'readonly': True},
+ 'creation_date': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'hockey_app_token': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'connection_string': {'readonly': True},
+ 'private_link_scoped_resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'application_id': {'key': 'properties.ApplicationId', 'type': 'str'},
+ 'app_id': {'key': 'properties.AppId', 'type': 'str'},
+ 'application_type': {'key': 'properties.Application_Type', 'type': 'str'},
+ 'flow_type': {'key': 'properties.Flow_Type', 'type': 'str'},
+ 'request_source': {'key': 'properties.Request_Source', 'type': 'str'},
+ 'instrumentation_key': {'key': 'properties.InstrumentationKey', 'type': 'str'},
+ 'creation_date': {'key': 'properties.CreationDate', 'type': 'iso-8601'},
+ 'tenant_id': {'key': 'properties.TenantId', 'type': 'str'},
+ 'hockey_app_id': {'key': 'properties.HockeyAppId', 'type': 'str'},
+ 'hockey_app_token': {'key': 'properties.HockeyAppToken', 'type': 'str'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'sampling_percentage': {'key': 'properties.SamplingPercentage', 'type': 'float'},
+ 'connection_string': {'key': 'properties.ConnectionString', 'type': 'str'},
+ 'retention_in_days': {'key': 'properties.RetentionInDays', 'type': 'int'},
+ 'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'},
+ 'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'},
+ 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponent, self).__init__(**kwargs)
+ self.kind = kwargs.get('kind', None)
+ self.application_id = None
+ self.app_id = None
+ self.application_type = kwargs.get('application_type', "web")
+ self.flow_type = kwargs.get('flow_type', "Bluefield")
+ self.request_source = kwargs.get('request_source', "rest")
+ self.instrumentation_key = None
+ self.creation_date = None
+ self.tenant_id = None
+ self.hockey_app_id = kwargs.get('hockey_app_id', None)
+ self.hockey_app_token = None
+ self.provisioning_state = None
+ self.sampling_percentage = kwargs.get('sampling_percentage', None)
+ self.connection_string = None
+ self.retention_in_days = kwargs.get('retention_in_days', 90)
+ self.disable_ip_masking = kwargs.get('disable_ip_masking', None)
+ self.immediate_purge_data_on30_days = kwargs.get('immediate_purge_data_on30_days', None)
+ self.private_link_scoped_resources = None
+
+
+class ApplicationInsightsComponentAnalyticsItem(Model):
+ """Properties that define an Analytics item that is associated to an
+ Application Insights component.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param id: Internally assigned unique id of the item definition.
+ :type id: str
+ :param name: The user-defined name of the item.
+ :type name: str
+ :param content: The content of this item
+ :type content: str
+ :ivar version: This instance's version of the data model. This can change
+ as new features are added.
+ :vartype version: str
+ :param scope: Enum indicating if this item definition is owned by a
+ specific user or is shared between all users with access to the
+ Application Insights component. Possible values include: 'shared', 'user'
+ :type scope: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemScope
+ :param type: Enum indicating the type of the Analytics item. Possible
+ values include: 'query', 'function', 'folder', 'recent'
+ :type type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemType
+ :ivar time_created: Date and time in UTC when this item was created.
+ :vartype time_created: str
+ :ivar time_modified: Date and time in UTC of the last modification that
+ was made to this item.
+ :vartype time_modified: str
+ :param properties:
+ :type properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAnalyticsItemProperties
+ """
+
+ _validation = {
+ 'version': {'readonly': True},
+ 'time_created': {'readonly': True},
+ 'time_modified': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'Id', 'type': 'str'},
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'content': {'key': 'Content', 'type': 'str'},
+ 'version': {'key': 'Version', 'type': 'str'},
+ 'scope': {'key': 'Scope', 'type': 'str'},
+ 'type': {'key': 'Type', 'type': 'str'},
+ 'time_created': {'key': 'TimeCreated', 'type': 'str'},
+ 'time_modified': {'key': 'TimeModified', 'type': 'str'},
+ 'properties': {'key': 'Properties', 'type': 'ApplicationInsightsComponentAnalyticsItemProperties'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentAnalyticsItem, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+ self.name = kwargs.get('name', None)
+ self.content = kwargs.get('content', None)
+ self.version = None
+ self.scope = kwargs.get('scope', None)
+ self.type = kwargs.get('type', None)
+ self.time_created = None
+ self.time_modified = None
+ self.properties = kwargs.get('properties', None)
+
+
+class ApplicationInsightsComponentAnalyticsItemProperties(Model):
+ """A set of properties that can be defined in the context of a specific item
+ type. Each type may have its own properties.
+
+ :param function_alias: A function alias, used when the type of the item is
+ Function
+ :type function_alias: str
+ """
+
+ _attribute_map = {
+ 'function_alias': {'key': 'functionAlias', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentAnalyticsItemProperties, self).__init__(**kwargs)
+ self.function_alias = kwargs.get('function_alias', None)
+
+
+class ApplicationInsightsComponentAPIKey(Model):
+ """Properties that define an API key of an Application Insights Component.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: The unique ID of the API key inside an Application Insights
+ component. It is auto generated when the API key is created.
+ :vartype id: str
+ :ivar api_key: The API key value. It will be only return once when the API
+ Key was created.
+ :vartype api_key: str
+ :param created_date: The create date of this API key.
+ :type created_date: str
+ :param name: The name of the API key.
+ :type name: str
+ :param linked_read_properties: The read access rights of this API Key.
+ :type linked_read_properties: list[str]
+ :param linked_write_properties: The write access rights of this API Key.
+ :type linked_write_properties: list[str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'api_key': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'api_key': {'key': 'apiKey', 'type': 'str'},
+ 'created_date': {'key': 'createdDate', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'},
+ 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentAPIKey, self).__init__(**kwargs)
+ self.id = None
+ self.api_key = None
+ self.created_date = kwargs.get('created_date', None)
+ self.name = kwargs.get('name', None)
+ self.linked_read_properties = kwargs.get('linked_read_properties', None)
+ self.linked_write_properties = kwargs.get('linked_write_properties', None)
+
+
+class ApplicationInsightsComponentAvailableFeatures(Model):
+ """An Application Insights component available features.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar result: A list of Application Insights component feature.
+ :vartype result:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFeature]
+ """
+
+ _validation = {
+ 'result': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'result': {'key': 'Result', 'type': '[ApplicationInsightsComponentFeature]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentAvailableFeatures, self).__init__(**kwargs)
+ self.result = None
+
+
+class ApplicationInsightsComponentBillingFeatures(Model):
+ """An Application Insights component billing features.
+
+ :param data_volume_cap: An Application Insights component daily data
+ volume cap
+ :type data_volume_cap:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentDataVolumeCap
+ :param current_billing_features: Current enabled pricing plan. When the
+ component is in the Enterprise plan, this will list both 'Basic' and
+ 'Application Insights Enterprise'.
+ :type current_billing_features: list[str]
+ """
+
+ _attribute_map = {
+ 'data_volume_cap': {'key': 'DataVolumeCap', 'type': 'ApplicationInsightsComponentDataVolumeCap'},
+ 'current_billing_features': {'key': 'CurrentBillingFeatures', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentBillingFeatures, self).__init__(**kwargs)
+ self.data_volume_cap = kwargs.get('data_volume_cap', None)
+ self.current_billing_features = kwargs.get('current_billing_features', None)
+
+
+class ApplicationInsightsComponentDataVolumeCap(Model):
+ """An Application Insights component daily data volume cap.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param cap: Daily data volume cap in GB.
+ :type cap: float
+ :ivar reset_time: Daily data volume cap UTC reset hour.
+ :vartype reset_time: int
+ :param warning_threshold: Reserved, not used for now.
+ :type warning_threshold: int
+ :param stop_send_notification_when_hit_threshold: Reserved, not used for
+ now.
+ :type stop_send_notification_when_hit_threshold: bool
+ :param stop_send_notification_when_hit_cap: Do not send a notification
+ email when the daily data volume cap is met.
+ :type stop_send_notification_when_hit_cap: bool
+ :ivar max_history_cap: Maximum daily data volume cap that the user can set
+ for this component.
+ :vartype max_history_cap: float
+ """
+
+ _validation = {
+ 'reset_time': {'readonly': True},
+ 'max_history_cap': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'cap': {'key': 'Cap', 'type': 'float'},
+ 'reset_time': {'key': 'ResetTime', 'type': 'int'},
+ 'warning_threshold': {'key': 'WarningThreshold', 'type': 'int'},
+ 'stop_send_notification_when_hit_threshold': {'key': 'StopSendNotificationWhenHitThreshold', 'type': 'bool'},
+ 'stop_send_notification_when_hit_cap': {'key': 'StopSendNotificationWhenHitCap', 'type': 'bool'},
+ 'max_history_cap': {'key': 'MaxHistoryCap', 'type': 'float'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentDataVolumeCap, self).__init__(**kwargs)
+ self.cap = kwargs.get('cap', None)
+ self.reset_time = None
+ self.warning_threshold = kwargs.get('warning_threshold', None)
+ self.stop_send_notification_when_hit_threshold = kwargs.get('stop_send_notification_when_hit_threshold', None)
+ self.stop_send_notification_when_hit_cap = kwargs.get('stop_send_notification_when_hit_cap', None)
+ self.max_history_cap = None
+
+
+class ApplicationInsightsComponentExportConfiguration(Model):
+ """Properties that define a Continuous Export configuration.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar export_id: The unique ID of the export configuration inside an
+ Application Insights component. It is auto generated when the Continuous
+ Export configuration is created.
+ :vartype export_id: str
+ :ivar instrumentation_key: The instrumentation key of the Application
+ Insights component.
+ :vartype instrumentation_key: str
+ :param record_types: This comma separated list of document types that will
+ be exported. The possible values include 'Requests', 'Event',
+ 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd',
+ 'PerformanceCounters', 'Availability', 'Messages'.
+ :type record_types: str
+ :ivar application_name: The name of the Application Insights component.
+ :vartype application_name: str
+ :ivar subscription_id: The subscription of the Application Insights
+ component.
+ :vartype subscription_id: str
+ :ivar resource_group: The resource group of the Application Insights
+ component.
+ :vartype resource_group: str
+ :ivar destination_storage_subscription_id: The destination storage account
+ subscription ID.
+ :vartype destination_storage_subscription_id: str
+ :ivar destination_storage_location_id: The destination account location
+ ID.
+ :vartype destination_storage_location_id: str
+ :ivar destination_account_id: The name of destination account.
+ :vartype destination_account_id: str
+ :ivar destination_type: The destination type.
+ :vartype destination_type: str
+ :ivar is_user_enabled: This will be 'true' if the Continuous Export
+ configuration is enabled, otherwise it will be 'false'.
+ :vartype is_user_enabled: str
+ :ivar last_user_update: Last time the Continuous Export configuration was
+ updated.
+ :vartype last_user_update: str
+ :param notification_queue_enabled: Deprecated
+ :type notification_queue_enabled: str
+ :ivar export_status: This indicates current Continuous Export
+ configuration status. The possible values are 'Preparing', 'Success',
+ 'Failure'.
+ :vartype export_status: str
+ :ivar last_success_time: The last time data was successfully delivered to
+ the destination storage container for this Continuous Export
+ configuration.
+ :vartype last_success_time: str
+ :ivar last_gap_time: The last time the Continuous Export configuration
+ started failing.
+ :vartype last_gap_time: str
+ :ivar permanent_error_reason: This is the reason the Continuous Export
+ configuration started failing. It can be 'AzureStorageNotFound' or
+ 'AzureStorageAccessDenied'.
+ :vartype permanent_error_reason: str
+ :ivar storage_name: The name of the destination storage account.
+ :vartype storage_name: str
+ :ivar container_name: The name of the destination storage container.
+ :vartype container_name: str
+ """
+
+ _validation = {
+ 'export_id': {'readonly': True},
+ 'instrumentation_key': {'readonly': True},
+ 'application_name': {'readonly': True},
+ 'subscription_id': {'readonly': True},
+ 'resource_group': {'readonly': True},
+ 'destination_storage_subscription_id': {'readonly': True},
+ 'destination_storage_location_id': {'readonly': True},
+ 'destination_account_id': {'readonly': True},
+ 'destination_type': {'readonly': True},
+ 'is_user_enabled': {'readonly': True},
+ 'last_user_update': {'readonly': True},
+ 'export_status': {'readonly': True},
+ 'last_success_time': {'readonly': True},
+ 'last_gap_time': {'readonly': True},
+ 'permanent_error_reason': {'readonly': True},
+ 'storage_name': {'readonly': True},
+ 'container_name': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'export_id': {'key': 'ExportId', 'type': 'str'},
+ 'instrumentation_key': {'key': 'InstrumentationKey', 'type': 'str'},
+ 'record_types': {'key': 'RecordTypes', 'type': 'str'},
+ 'application_name': {'key': 'ApplicationName', 'type': 'str'},
+ 'subscription_id': {'key': 'SubscriptionId', 'type': 'str'},
+ 'resource_group': {'key': 'ResourceGroup', 'type': 'str'},
+ 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'},
+ 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'},
+ 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'},
+ 'destination_type': {'key': 'DestinationType', 'type': 'str'},
+ 'is_user_enabled': {'key': 'IsUserEnabled', 'type': 'str'},
+ 'last_user_update': {'key': 'LastUserUpdate', 'type': 'str'},
+ 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'},
+ 'export_status': {'key': 'ExportStatus', 'type': 'str'},
+ 'last_success_time': {'key': 'LastSuccessTime', 'type': 'str'},
+ 'last_gap_time': {'key': 'LastGapTime', 'type': 'str'},
+ 'permanent_error_reason': {'key': 'PermanentErrorReason', 'type': 'str'},
+ 'storage_name': {'key': 'StorageName', 'type': 'str'},
+ 'container_name': {'key': 'ContainerName', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentExportConfiguration, self).__init__(**kwargs)
+ self.export_id = None
+ self.instrumentation_key = None
+ self.record_types = kwargs.get('record_types', None)
+ self.application_name = None
+ self.subscription_id = None
+ self.resource_group = None
+ self.destination_storage_subscription_id = None
+ self.destination_storage_location_id = None
+ self.destination_account_id = None
+ self.destination_type = None
+ self.is_user_enabled = None
+ self.last_user_update = None
+ self.notification_queue_enabled = kwargs.get('notification_queue_enabled', None)
+ self.export_status = None
+ self.last_success_time = None
+ self.last_gap_time = None
+ self.permanent_error_reason = None
+ self.storage_name = None
+ self.container_name = None
+
+
+class ApplicationInsightsComponentExportRequest(Model):
+ """An Application Insights component Continuous Export configuration request
+ definition.
+
+ :param record_types: The document types to be exported, as comma separated
+ values. Allowed values include 'Requests', 'Event', 'Exceptions',
+ 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd',
+ 'PerformanceCounters', 'Availability', 'Messages'.
+ :type record_types: str
+ :param destination_type: The Continuous Export destination type. This has
+ to be 'Blob'.
+ :type destination_type: str
+ :param destination_address: The SAS URL for the destination storage
+ container. It must grant write permission.
+ :type destination_address: str
+ :param is_enabled: Set to 'true' to create a Continuous Export
+ configuration as enabled, otherwise set it to 'false'.
+ :type is_enabled: str
+ :param notification_queue_enabled: Deprecated
+ :type notification_queue_enabled: str
+ :param notification_queue_uri: Deprecated
+ :type notification_queue_uri: str
+ :param destination_storage_subscription_id: The subscription ID of the
+ destination storage container.
+ :type destination_storage_subscription_id: str
+ :param destination_storage_location_id: The location ID of the destination
+ storage container.
+ :type destination_storage_location_id: str
+ :param destination_account_id: The name of destination storage account.
+ :type destination_account_id: str
+ """
+
+ _attribute_map = {
+ 'record_types': {'key': 'RecordTypes', 'type': 'str'},
+ 'destination_type': {'key': 'DestinationType', 'type': 'str'},
+ 'destination_address': {'key': 'DestinationAddress', 'type': 'str'},
+ 'is_enabled': {'key': 'IsEnabled', 'type': 'str'},
+ 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'},
+ 'notification_queue_uri': {'key': 'NotificationQueueUri', 'type': 'str'},
+ 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'},
+ 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'},
+ 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentExportRequest, self).__init__(**kwargs)
+ self.record_types = kwargs.get('record_types', None)
+ self.destination_type = kwargs.get('destination_type', None)
+ self.destination_address = kwargs.get('destination_address', None)
+ self.is_enabled = kwargs.get('is_enabled', None)
+ self.notification_queue_enabled = kwargs.get('notification_queue_enabled', None)
+ self.notification_queue_uri = kwargs.get('notification_queue_uri', None)
+ self.destination_storage_subscription_id = kwargs.get('destination_storage_subscription_id', None)
+ self.destination_storage_location_id = kwargs.get('destination_storage_location_id', None)
+ self.destination_account_id = kwargs.get('destination_account_id', None)
+
+
+class ApplicationInsightsComponentFavorite(Model):
+ """Properties that define a favorite that is associated to an Application
+ Insights component.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param name: The user-defined name of the favorite.
+ :type name: str
+ :param config: Configuration of this particular favorite, which are driven
+ by the Azure portal UX. Configuration data is a string containing valid
+ JSON
+ :type config: str
+ :param version: This instance's version of the data model. This can change
+ as new features are added that can be marked favorite. Current examples
+ include MetricsExplorer (ME) and Search.
+ :type version: str
+ :ivar favorite_id: Internally assigned unique id of the favorite
+ definition.
+ :vartype favorite_id: str
+ :param favorite_type: Enum indicating if this favorite definition is owned
+ by a specific user or is shared between all users with access to the
+ Application Insights component. Possible values include: 'shared', 'user'
+ :type favorite_type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.FavoriteType
+ :param source_type: The source of the favorite definition.
+ :type source_type: str
+ :ivar time_modified: Date and time in UTC of the last modification that
+ was made to this favorite definition.
+ :vartype time_modified: str
+ :param tags: A list of 0 or more tags that are associated with this
+ favorite definition
+ :type tags: list[str]
+ :param category: Favorite category, as defined by the user at creation
+ time.
+ :type category: str
+ :param is_generated_from_template: Flag denoting wether or not this
+ favorite was generated from a template.
+ :type is_generated_from_template: bool
+ :ivar user_id: Unique user id of the specific user that owns this
+ favorite.
+ :vartype user_id: str
+ """
+
+ _validation = {
+ 'favorite_id': {'readonly': True},
+ 'time_modified': {'readonly': True},
+ 'user_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'config': {'key': 'Config', 'type': 'str'},
+ 'version': {'key': 'Version', 'type': 'str'},
+ 'favorite_id': {'key': 'FavoriteId', 'type': 'str'},
+ 'favorite_type': {'key': 'FavoriteType', 'type': 'FavoriteType'},
+ 'source_type': {'key': 'SourceType', 'type': 'str'},
+ 'time_modified': {'key': 'TimeModified', 'type': 'str'},
+ 'tags': {'key': 'Tags', 'type': '[str]'},
+ 'category': {'key': 'Category', 'type': 'str'},
+ 'is_generated_from_template': {'key': 'IsGeneratedFromTemplate', 'type': 'bool'},
+ 'user_id': {'key': 'UserId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentFavorite, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.config = kwargs.get('config', None)
+ self.version = kwargs.get('version', None)
+ self.favorite_id = None
+ self.favorite_type = kwargs.get('favorite_type', None)
+ self.source_type = kwargs.get('source_type', None)
+ self.time_modified = None
+ self.tags = kwargs.get('tags', None)
+ self.category = kwargs.get('category', None)
+ self.is_generated_from_template = kwargs.get('is_generated_from_template', None)
+ self.user_id = None
+
+
+class ApplicationInsightsComponentFeature(Model):
+ """An Application Insights component daily data volume cap status.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar feature_name: The pricing feature name.
+ :vartype feature_name: str
+ :ivar meter_id: The meter id used for the feature.
+ :vartype meter_id: str
+ :ivar meter_rate_frequency: The meter rate for the feature's meter.
+ :vartype meter_rate_frequency: str
+ :ivar resouce_id: Reserved, not used now.
+ :vartype resouce_id: str
+ :ivar is_hidden: Reserved, not used now.
+ :vartype is_hidden: bool
+ :ivar capabilities: A list of Application Insights component feature
+ capability.
+ :vartype capabilities:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFeatureCapability]
+ :ivar title: Display name of the feature.
+ :vartype title: str
+ :ivar is_main_feature: Whether can apply addon feature on to it.
+ :vartype is_main_feature: bool
+ :ivar supported_addon_features: The add on features on main feature.
+ :vartype supported_addon_features: str
+ """
+
+ _validation = {
+ 'feature_name': {'readonly': True},
+ 'meter_id': {'readonly': True},
+ 'meter_rate_frequency': {'readonly': True},
+ 'resouce_id': {'readonly': True},
+ 'is_hidden': {'readonly': True},
+ 'capabilities': {'readonly': True},
+ 'title': {'readonly': True},
+ 'is_main_feature': {'readonly': True},
+ 'supported_addon_features': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'feature_name': {'key': 'FeatureName', 'type': 'str'},
+ 'meter_id': {'key': 'MeterId', 'type': 'str'},
+ 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'},
+ 'resouce_id': {'key': 'ResouceId', 'type': 'str'},
+ 'is_hidden': {'key': 'IsHidden', 'type': 'bool'},
+ 'capabilities': {'key': 'Capabilities', 'type': '[ApplicationInsightsComponentFeatureCapability]'},
+ 'title': {'key': 'Title', 'type': 'str'},
+ 'is_main_feature': {'key': 'IsMainFeature', 'type': 'bool'},
+ 'supported_addon_features': {'key': 'SupportedAddonFeatures', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentFeature, self).__init__(**kwargs)
+ self.feature_name = None
+ self.meter_id = None
+ self.meter_rate_frequency = None
+ self.resouce_id = None
+ self.is_hidden = None
+ self.capabilities = None
+ self.title = None
+ self.is_main_feature = None
+ self.supported_addon_features = None
+
+
+class ApplicationInsightsComponentFeatureCapabilities(Model):
+ """An Application Insights component feature capabilities.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar support_export_data: Whether allow to use continuous export feature.
+ :vartype support_export_data: bool
+ :ivar burst_throttle_policy: Reserved, not used now.
+ :vartype burst_throttle_policy: str
+ :ivar metadata_class: Reserved, not used now.
+ :vartype metadata_class: str
+ :ivar live_stream_metrics: Reserved, not used now.
+ :vartype live_stream_metrics: bool
+ :ivar application_map: Reserved, not used now.
+ :vartype application_map: bool
+ :ivar work_item_integration: Whether allow to use work item integration
+ feature.
+ :vartype work_item_integration: bool
+ :ivar power_bi_integration: Reserved, not used now.
+ :vartype power_bi_integration: bool
+ :ivar open_schema: Reserved, not used now.
+ :vartype open_schema: bool
+ :ivar proactive_detection: Reserved, not used now.
+ :vartype proactive_detection: bool
+ :ivar analytics_integration: Reserved, not used now.
+ :vartype analytics_integration: bool
+ :ivar multiple_step_web_test: Whether allow to use multiple steps web test
+ feature.
+ :vartype multiple_step_web_test: bool
+ :ivar api_access_level: Reserved, not used now.
+ :vartype api_access_level: str
+ :ivar tracking_type: The application insights component used tracking
+ type.
+ :vartype tracking_type: str
+ :ivar daily_cap: Daily data volume cap in GB.
+ :vartype daily_cap: float
+ :ivar daily_cap_reset_time: Daily data volume cap UTC reset hour.
+ :vartype daily_cap_reset_time: float
+ :ivar throttle_rate: Reserved, not used now.
+ :vartype throttle_rate: float
+ """
+
+ _validation = {
+ 'support_export_data': {'readonly': True},
+ 'burst_throttle_policy': {'readonly': True},
+ 'metadata_class': {'readonly': True},
+ 'live_stream_metrics': {'readonly': True},
+ 'application_map': {'readonly': True},
+ 'work_item_integration': {'readonly': True},
+ 'power_bi_integration': {'readonly': True},
+ 'open_schema': {'readonly': True},
+ 'proactive_detection': {'readonly': True},
+ 'analytics_integration': {'readonly': True},
+ 'multiple_step_web_test': {'readonly': True},
+ 'api_access_level': {'readonly': True},
+ 'tracking_type': {'readonly': True},
+ 'daily_cap': {'readonly': True},
+ 'daily_cap_reset_time': {'readonly': True},
+ 'throttle_rate': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'support_export_data': {'key': 'SupportExportData', 'type': 'bool'},
+ 'burst_throttle_policy': {'key': 'BurstThrottlePolicy', 'type': 'str'},
+ 'metadata_class': {'key': 'MetadataClass', 'type': 'str'},
+ 'live_stream_metrics': {'key': 'LiveStreamMetrics', 'type': 'bool'},
+ 'application_map': {'key': 'ApplicationMap', 'type': 'bool'},
+ 'work_item_integration': {'key': 'WorkItemIntegration', 'type': 'bool'},
+ 'power_bi_integration': {'key': 'PowerBIIntegration', 'type': 'bool'},
+ 'open_schema': {'key': 'OpenSchema', 'type': 'bool'},
+ 'proactive_detection': {'key': 'ProactiveDetection', 'type': 'bool'},
+ 'analytics_integration': {'key': 'AnalyticsIntegration', 'type': 'bool'},
+ 'multiple_step_web_test': {'key': 'MultipleStepWebTest', 'type': 'bool'},
+ 'api_access_level': {'key': 'ApiAccessLevel', 'type': 'str'},
+ 'tracking_type': {'key': 'TrackingType', 'type': 'str'},
+ 'daily_cap': {'key': 'DailyCap', 'type': 'float'},
+ 'daily_cap_reset_time': {'key': 'DailyCapResetTime', 'type': 'float'},
+ 'throttle_rate': {'key': 'ThrottleRate', 'type': 'float'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentFeatureCapabilities, self).__init__(**kwargs)
+ self.support_export_data = None
+ self.burst_throttle_policy = None
+ self.metadata_class = None
+ self.live_stream_metrics = None
+ self.application_map = None
+ self.work_item_integration = None
+ self.power_bi_integration = None
+ self.open_schema = None
+ self.proactive_detection = None
+ self.analytics_integration = None
+ self.multiple_step_web_test = None
+ self.api_access_level = None
+ self.tracking_type = None
+ self.daily_cap = None
+ self.daily_cap_reset_time = None
+ self.throttle_rate = None
+
+
+class ApplicationInsightsComponentFeatureCapability(Model):
+ """An Application Insights component feature capability.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar name: The name of the capability.
+ :vartype name: str
+ :ivar description: The description of the capability.
+ :vartype description: str
+ :ivar value: The value of the capability.
+ :vartype value: str
+ :ivar unit: The unit of the capability.
+ :vartype unit: str
+ :ivar meter_id: The meter used for the capability.
+ :vartype meter_id: str
+ :ivar meter_rate_frequency: The meter rate of the meter.
+ :vartype meter_rate_frequency: str
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'description': {'readonly': True},
+ 'value': {'readonly': True},
+ 'unit': {'readonly': True},
+ 'meter_id': {'readonly': True},
+ 'meter_rate_frequency': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'description': {'key': 'Description', 'type': 'str'},
+ 'value': {'key': 'Value', 'type': 'str'},
+ 'unit': {'key': 'Unit', 'type': 'str'},
+ 'meter_id': {'key': 'MeterId', 'type': 'str'},
+ 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentFeatureCapability, self).__init__(**kwargs)
+ self.name = None
+ self.description = None
+ self.value = None
+ self.unit = None
+ self.meter_id = None
+ self.meter_rate_frequency = None
+
+
+class ApplicationInsightsComponentProactiveDetectionConfiguration(Model):
+ """Properties that define a ProactiveDetection configuration.
+
+ :param name: The rule name
+ :type name: str
+ :param enabled: A flag that indicates whether this rule is enabled by the
+ user
+ :type enabled: bool
+ :param send_emails_to_subscription_owners: A flag that indicated whether
+ notifications on this rule should be sent to subscription owners
+ :type send_emails_to_subscription_owners: bool
+ :param custom_emails: Custom email addresses for this rule notifications
+ :type custom_emails: list[str]
+ :param last_updated_time: The last time this rule was updated
+ :type last_updated_time: str
+ :param rule_definitions: Static definitions of the ProactiveDetection
+ configuration rule (same values for all components).
+ :type rule_definitions:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'enabled': {'key': 'Enabled', 'type': 'bool'},
+ 'send_emails_to_subscription_owners': {'key': 'SendEmailsToSubscriptionOwners', 'type': 'bool'},
+ 'custom_emails': {'key': 'CustomEmails', 'type': '[str]'},
+ 'last_updated_time': {'key': 'LastUpdatedTime', 'type': 'str'},
+ 'rule_definitions': {'key': 'RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.enabled = kwargs.get('enabled', None)
+ self.send_emails_to_subscription_owners = kwargs.get('send_emails_to_subscription_owners', None)
+ self.custom_emails = kwargs.get('custom_emails', None)
+ self.last_updated_time = kwargs.get('last_updated_time', None)
+ self.rule_definitions = kwargs.get('rule_definitions', None)
+
+
+class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions(Model):
+ """Static definitions of the ProactiveDetection configuration rule (same
+ values for all components).
+
+ :param name: The rule name
+ :type name: str
+ :param display_name: The rule name as it is displayed in UI
+ :type display_name: str
+ :param description: The rule description
+ :type description: str
+ :param help_url: URL which displays additional info about the proactive
+ detection rule
+ :type help_url: str
+ :param is_hidden: A flag indicating whether the rule is hidden (from the
+ UI)
+ :type is_hidden: bool
+ :param is_enabled_by_default: A flag indicating whether the rule is
+ enabled by default
+ :type is_enabled_by_default: bool
+ :param is_in_preview: A flag indicating whether the rule is in preview
+ :type is_in_preview: bool
+ :param supports_email_notifications: A flag indicating whether email
+ notifications are supported for detections for this rule
+ :type supports_email_notifications: bool
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'display_name': {'key': 'DisplayName', 'type': 'str'},
+ 'description': {'key': 'Description', 'type': 'str'},
+ 'help_url': {'key': 'HelpUrl', 'type': 'str'},
+ 'is_hidden': {'key': 'IsHidden', 'type': 'bool'},
+ 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'},
+ 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'},
+ 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.display_name = kwargs.get('display_name', None)
+ self.description = kwargs.get('description', None)
+ self.help_url = kwargs.get('help_url', None)
+ self.is_hidden = kwargs.get('is_hidden', None)
+ self.is_enabled_by_default = kwargs.get('is_enabled_by_default', None)
+ self.is_in_preview = kwargs.get('is_in_preview', None)
+ self.supports_email_notifications = kwargs.get('supports_email_notifications', None)
+
+
+class ApplicationInsightsComponentQuotaStatus(Model):
+ """An Application Insights component daily data volume cap status.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar app_id: The Application ID for the Application Insights component.
+ :vartype app_id: str
+ :ivar should_be_throttled: The daily data volume cap is met, and data
+ ingestion will be stopped.
+ :vartype should_be_throttled: bool
+ :ivar expiration_time: Date and time when the daily data volume cap will
+ be reset, and data ingestion will resume.
+ :vartype expiration_time: str
+ """
+
+ _validation = {
+ 'app_id': {'readonly': True},
+ 'should_be_throttled': {'readonly': True},
+ 'expiration_time': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'app_id': {'key': 'AppId', 'type': 'str'},
+ 'should_be_throttled': {'key': 'ShouldBeThrottled', 'type': 'bool'},
+ 'expiration_time': {'key': 'ExpirationTime', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentQuotaStatus, self).__init__(**kwargs)
+ self.app_id = None
+ self.should_be_throttled = None
+ self.expiration_time = None
+
+
+class ApplicationInsightsComponentWebTestLocation(Model):
+ """Properties that define a web test location available to an Application
+ Insights Component.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar display_name: The display name of the web test location.
+ :vartype display_name: str
+ :ivar tag: Internally defined geographic location tag.
+ :vartype tag: str
+ """
+
+ _validation = {
+ 'display_name': {'readonly': True},
+ 'tag': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'display_name': {'key': 'DisplayName', 'type': 'str'},
+ 'tag': {'key': 'Tag', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentWebTestLocation, self).__init__(**kwargs)
+ self.display_name = None
+ self.tag = None
+
+
+class CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ComponentPurgeBody(Model):
+ """Describes the body of a purge request for an App Insights component.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param table: Required. Table from which to purge data.
+ :type table: str
+ :param filters: Required. The set of columns and filters (queries) to run
+ over them to purge the resulting data.
+ :type filters:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ComponentPurgeBodyFilters]
+ """
+
+ _validation = {
+ 'table': {'required': True},
+ 'filters': {'required': True},
+ }
+
+ _attribute_map = {
+ 'table': {'key': 'table', 'type': 'str'},
+ 'filters': {'key': 'filters', 'type': '[ComponentPurgeBodyFilters]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentPurgeBody, self).__init__(**kwargs)
+ self.table = kwargs.get('table', None)
+ self.filters = kwargs.get('filters', None)
+
+
+class ComponentPurgeBodyFilters(Model):
+ """User-defined filters to return data which will be purged from the table.
+
+ :param column: The column of the table over which the given query should
+ run
+ :type column: str
+ :param operator: A query operator to evaluate over the provided column and
+ value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between,
+ and have the same behavior as they would in a KQL query.
+ :type operator: str
+ :param value: the value for the operator to function over. This can be a
+ number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of
+ values.
+ :type value: object
+ :param key: When filtering over custom dimensions, this key will be used
+ as the name of the custom dimension.
+ :type key: str
+ """
+
+ _attribute_map = {
+ 'column': {'key': 'column', 'type': 'str'},
+ 'operator': {'key': 'operator', 'type': 'str'},
+ 'value': {'key': 'value', 'type': 'object'},
+ 'key': {'key': 'key', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentPurgeBodyFilters, self).__init__(**kwargs)
+ self.column = kwargs.get('column', None)
+ self.operator = kwargs.get('operator', None)
+ self.value = kwargs.get('value', None)
+ self.key = kwargs.get('key', None)
+
+
+class ComponentPurgeResponse(Model):
+ """Response containing operationId for a specific purge action.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param operation_id: Required. Id to use when querying for status for a
+ particular purge operation.
+ :type operation_id: str
+ """
+
+ _validation = {
+ 'operation_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'operation_id': {'key': 'operationId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentPurgeResponse, self).__init__(**kwargs)
+ self.operation_id = kwargs.get('operation_id', None)
+
+
+class ComponentPurgeStatusResponse(Model):
+ """Response containing status for a specific purge operation.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param status: Required. Status of the operation represented by the
+ requested Id. Possible values include: 'pending', 'completed'
+ :type status: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.PurgeState
+ """
+
+ _validation = {
+ 'status': {'required': True},
+ }
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentPurgeStatusResponse, self).__init__(**kwargs)
+ self.status = kwargs.get('status', None)
+
+
+class ErrorFieldContract(Model):
+ """Error Field contract.
+
+ :param code: Property level error code.
+ :type code: str
+ :param message: Human-readable representation of property-level error.
+ :type message: str
+ :param target: Property name.
+ :type target: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ErrorFieldContract, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.target = kwargs.get('target', None)
+
+
+class ErrorResponse(Model):
+ """Error response indicates Insights service is not able to process the
+ incoming request. The reason is provided in the error message.
+
+ :param code: Error code.
+ :type code: str
+ :param message: Error message indicating why the operation failed.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ErrorResponse, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', 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)
+
+
+class InnerError(Model):
+ """Inner error.
+
+ :param diagnosticcontext: Provides correlation for request
+ :type diagnosticcontext: str
+ :param time: Request time
+ :type time: datetime
+ """
+
+ _attribute_map = {
+ 'diagnosticcontext': {'key': 'diagnosticcontext', 'type': 'str'},
+ 'time': {'key': 'time', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, **kwargs):
+ super(InnerError, self).__init__(**kwargs)
+ self.diagnosticcontext = kwargs.get('diagnosticcontext', None)
+ self.time = kwargs.get('time', None)
+
+
+class LinkProperties(Model):
+ """Contains a sourceId and workbook resource id to link two resources.
+
+ :param source_id: The source Azure resource id
+ :type source_id: str
+ :param target_id: The workbook Azure resource id
+ :type target_id: str
+ :param category: The category of workbook
+ :type category: str
+ """
+
+ _attribute_map = {
+ 'source_id': {'key': 'sourceId', 'type': 'str'},
+ 'target_id': {'key': 'targetId', 'type': 'str'},
+ 'category': {'key': 'category', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(LinkProperties, self).__init__(**kwargs)
+ self.source_id = kwargs.get('source_id', None)
+ self.target_id = kwargs.get('target_id', None)
+ self.category = kwargs.get('category', None)
+
+
+class Operation(Model):
+ """CDN REST API operation.
+
+ :param name: Operation name: {provider}/{resource}/{operation}
+ :type name: str
+ :param display: The object that represents the operation.
+ :type display:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.OperationDisplay
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'display': {'key': 'display', 'type': 'OperationDisplay'},
+ }
+
+ def __init__(self, **kwargs):
+ super(Operation, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.display = kwargs.get('display', None)
+
+
+class OperationDisplay(Model):
+ """The object that represents the operation.
+
+ :param provider: Service provider: Microsoft.Cdn
+ :type provider: str
+ :param resource: Resource on which the operation is performed: Profile,
+ endpoint, etc.
+ :type resource: str
+ :param operation: Operation type: Read, write, delete, etc.
+ :type operation: str
+ """
+
+ _attribute_map = {
+ 'provider': {'key': 'provider', 'type': 'str'},
+ 'resource': {'key': 'resource', 'type': 'str'},
+ 'operation': {'key': 'operation', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(OperationDisplay, self).__init__(**kwargs)
+ self.provider = kwargs.get('provider', None)
+ self.resource = kwargs.get('resource', None)
+ self.operation = kwargs.get('operation', None)
+
+
+class PrivateLinkScopedResource(Model):
+ """The private link scope resource reference.
+
+ :param resource_id: The full resource Id of the private link scope
+ resource.
+ :type resource_id: str
+ :param scope_id: The private link scope unique Identifier.
+ :type scope_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'ResourceId', 'type': 'str'},
+ 'scope_id': {'key': 'ScopeId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PrivateLinkScopedResource, self).__init__(**kwargs)
+ self.resource_id = kwargs.get('resource_id', None)
+ self.scope_id = kwargs.get('scope_id', None)
+
+
+class TagsResource(Model):
+ """A container holding only the Tags for a resource, allowing the user to
+ update the tags on a WebTest instance.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(TagsResource, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
+
+
+class WebtestsResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WebtestsResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
+
+
+class WebTest(WebtestsResource):
+ """An Application Insights web test definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param kind: The kind of web test that this web test watches. Choices are
+ ping and multistep. Possible values include: 'ping', 'multistep'. Default
+ value: "ping" .
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestKind
+ :param synthetic_monitor_id: Required. Unique ID of this WebTest. This is
+ typically the same value as the Name field.
+ :type synthetic_monitor_id: str
+ :param web_test_name: Required. User defined name if this WebTest.
+ :type web_test_name: str
+ :param description: Purpose/user defined descriptive test for this
+ WebTest.
+ :type description: str
+ :param enabled: Is the test actively being monitored.
+ :type enabled: bool
+ :param frequency: Interval in seconds between test runs for this WebTest.
+ Default value is 300. Default value: 300 .
+ :type frequency: int
+ :param timeout: Seconds until this WebTest will timeout and fail. Default
+ value is 30. Default value: 30 .
+ :type timeout: int
+ :param web_test_kind: Required. The kind of web test this is, valid
+ choices are ping and multistep. Possible values include: 'ping',
+ 'multistep'. Default value: "ping" .
+ :type web_test_kind: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestKind
+ :param retry_enabled: Allow for retries should this WebTest fail.
+ :type retry_enabled: bool
+ :param locations: Required. A list of where to physically run the tests
+ from to give global coverage for accessibility of your application.
+ :type locations:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestGeolocation]
+ :param configuration: An XML configuration specification for a WebTest.
+ :type configuration:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestPropertiesConfiguration
+ :ivar provisioning_state: Current state of this component, whether or not
+ is has been provisioned within the resource group it is defined. Users
+ cannot change this value but are able to read from it. Values will include
+ Succeeded, Deploying, Canceled, and Failed.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'synthetic_monitor_id': {'required': True},
+ 'web_test_name': {'required': True},
+ 'web_test_kind': {'required': True},
+ 'locations': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'kind': {'key': 'kind', 'type': 'WebTestKind'},
+ 'synthetic_monitor_id': {'key': 'properties.SyntheticMonitorId', 'type': 'str'},
+ 'web_test_name': {'key': 'properties.Name', 'type': 'str'},
+ 'description': {'key': 'properties.Description', 'type': 'str'},
+ 'enabled': {'key': 'properties.Enabled', 'type': 'bool'},
+ 'frequency': {'key': 'properties.Frequency', 'type': 'int'},
+ 'timeout': {'key': 'properties.Timeout', 'type': 'int'},
+ 'web_test_kind': {'key': 'properties.Kind', 'type': 'WebTestKind'},
+ 'retry_enabled': {'key': 'properties.RetryEnabled', 'type': 'bool'},
+ 'locations': {'key': 'properties.Locations', 'type': '[WebTestGeolocation]'},
+ 'configuration': {'key': 'properties.Configuration', 'type': 'WebTestPropertiesConfiguration'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WebTest, self).__init__(**kwargs)
+ self.kind = kwargs.get('kind', "ping")
+ self.synthetic_monitor_id = kwargs.get('synthetic_monitor_id', None)
+ self.web_test_name = kwargs.get('web_test_name', None)
+ self.description = kwargs.get('description', None)
+ self.enabled = kwargs.get('enabled', None)
+ self.frequency = kwargs.get('frequency', 300)
+ self.timeout = kwargs.get('timeout', 30)
+ self.web_test_kind = kwargs.get('web_test_kind', "ping")
+ self.retry_enabled = kwargs.get('retry_enabled', None)
+ self.locations = kwargs.get('locations', None)
+ self.configuration = kwargs.get('configuration', None)
+ self.provisioning_state = None
+
+
+class WebTestGeolocation(Model):
+ """Geo-physical location to run a web test from. You must specify one or more
+ locations for the test to run from.
+
+ :param location: Location ID for the webtest to run from.
+ :type location: str
+ """
+
+ _attribute_map = {
+ 'location': {'key': 'Id', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WebTestGeolocation, self).__init__(**kwargs)
+ self.location = kwargs.get('location', None)
+
+
+class WebTestPropertiesConfiguration(Model):
+ """An XML configuration specification for a WebTest.
+
+ :param web_test: The XML specification of a WebTest to run against an
+ application.
+ :type web_test: str
+ """
+
+ _attribute_map = {
+ 'web_test': {'key': 'WebTest', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WebTestPropertiesConfiguration, self).__init__(**kwargs)
+ self.web_test = kwargs.get('web_test', None)
+
+
+class WorkbookResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
+
+
+class Workbook(WorkbookResource):
+ """An Application Insights workbook definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param kind: The kind of workbook. Choices are user and shared. Possible
+ values include: 'user', 'shared'
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.SharedTypeKind
+ :param workbook_name: Required. The user-defined name of the workbook.
+ :type workbook_name: str
+ :param serialized_data: Required. Configuration of this particular
+ workbook. Configuration data is a string containing valid JSON
+ :type serialized_data: str
+ :param version: This instance's version of the data model. This can change
+ as new features are added that can be marked workbook.
+ :type version: str
+ :param workbook_id: Required. Internally assigned unique id of the
+ workbook definition.
+ :type workbook_id: str
+ :param shared_type_kind: Required. Enum indicating if this workbook
+ definition is owned by a specific user or is shared between all users with
+ access to the Application Insights component. Possible values include:
+ 'user', 'shared'. Default value: "shared" .
+ :type shared_type_kind: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.SharedTypeKind
+ :ivar time_modified: Date and time in UTC of the last modification that
+ was made to this workbook definition.
+ :vartype time_modified: str
+ :param category: Required. Workbook category, as defined by the user at
+ creation time.
+ :type category: str
+ :param workbook_tags: A list of 0 or more tags that are associated with
+ this workbook definition
+ :type workbook_tags: list[str]
+ :param user_id: Required. Unique user id of the specific user that owns
+ this workbook.
+ :type user_id: str
+ :param source_resource_id: Optional resourceId for a source resource.
+ :type source_resource_id: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'workbook_name': {'required': True},
+ 'serialized_data': {'required': True},
+ 'workbook_id': {'required': True},
+ 'shared_type_kind': {'required': True},
+ 'time_modified': {'readonly': True},
+ 'category': {'required': True},
+ 'user_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'workbook_name': {'key': 'properties.name', 'type': 'str'},
+ 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'},
+ 'version': {'key': 'properties.version', 'type': 'str'},
+ 'workbook_id': {'key': 'properties.workbookId', 'type': 'str'},
+ 'shared_type_kind': {'key': 'properties.kind', 'type': 'str'},
+ 'time_modified': {'key': 'properties.timeModified', 'type': 'str'},
+ 'category': {'key': 'properties.category', 'type': 'str'},
+ 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'},
+ 'user_id': {'key': 'properties.userId', 'type': 'str'},
+ 'source_resource_id': {'key': 'properties.sourceResourceId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(Workbook, self).__init__(**kwargs)
+ self.kind = kwargs.get('kind', None)
+ self.workbook_name = kwargs.get('workbook_name', None)
+ self.serialized_data = kwargs.get('serialized_data', None)
+ self.version = kwargs.get('version', None)
+ self.workbook_id = kwargs.get('workbook_id', None)
+ self.shared_type_kind = kwargs.get('shared_type_kind', "shared")
+ self.time_modified = None
+ self.category = kwargs.get('category', None)
+ self.workbook_tags = kwargs.get('workbook_tags', None)
+ self.user_id = kwargs.get('user_id', None)
+ self.source_resource_id = kwargs.get('source_resource_id', None)
+
+
+class WorkbookError(Model):
+ """Error message body that will indicate why the operation failed.
+
+ :param code: Service-defined error code. This code serves as a sub-status
+ for the HTTP error code specified in the response.
+ :type code: str
+ :param message: Human-readable representation of the error.
+ :type message: str
+ :param details: The list of invalid fields send in request, in case of
+ validation error.
+ :type details:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ErrorFieldContract]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorFieldContract]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookError, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.details = kwargs.get('details', None)
+
+
+class WorkbookErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'WorkbookError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args)
+
+
+class WorkItemConfiguration(Model):
+ """Work item configuration associated with an application insights resource.
+
+ :param connector_id: Connector identifier where work item is created
+ :type connector_id: str
+ :param config_display_name: Configuration friendly name
+ :type config_display_name: str
+ :param is_default: Boolean value indicating whether configuration is
+ default
+ :type is_default: bool
+ :param id: Unique Id for work item
+ :type id: str
+ :param config_properties: Serialized JSON object for detailed properties
+ :type config_properties: str
+ """
+
+ _attribute_map = {
+ 'connector_id': {'key': 'ConnectorId', 'type': 'str'},
+ 'config_display_name': {'key': 'ConfigDisplayName', 'type': 'str'},
+ 'is_default': {'key': 'IsDefault', 'type': 'bool'},
+ 'id': {'key': 'Id', 'type': 'str'},
+ 'config_properties': {'key': 'ConfigProperties', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkItemConfiguration, self).__init__(**kwargs)
+ self.connector_id = kwargs.get('connector_id', None)
+ self.config_display_name = kwargs.get('config_display_name', None)
+ self.is_default = kwargs.get('is_default', None)
+ self.id = kwargs.get('id', None)
+ self.config_properties = kwargs.get('config_properties', None)
+
+
+class WorkItemConfigurationError(Model):
+ """Error associated with trying to get work item configuration or
+ configurations.
+
+ :param code: Error detail code and explanation
+ :type code: str
+ :param message: Error message
+ :type message: str
+ :param innererror:
+ :type innererror:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.InnerError
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'innererror': {'key': 'innererror', 'type': 'InnerError'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkItemConfigurationError, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.innererror = kwargs.get('innererror', None)
+
+
+class WorkItemConfigurationErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'WorkItemConfigurationError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(WorkItemConfigurationErrorException, self).__init__(deserialize, response, 'WorkItemConfigurationError', *args)
+
+
+class WorkItemCreateConfiguration(Model):
+ """Work item configuration creation payload.
+
+ :param connector_id: Unique connector id
+ :type connector_id: str
+ :param connector_data_configuration: Serialized JSON object for detailed
+ properties
+ :type connector_data_configuration: str
+ :param validate_only: Boolean indicating validate only
+ :type validate_only: bool
+ :param work_item_properties: Custom work item properties
+ :type work_item_properties: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'connector_id': {'key': 'ConnectorId', 'type': 'str'},
+ 'connector_data_configuration': {'key': 'ConnectorDataConfiguration', 'type': 'str'},
+ 'validate_only': {'key': 'ValidateOnly', 'type': 'bool'},
+ 'work_item_properties': {'key': 'WorkItemProperties', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkItemCreateConfiguration, self).__init__(**kwargs)
+ self.connector_id = kwargs.get('connector_id', None)
+ self.connector_data_configuration = kwargs.get('connector_data_configuration', None)
+ self.validate_only = kwargs.get('validate_only', None)
+ self.work_item_properties = kwargs.get('work_item_properties', None)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_models_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_models_py3.py
new file mode 100644
index 00000000000..9d4210e5ffd
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_models_py3.py
@@ -0,0 +1,1933 @@
+# 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 Annotation(Model):
+ """Annotation associated with an application insights resource.
+
+ :param annotation_name: Name of annotation
+ :type annotation_name: str
+ :param category: Category of annotation, free form
+ :type category: str
+ :param event_time: Time when event occurred
+ :type event_time: datetime
+ :param id: Unique Id for annotation
+ :type id: str
+ :param properties: Serialized JSON object for detailed properties
+ :type properties: str
+ :param related_annotation: Related parent annotation if any. Default
+ value: "null" .
+ :type related_annotation: str
+ """
+
+ _attribute_map = {
+ 'annotation_name': {'key': 'AnnotationName', 'type': 'str'},
+ 'category': {'key': 'Category', 'type': 'str'},
+ 'event_time': {'key': 'EventTime', 'type': 'iso-8601'},
+ 'id': {'key': 'Id', 'type': 'str'},
+ 'properties': {'key': 'Properties', 'type': 'str'},
+ 'related_annotation': {'key': 'RelatedAnnotation', 'type': 'str'},
+ }
+
+ def __init__(self, *, annotation_name: str=None, category: str=None, event_time=None, id: str=None, properties: str=None, related_annotation: str="null", **kwargs) -> None:
+ super(Annotation, self).__init__(**kwargs)
+ self.annotation_name = annotation_name
+ self.category = category
+ self.event_time = event_time
+ self.id = id
+ self.properties = properties
+ self.related_annotation = related_annotation
+
+
+class AnnotationError(Model):
+ """Error associated with trying to create annotation with Id that already
+ exist.
+
+ :param code: Error detail code and explanation
+ :type code: str
+ :param message: Error message
+ :type message: str
+ :param innererror:
+ :type innererror:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.InnerError
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'innererror': {'key': 'innererror', 'type': 'InnerError'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, innererror=None, **kwargs) -> None:
+ super(AnnotationError, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.innererror = innererror
+
+
+class AnnotationErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'AnnotationError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(AnnotationErrorException, self).__init__(deserialize, response, 'AnnotationError', *args)
+
+
+class APIKeyRequest(Model):
+ """An Application Insights component API Key creation request definition.
+
+ :param name: The name of the API Key.
+ :type name: str
+ :param linked_read_properties: The read access rights of this API Key.
+ :type linked_read_properties: list[str]
+ :param linked_write_properties: The write access rights of this API Key.
+ :type linked_write_properties: list[str]
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'},
+ 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'},
+ }
+
+ def __init__(self, *, name: str=None, linked_read_properties=None, linked_write_properties=None, **kwargs) -> None:
+ super(APIKeyRequest, self).__init__(**kwargs)
+ self.name = name
+ self.linked_read_properties = linked_read_properties
+ self.linked_write_properties = linked_write_properties
+
+
+class ComponentsResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, location: str, tags=None, **kwargs) -> None:
+ super(ComponentsResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = location
+ self.tags = tags
+
+
+class ApplicationInsightsComponent(ComponentsResource):
+ """An Application Insights component definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param kind: Required. The kind of application that this component refers
+ to, used to customize UI. This value is a freeform string, values should
+ typically be one of the following: web, ios, other, store, java, phone.
+ :type kind: str
+ :ivar application_id: The unique ID of your application. This field
+ mirrors the 'Name' field and cannot be changed.
+ :vartype application_id: str
+ :ivar app_id: Application Insights Unique ID for your Application.
+ :vartype app_id: str
+ :param application_type: Required. Type of application being monitored.
+ Possible values include: 'web', 'other'. Default value: "web" .
+ :type application_type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationType
+ :param flow_type: Used by the Application Insights system to determine
+ what kind of flow this component was created by. This is to be set to
+ 'Bluefield' when creating/updating a component via the REST API. Possible
+ values include: 'Bluefield'. Default value: "Bluefield" .
+ :type flow_type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.FlowType
+ :param request_source: Describes what tool created this Application
+ Insights component. Customers using this API should set this to the
+ default 'rest'. Possible values include: 'rest'. Default value: "rest" .
+ :type request_source: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.RequestSource
+ :ivar instrumentation_key: Application Insights Instrumentation key. A
+ read-only value that applications can use to identify the destination for
+ all telemetry sent to Azure Application Insights. This value will be
+ supplied upon construction of each new Application Insights component.
+ :vartype instrumentation_key: str
+ :ivar creation_date: Creation Date for the Application Insights component,
+ in ISO 8601 format.
+ :vartype creation_date: datetime
+ :ivar tenant_id: Azure Tenant Id.
+ :vartype tenant_id: str
+ :param hockey_app_id: The unique application ID created when a new
+ application is added to HockeyApp, used for communications with HockeyApp.
+ :type hockey_app_id: str
+ :ivar hockey_app_token: Token used to authenticate communications with
+ between Application Insights and HockeyApp.
+ :vartype hockey_app_token: str
+ :ivar provisioning_state: Current state of this component: whether or not
+ is has been provisioned within the resource group it is defined. Users
+ cannot change this value but are able to read from it. Values will include
+ Succeeded, Deploying, Canceled, and Failed.
+ :vartype provisioning_state: str
+ :param sampling_percentage: Percentage of the data produced by the
+ application being monitored that is being sampled for Application Insights
+ telemetry.
+ :type sampling_percentage: float
+ :ivar connection_string: Application Insights component connection string.
+ :vartype connection_string: str
+ :param retention_in_days: Retention period in days. Default value: 90 .
+ :type retention_in_days: int
+ :param disable_ip_masking: Disable IP masking.
+ :type disable_ip_masking: bool
+ :param immediate_purge_data_on30_days: Purge data immediately after 30
+ days.
+ :type immediate_purge_data_on30_days: bool
+ :ivar private_link_scoped_resources: List of linked private link scope
+ resources.
+ :vartype private_link_scoped_resources:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.PrivateLinkScopedResource]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'kind': {'required': True},
+ 'application_id': {'readonly': True},
+ 'app_id': {'readonly': True},
+ 'application_type': {'required': True},
+ 'instrumentation_key': {'readonly': True},
+ 'creation_date': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'hockey_app_token': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'connection_string': {'readonly': True},
+ 'private_link_scoped_resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'application_id': {'key': 'properties.ApplicationId', 'type': 'str'},
+ 'app_id': {'key': 'properties.AppId', 'type': 'str'},
+ 'application_type': {'key': 'properties.Application_Type', 'type': 'str'},
+ 'flow_type': {'key': 'properties.Flow_Type', 'type': 'str'},
+ 'request_source': {'key': 'properties.Request_Source', 'type': 'str'},
+ 'instrumentation_key': {'key': 'properties.InstrumentationKey', 'type': 'str'},
+ 'creation_date': {'key': 'properties.CreationDate', 'type': 'iso-8601'},
+ 'tenant_id': {'key': 'properties.TenantId', 'type': 'str'},
+ 'hockey_app_id': {'key': 'properties.HockeyAppId', 'type': 'str'},
+ 'hockey_app_token': {'key': 'properties.HockeyAppToken', 'type': 'str'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'sampling_percentage': {'key': 'properties.SamplingPercentage', 'type': 'float'},
+ 'connection_string': {'key': 'properties.ConnectionString', 'type': 'str'},
+ 'retention_in_days': {'key': 'properties.RetentionInDays', 'type': 'int'},
+ 'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'},
+ 'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'},
+ 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'},
+ }
+
+ def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, **kwargs) -> None:
+ super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs)
+ self.kind = kind
+ self.application_id = None
+ self.app_id = None
+ self.application_type = application_type
+ self.flow_type = flow_type
+ self.request_source = request_source
+ self.instrumentation_key = None
+ self.creation_date = None
+ self.tenant_id = None
+ self.hockey_app_id = hockey_app_id
+ self.hockey_app_token = None
+ self.provisioning_state = None
+ self.sampling_percentage = sampling_percentage
+ self.connection_string = None
+ self.retention_in_days = retention_in_days
+ self.disable_ip_masking = disable_ip_masking
+ self.immediate_purge_data_on30_days = immediate_purge_data_on30_days
+ self.private_link_scoped_resources = None
+
+
+class ApplicationInsightsComponentAnalyticsItem(Model):
+ """Properties that define an Analytics item that is associated to an
+ Application Insights component.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param id: Internally assigned unique id of the item definition.
+ :type id: str
+ :param name: The user-defined name of the item.
+ :type name: str
+ :param content: The content of this item
+ :type content: str
+ :ivar version: This instance's version of the data model. This can change
+ as new features are added.
+ :vartype version: str
+ :param scope: Enum indicating if this item definition is owned by a
+ specific user or is shared between all users with access to the
+ Application Insights component. Possible values include: 'shared', 'user'
+ :type scope: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemScope
+ :param type: Enum indicating the type of the Analytics item. Possible
+ values include: 'query', 'function', 'folder', 'recent'
+ :type type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemType
+ :ivar time_created: Date and time in UTC when this item was created.
+ :vartype time_created: str
+ :ivar time_modified: Date and time in UTC of the last modification that
+ was made to this item.
+ :vartype time_modified: str
+ :param properties:
+ :type properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAnalyticsItemProperties
+ """
+
+ _validation = {
+ 'version': {'readonly': True},
+ 'time_created': {'readonly': True},
+ 'time_modified': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'Id', 'type': 'str'},
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'content': {'key': 'Content', 'type': 'str'},
+ 'version': {'key': 'Version', 'type': 'str'},
+ 'scope': {'key': 'Scope', 'type': 'str'},
+ 'type': {'key': 'Type', 'type': 'str'},
+ 'time_created': {'key': 'TimeCreated', 'type': 'str'},
+ 'time_modified': {'key': 'TimeModified', 'type': 'str'},
+ 'properties': {'key': 'Properties', 'type': 'ApplicationInsightsComponentAnalyticsItemProperties'},
+ }
+
+ def __init__(self, *, id: str=None, name: str=None, content: str=None, scope=None, type=None, properties=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentAnalyticsItem, self).__init__(**kwargs)
+ self.id = id
+ self.name = name
+ self.content = content
+ self.version = None
+ self.scope = scope
+ self.type = type
+ self.time_created = None
+ self.time_modified = None
+ self.properties = properties
+
+
+class ApplicationInsightsComponentAnalyticsItemProperties(Model):
+ """A set of properties that can be defined in the context of a specific item
+ type. Each type may have its own properties.
+
+ :param function_alias: A function alias, used when the type of the item is
+ Function
+ :type function_alias: str
+ """
+
+ _attribute_map = {
+ 'function_alias': {'key': 'functionAlias', 'type': 'str'},
+ }
+
+ def __init__(self, *, function_alias: str=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentAnalyticsItemProperties, self).__init__(**kwargs)
+ self.function_alias = function_alias
+
+
+class ApplicationInsightsComponentAPIKey(Model):
+ """Properties that define an API key of an Application Insights Component.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: The unique ID of the API key inside an Application Insights
+ component. It is auto generated when the API key is created.
+ :vartype id: str
+ :ivar api_key: The API key value. It will be only return once when the API
+ Key was created.
+ :vartype api_key: str
+ :param created_date: The create date of this API key.
+ :type created_date: str
+ :param name: The name of the API key.
+ :type name: str
+ :param linked_read_properties: The read access rights of this API Key.
+ :type linked_read_properties: list[str]
+ :param linked_write_properties: The write access rights of this API Key.
+ :type linked_write_properties: list[str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'api_key': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'api_key': {'key': 'apiKey', 'type': 'str'},
+ 'created_date': {'key': 'createdDate', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'linked_read_properties': {'key': 'linkedReadProperties', 'type': '[str]'},
+ 'linked_write_properties': {'key': 'linkedWriteProperties', 'type': '[str]'},
+ }
+
+ def __init__(self, *, created_date: str=None, name: str=None, linked_read_properties=None, linked_write_properties=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentAPIKey, self).__init__(**kwargs)
+ self.id = None
+ self.api_key = None
+ self.created_date = created_date
+ self.name = name
+ self.linked_read_properties = linked_read_properties
+ self.linked_write_properties = linked_write_properties
+
+
+class ApplicationInsightsComponentAvailableFeatures(Model):
+ """An Application Insights component available features.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar result: A list of Application Insights component feature.
+ :vartype result:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFeature]
+ """
+
+ _validation = {
+ 'result': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'result': {'key': 'Result', 'type': '[ApplicationInsightsComponentFeature]'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ApplicationInsightsComponentAvailableFeatures, self).__init__(**kwargs)
+ self.result = None
+
+
+class ApplicationInsightsComponentBillingFeatures(Model):
+ """An Application Insights component billing features.
+
+ :param data_volume_cap: An Application Insights component daily data
+ volume cap
+ :type data_volume_cap:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentDataVolumeCap
+ :param current_billing_features: Current enabled pricing plan. When the
+ component is in the Enterprise plan, this will list both 'Basic' and
+ 'Application Insights Enterprise'.
+ :type current_billing_features: list[str]
+ """
+
+ _attribute_map = {
+ 'data_volume_cap': {'key': 'DataVolumeCap', 'type': 'ApplicationInsightsComponentDataVolumeCap'},
+ 'current_billing_features': {'key': 'CurrentBillingFeatures', 'type': '[str]'},
+ }
+
+ def __init__(self, *, data_volume_cap=None, current_billing_features=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentBillingFeatures, self).__init__(**kwargs)
+ self.data_volume_cap = data_volume_cap
+ self.current_billing_features = current_billing_features
+
+
+class ApplicationInsightsComponentDataVolumeCap(Model):
+ """An Application Insights component daily data volume cap.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param cap: Daily data volume cap in GB.
+ :type cap: float
+ :ivar reset_time: Daily data volume cap UTC reset hour.
+ :vartype reset_time: int
+ :param warning_threshold: Reserved, not used for now.
+ :type warning_threshold: int
+ :param stop_send_notification_when_hit_threshold: Reserved, not used for
+ now.
+ :type stop_send_notification_when_hit_threshold: bool
+ :param stop_send_notification_when_hit_cap: Do not send a notification
+ email when the daily data volume cap is met.
+ :type stop_send_notification_when_hit_cap: bool
+ :ivar max_history_cap: Maximum daily data volume cap that the user can set
+ for this component.
+ :vartype max_history_cap: float
+ """
+
+ _validation = {
+ 'reset_time': {'readonly': True},
+ 'max_history_cap': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'cap': {'key': 'Cap', 'type': 'float'},
+ 'reset_time': {'key': 'ResetTime', 'type': 'int'},
+ 'warning_threshold': {'key': 'WarningThreshold', 'type': 'int'},
+ 'stop_send_notification_when_hit_threshold': {'key': 'StopSendNotificationWhenHitThreshold', 'type': 'bool'},
+ 'stop_send_notification_when_hit_cap': {'key': 'StopSendNotificationWhenHitCap', 'type': 'bool'},
+ 'max_history_cap': {'key': 'MaxHistoryCap', 'type': 'float'},
+ }
+
+ def __init__(self, *, cap: float=None, warning_threshold: int=None, stop_send_notification_when_hit_threshold: bool=None, stop_send_notification_when_hit_cap: bool=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentDataVolumeCap, self).__init__(**kwargs)
+ self.cap = cap
+ self.reset_time = None
+ self.warning_threshold = warning_threshold
+ self.stop_send_notification_when_hit_threshold = stop_send_notification_when_hit_threshold
+ self.stop_send_notification_when_hit_cap = stop_send_notification_when_hit_cap
+ self.max_history_cap = None
+
+
+class ApplicationInsightsComponentExportConfiguration(Model):
+ """Properties that define a Continuous Export configuration.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar export_id: The unique ID of the export configuration inside an
+ Application Insights component. It is auto generated when the Continuous
+ Export configuration is created.
+ :vartype export_id: str
+ :ivar instrumentation_key: The instrumentation key of the Application
+ Insights component.
+ :vartype instrumentation_key: str
+ :param record_types: This comma separated list of document types that will
+ be exported. The possible values include 'Requests', 'Event',
+ 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd',
+ 'PerformanceCounters', 'Availability', 'Messages'.
+ :type record_types: str
+ :ivar application_name: The name of the Application Insights component.
+ :vartype application_name: str
+ :ivar subscription_id: The subscription of the Application Insights
+ component.
+ :vartype subscription_id: str
+ :ivar resource_group: The resource group of the Application Insights
+ component.
+ :vartype resource_group: str
+ :ivar destination_storage_subscription_id: The destination storage account
+ subscription ID.
+ :vartype destination_storage_subscription_id: str
+ :ivar destination_storage_location_id: The destination account location
+ ID.
+ :vartype destination_storage_location_id: str
+ :ivar destination_account_id: The name of destination account.
+ :vartype destination_account_id: str
+ :ivar destination_type: The destination type.
+ :vartype destination_type: str
+ :ivar is_user_enabled: This will be 'true' if the Continuous Export
+ configuration is enabled, otherwise it will be 'false'.
+ :vartype is_user_enabled: str
+ :ivar last_user_update: Last time the Continuous Export configuration was
+ updated.
+ :vartype last_user_update: str
+ :param notification_queue_enabled: Deprecated
+ :type notification_queue_enabled: str
+ :ivar export_status: This indicates current Continuous Export
+ configuration status. The possible values are 'Preparing', 'Success',
+ 'Failure'.
+ :vartype export_status: str
+ :ivar last_success_time: The last time data was successfully delivered to
+ the destination storage container for this Continuous Export
+ configuration.
+ :vartype last_success_time: str
+ :ivar last_gap_time: The last time the Continuous Export configuration
+ started failing.
+ :vartype last_gap_time: str
+ :ivar permanent_error_reason: This is the reason the Continuous Export
+ configuration started failing. It can be 'AzureStorageNotFound' or
+ 'AzureStorageAccessDenied'.
+ :vartype permanent_error_reason: str
+ :ivar storage_name: The name of the destination storage account.
+ :vartype storage_name: str
+ :ivar container_name: The name of the destination storage container.
+ :vartype container_name: str
+ """
+
+ _validation = {
+ 'export_id': {'readonly': True},
+ 'instrumentation_key': {'readonly': True},
+ 'application_name': {'readonly': True},
+ 'subscription_id': {'readonly': True},
+ 'resource_group': {'readonly': True},
+ 'destination_storage_subscription_id': {'readonly': True},
+ 'destination_storage_location_id': {'readonly': True},
+ 'destination_account_id': {'readonly': True},
+ 'destination_type': {'readonly': True},
+ 'is_user_enabled': {'readonly': True},
+ 'last_user_update': {'readonly': True},
+ 'export_status': {'readonly': True},
+ 'last_success_time': {'readonly': True},
+ 'last_gap_time': {'readonly': True},
+ 'permanent_error_reason': {'readonly': True},
+ 'storage_name': {'readonly': True},
+ 'container_name': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'export_id': {'key': 'ExportId', 'type': 'str'},
+ 'instrumentation_key': {'key': 'InstrumentationKey', 'type': 'str'},
+ 'record_types': {'key': 'RecordTypes', 'type': 'str'},
+ 'application_name': {'key': 'ApplicationName', 'type': 'str'},
+ 'subscription_id': {'key': 'SubscriptionId', 'type': 'str'},
+ 'resource_group': {'key': 'ResourceGroup', 'type': 'str'},
+ 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'},
+ 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'},
+ 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'},
+ 'destination_type': {'key': 'DestinationType', 'type': 'str'},
+ 'is_user_enabled': {'key': 'IsUserEnabled', 'type': 'str'},
+ 'last_user_update': {'key': 'LastUserUpdate', 'type': 'str'},
+ 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'},
+ 'export_status': {'key': 'ExportStatus', 'type': 'str'},
+ 'last_success_time': {'key': 'LastSuccessTime', 'type': 'str'},
+ 'last_gap_time': {'key': 'LastGapTime', 'type': 'str'},
+ 'permanent_error_reason': {'key': 'PermanentErrorReason', 'type': 'str'},
+ 'storage_name': {'key': 'StorageName', 'type': 'str'},
+ 'container_name': {'key': 'ContainerName', 'type': 'str'},
+ }
+
+ def __init__(self, *, record_types: str=None, notification_queue_enabled: str=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentExportConfiguration, self).__init__(**kwargs)
+ self.export_id = None
+ self.instrumentation_key = None
+ self.record_types = record_types
+ self.application_name = None
+ self.subscription_id = None
+ self.resource_group = None
+ self.destination_storage_subscription_id = None
+ self.destination_storage_location_id = None
+ self.destination_account_id = None
+ self.destination_type = None
+ self.is_user_enabled = None
+ self.last_user_update = None
+ self.notification_queue_enabled = notification_queue_enabled
+ self.export_status = None
+ self.last_success_time = None
+ self.last_gap_time = None
+ self.permanent_error_reason = None
+ self.storage_name = None
+ self.container_name = None
+
+
+class ApplicationInsightsComponentExportRequest(Model):
+ """An Application Insights component Continuous Export configuration request
+ definition.
+
+ :param record_types: The document types to be exported, as comma separated
+ values. Allowed values include 'Requests', 'Event', 'Exceptions',
+ 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd',
+ 'PerformanceCounters', 'Availability', 'Messages'.
+ :type record_types: str
+ :param destination_type: The Continuous Export destination type. This has
+ to be 'Blob'.
+ :type destination_type: str
+ :param destination_address: The SAS URL for the destination storage
+ container. It must grant write permission.
+ :type destination_address: str
+ :param is_enabled: Set to 'true' to create a Continuous Export
+ configuration as enabled, otherwise set it to 'false'.
+ :type is_enabled: str
+ :param notification_queue_enabled: Deprecated
+ :type notification_queue_enabled: str
+ :param notification_queue_uri: Deprecated
+ :type notification_queue_uri: str
+ :param destination_storage_subscription_id: The subscription ID of the
+ destination storage container.
+ :type destination_storage_subscription_id: str
+ :param destination_storage_location_id: The location ID of the destination
+ storage container.
+ :type destination_storage_location_id: str
+ :param destination_account_id: The name of destination storage account.
+ :type destination_account_id: str
+ """
+
+ _attribute_map = {
+ 'record_types': {'key': 'RecordTypes', 'type': 'str'},
+ 'destination_type': {'key': 'DestinationType', 'type': 'str'},
+ 'destination_address': {'key': 'DestinationAddress', 'type': 'str'},
+ 'is_enabled': {'key': 'IsEnabled', 'type': 'str'},
+ 'notification_queue_enabled': {'key': 'NotificationQueueEnabled', 'type': 'str'},
+ 'notification_queue_uri': {'key': 'NotificationQueueUri', 'type': 'str'},
+ 'destination_storage_subscription_id': {'key': 'DestinationStorageSubscriptionId', 'type': 'str'},
+ 'destination_storage_location_id': {'key': 'DestinationStorageLocationId', 'type': 'str'},
+ 'destination_account_id': {'key': 'DestinationAccountId', 'type': 'str'},
+ }
+
+ def __init__(self, *, record_types: str=None, destination_type: str=None, destination_address: str=None, is_enabled: str=None, notification_queue_enabled: str=None, notification_queue_uri: str=None, destination_storage_subscription_id: str=None, destination_storage_location_id: str=None, destination_account_id: str=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentExportRequest, self).__init__(**kwargs)
+ self.record_types = record_types
+ self.destination_type = destination_type
+ self.destination_address = destination_address
+ self.is_enabled = is_enabled
+ self.notification_queue_enabled = notification_queue_enabled
+ self.notification_queue_uri = notification_queue_uri
+ self.destination_storage_subscription_id = destination_storage_subscription_id
+ self.destination_storage_location_id = destination_storage_location_id
+ self.destination_account_id = destination_account_id
+
+
+class ApplicationInsightsComponentFavorite(Model):
+ """Properties that define a favorite that is associated to an Application
+ Insights component.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :param name: The user-defined name of the favorite.
+ :type name: str
+ :param config: Configuration of this particular favorite, which are driven
+ by the Azure portal UX. Configuration data is a string containing valid
+ JSON
+ :type config: str
+ :param version: This instance's version of the data model. This can change
+ as new features are added that can be marked favorite. Current examples
+ include MetricsExplorer (ME) and Search.
+ :type version: str
+ :ivar favorite_id: Internally assigned unique id of the favorite
+ definition.
+ :vartype favorite_id: str
+ :param favorite_type: Enum indicating if this favorite definition is owned
+ by a specific user or is shared between all users with access to the
+ Application Insights component. Possible values include: 'shared', 'user'
+ :type favorite_type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.FavoriteType
+ :param source_type: The source of the favorite definition.
+ :type source_type: str
+ :ivar time_modified: Date and time in UTC of the last modification that
+ was made to this favorite definition.
+ :vartype time_modified: str
+ :param tags: A list of 0 or more tags that are associated with this
+ favorite definition
+ :type tags: list[str]
+ :param category: Favorite category, as defined by the user at creation
+ time.
+ :type category: str
+ :param is_generated_from_template: Flag denoting wether or not this
+ favorite was generated from a template.
+ :type is_generated_from_template: bool
+ :ivar user_id: Unique user id of the specific user that owns this
+ favorite.
+ :vartype user_id: str
+ """
+
+ _validation = {
+ 'favorite_id': {'readonly': True},
+ 'time_modified': {'readonly': True},
+ 'user_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'config': {'key': 'Config', 'type': 'str'},
+ 'version': {'key': 'Version', 'type': 'str'},
+ 'favorite_id': {'key': 'FavoriteId', 'type': 'str'},
+ 'favorite_type': {'key': 'FavoriteType', 'type': 'FavoriteType'},
+ 'source_type': {'key': 'SourceType', 'type': 'str'},
+ 'time_modified': {'key': 'TimeModified', 'type': 'str'},
+ 'tags': {'key': 'Tags', 'type': '[str]'},
+ 'category': {'key': 'Category', 'type': 'str'},
+ 'is_generated_from_template': {'key': 'IsGeneratedFromTemplate', 'type': 'bool'},
+ 'user_id': {'key': 'UserId', 'type': 'str'},
+ }
+
+ def __init__(self, *, name: str=None, config: str=None, version: str=None, favorite_type=None, source_type: str=None, tags=None, category: str=None, is_generated_from_template: bool=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentFavorite, self).__init__(**kwargs)
+ self.name = name
+ self.config = config
+ self.version = version
+ self.favorite_id = None
+ self.favorite_type = favorite_type
+ self.source_type = source_type
+ self.time_modified = None
+ self.tags = tags
+ self.category = category
+ self.is_generated_from_template = is_generated_from_template
+ self.user_id = None
+
+
+class ApplicationInsightsComponentFeature(Model):
+ """An Application Insights component daily data volume cap status.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar feature_name: The pricing feature name.
+ :vartype feature_name: str
+ :ivar meter_id: The meter id used for the feature.
+ :vartype meter_id: str
+ :ivar meter_rate_frequency: The meter rate for the feature's meter.
+ :vartype meter_rate_frequency: str
+ :ivar resouce_id: Reserved, not used now.
+ :vartype resouce_id: str
+ :ivar is_hidden: Reserved, not used now.
+ :vartype is_hidden: bool
+ :ivar capabilities: A list of Application Insights component feature
+ capability.
+ :vartype capabilities:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFeatureCapability]
+ :ivar title: Display name of the feature.
+ :vartype title: str
+ :ivar is_main_feature: Whether can apply addon feature on to it.
+ :vartype is_main_feature: bool
+ :ivar supported_addon_features: The add on features on main feature.
+ :vartype supported_addon_features: str
+ """
+
+ _validation = {
+ 'feature_name': {'readonly': True},
+ 'meter_id': {'readonly': True},
+ 'meter_rate_frequency': {'readonly': True},
+ 'resouce_id': {'readonly': True},
+ 'is_hidden': {'readonly': True},
+ 'capabilities': {'readonly': True},
+ 'title': {'readonly': True},
+ 'is_main_feature': {'readonly': True},
+ 'supported_addon_features': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'feature_name': {'key': 'FeatureName', 'type': 'str'},
+ 'meter_id': {'key': 'MeterId', 'type': 'str'},
+ 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'},
+ 'resouce_id': {'key': 'ResouceId', 'type': 'str'},
+ 'is_hidden': {'key': 'IsHidden', 'type': 'bool'},
+ 'capabilities': {'key': 'Capabilities', 'type': '[ApplicationInsightsComponentFeatureCapability]'},
+ 'title': {'key': 'Title', 'type': 'str'},
+ 'is_main_feature': {'key': 'IsMainFeature', 'type': 'bool'},
+ 'supported_addon_features': {'key': 'SupportedAddonFeatures', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ApplicationInsightsComponentFeature, self).__init__(**kwargs)
+ self.feature_name = None
+ self.meter_id = None
+ self.meter_rate_frequency = None
+ self.resouce_id = None
+ self.is_hidden = None
+ self.capabilities = None
+ self.title = None
+ self.is_main_feature = None
+ self.supported_addon_features = None
+
+
+class ApplicationInsightsComponentFeatureCapabilities(Model):
+ """An Application Insights component feature capabilities.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar support_export_data: Whether allow to use continuous export feature.
+ :vartype support_export_data: bool
+ :ivar burst_throttle_policy: Reserved, not used now.
+ :vartype burst_throttle_policy: str
+ :ivar metadata_class: Reserved, not used now.
+ :vartype metadata_class: str
+ :ivar live_stream_metrics: Reserved, not used now.
+ :vartype live_stream_metrics: bool
+ :ivar application_map: Reserved, not used now.
+ :vartype application_map: bool
+ :ivar work_item_integration: Whether allow to use work item integration
+ feature.
+ :vartype work_item_integration: bool
+ :ivar power_bi_integration: Reserved, not used now.
+ :vartype power_bi_integration: bool
+ :ivar open_schema: Reserved, not used now.
+ :vartype open_schema: bool
+ :ivar proactive_detection: Reserved, not used now.
+ :vartype proactive_detection: bool
+ :ivar analytics_integration: Reserved, not used now.
+ :vartype analytics_integration: bool
+ :ivar multiple_step_web_test: Whether allow to use multiple steps web test
+ feature.
+ :vartype multiple_step_web_test: bool
+ :ivar api_access_level: Reserved, not used now.
+ :vartype api_access_level: str
+ :ivar tracking_type: The application insights component used tracking
+ type.
+ :vartype tracking_type: str
+ :ivar daily_cap: Daily data volume cap in GB.
+ :vartype daily_cap: float
+ :ivar daily_cap_reset_time: Daily data volume cap UTC reset hour.
+ :vartype daily_cap_reset_time: float
+ :ivar throttle_rate: Reserved, not used now.
+ :vartype throttle_rate: float
+ """
+
+ _validation = {
+ 'support_export_data': {'readonly': True},
+ 'burst_throttle_policy': {'readonly': True},
+ 'metadata_class': {'readonly': True},
+ 'live_stream_metrics': {'readonly': True},
+ 'application_map': {'readonly': True},
+ 'work_item_integration': {'readonly': True},
+ 'power_bi_integration': {'readonly': True},
+ 'open_schema': {'readonly': True},
+ 'proactive_detection': {'readonly': True},
+ 'analytics_integration': {'readonly': True},
+ 'multiple_step_web_test': {'readonly': True},
+ 'api_access_level': {'readonly': True},
+ 'tracking_type': {'readonly': True},
+ 'daily_cap': {'readonly': True},
+ 'daily_cap_reset_time': {'readonly': True},
+ 'throttle_rate': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'support_export_data': {'key': 'SupportExportData', 'type': 'bool'},
+ 'burst_throttle_policy': {'key': 'BurstThrottlePolicy', 'type': 'str'},
+ 'metadata_class': {'key': 'MetadataClass', 'type': 'str'},
+ 'live_stream_metrics': {'key': 'LiveStreamMetrics', 'type': 'bool'},
+ 'application_map': {'key': 'ApplicationMap', 'type': 'bool'},
+ 'work_item_integration': {'key': 'WorkItemIntegration', 'type': 'bool'},
+ 'power_bi_integration': {'key': 'PowerBIIntegration', 'type': 'bool'},
+ 'open_schema': {'key': 'OpenSchema', 'type': 'bool'},
+ 'proactive_detection': {'key': 'ProactiveDetection', 'type': 'bool'},
+ 'analytics_integration': {'key': 'AnalyticsIntegration', 'type': 'bool'},
+ 'multiple_step_web_test': {'key': 'MultipleStepWebTest', 'type': 'bool'},
+ 'api_access_level': {'key': 'ApiAccessLevel', 'type': 'str'},
+ 'tracking_type': {'key': 'TrackingType', 'type': 'str'},
+ 'daily_cap': {'key': 'DailyCap', 'type': 'float'},
+ 'daily_cap_reset_time': {'key': 'DailyCapResetTime', 'type': 'float'},
+ 'throttle_rate': {'key': 'ThrottleRate', 'type': 'float'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ApplicationInsightsComponentFeatureCapabilities, self).__init__(**kwargs)
+ self.support_export_data = None
+ self.burst_throttle_policy = None
+ self.metadata_class = None
+ self.live_stream_metrics = None
+ self.application_map = None
+ self.work_item_integration = None
+ self.power_bi_integration = None
+ self.open_schema = None
+ self.proactive_detection = None
+ self.analytics_integration = None
+ self.multiple_step_web_test = None
+ self.api_access_level = None
+ self.tracking_type = None
+ self.daily_cap = None
+ self.daily_cap_reset_time = None
+ self.throttle_rate = None
+
+
+class ApplicationInsightsComponentFeatureCapability(Model):
+ """An Application Insights component feature capability.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar name: The name of the capability.
+ :vartype name: str
+ :ivar description: The description of the capability.
+ :vartype description: str
+ :ivar value: The value of the capability.
+ :vartype value: str
+ :ivar unit: The unit of the capability.
+ :vartype unit: str
+ :ivar meter_id: The meter used for the capability.
+ :vartype meter_id: str
+ :ivar meter_rate_frequency: The meter rate of the meter.
+ :vartype meter_rate_frequency: str
+ """
+
+ _validation = {
+ 'name': {'readonly': True},
+ 'description': {'readonly': True},
+ 'value': {'readonly': True},
+ 'unit': {'readonly': True},
+ 'meter_id': {'readonly': True},
+ 'meter_rate_frequency': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'description': {'key': 'Description', 'type': 'str'},
+ 'value': {'key': 'Value', 'type': 'str'},
+ 'unit': {'key': 'Unit', 'type': 'str'},
+ 'meter_id': {'key': 'MeterId', 'type': 'str'},
+ 'meter_rate_frequency': {'key': 'MeterRateFrequency', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ApplicationInsightsComponentFeatureCapability, self).__init__(**kwargs)
+ self.name = None
+ self.description = None
+ self.value = None
+ self.unit = None
+ self.meter_id = None
+ self.meter_rate_frequency = None
+
+
+class ApplicationInsightsComponentProactiveDetectionConfiguration(Model):
+ """Properties that define a ProactiveDetection configuration.
+
+ :param name: The rule name
+ :type name: str
+ :param enabled: A flag that indicates whether this rule is enabled by the
+ user
+ :type enabled: bool
+ :param send_emails_to_subscription_owners: A flag that indicated whether
+ notifications on this rule should be sent to subscription owners
+ :type send_emails_to_subscription_owners: bool
+ :param custom_emails: Custom email addresses for this rule notifications
+ :type custom_emails: list[str]
+ :param last_updated_time: The last time this rule was updated
+ :type last_updated_time: str
+ :param rule_definitions: Static definitions of the ProactiveDetection
+ configuration rule (same values for all components).
+ :type rule_definitions:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'enabled': {'key': 'Enabled', 'type': 'bool'},
+ 'send_emails_to_subscription_owners': {'key': 'SendEmailsToSubscriptionOwners', 'type': 'bool'},
+ 'custom_emails': {'key': 'CustomEmails', 'type': '[str]'},
+ 'last_updated_time': {'key': 'LastUpdatedTime', 'type': 'str'},
+ 'rule_definitions': {'key': 'RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions'},
+ }
+
+ def __init__(self, *, name: str=None, enabled: bool=None, send_emails_to_subscription_owners: bool=None, custom_emails=None, last_updated_time: str=None, rule_definitions=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__(**kwargs)
+ self.name = name
+ self.enabled = enabled
+ self.send_emails_to_subscription_owners = send_emails_to_subscription_owners
+ self.custom_emails = custom_emails
+ self.last_updated_time = last_updated_time
+ self.rule_definitions = rule_definitions
+
+
+class ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions(Model):
+ """Static definitions of the ProactiveDetection configuration rule (same
+ values for all components).
+
+ :param name: The rule name
+ :type name: str
+ :param display_name: The rule name as it is displayed in UI
+ :type display_name: str
+ :param description: The rule description
+ :type description: str
+ :param help_url: URL which displays additional info about the proactive
+ detection rule
+ :type help_url: str
+ :param is_hidden: A flag indicating whether the rule is hidden (from the
+ UI)
+ :type is_hidden: bool
+ :param is_enabled_by_default: A flag indicating whether the rule is
+ enabled by default
+ :type is_enabled_by_default: bool
+ :param is_in_preview: A flag indicating whether the rule is in preview
+ :type is_in_preview: bool
+ :param supports_email_notifications: A flag indicating whether email
+ notifications are supported for detections for this rule
+ :type supports_email_notifications: bool
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'display_name': {'key': 'DisplayName', 'type': 'str'},
+ 'description': {'key': 'Description', 'type': 'str'},
+ 'help_url': {'key': 'HelpUrl', 'type': 'str'},
+ 'is_hidden': {'key': 'IsHidden', 'type': 'bool'},
+ 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'},
+ 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'},
+ 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'},
+ }
+
+ def __init__(self, *, name: str=None, display_name: str=None, description: str=None, help_url: str=None, is_hidden: bool=None, is_enabled_by_default: bool=None, is_in_preview: bool=None, supports_email_notifications: bool=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions, self).__init__(**kwargs)
+ self.name = name
+ self.display_name = display_name
+ self.description = description
+ self.help_url = help_url
+ self.is_hidden = is_hidden
+ self.is_enabled_by_default = is_enabled_by_default
+ self.is_in_preview = is_in_preview
+ self.supports_email_notifications = supports_email_notifications
+
+
+class ApplicationInsightsComponentQuotaStatus(Model):
+ """An Application Insights component daily data volume cap status.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar app_id: The Application ID for the Application Insights component.
+ :vartype app_id: str
+ :ivar should_be_throttled: The daily data volume cap is met, and data
+ ingestion will be stopped.
+ :vartype should_be_throttled: bool
+ :ivar expiration_time: Date and time when the daily data volume cap will
+ be reset, and data ingestion will resume.
+ :vartype expiration_time: str
+ """
+
+ _validation = {
+ 'app_id': {'readonly': True},
+ 'should_be_throttled': {'readonly': True},
+ 'expiration_time': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'app_id': {'key': 'AppId', 'type': 'str'},
+ 'should_be_throttled': {'key': 'ShouldBeThrottled', 'type': 'bool'},
+ 'expiration_time': {'key': 'ExpirationTime', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ApplicationInsightsComponentQuotaStatus, self).__init__(**kwargs)
+ self.app_id = None
+ self.should_be_throttled = None
+ self.expiration_time = None
+
+
+class ApplicationInsightsComponentWebTestLocation(Model):
+ """Properties that define a web test location available to an Application
+ Insights Component.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar display_name: The display name of the web test location.
+ :vartype display_name: str
+ :ivar tag: Internally defined geographic location tag.
+ :vartype tag: str
+ """
+
+ _validation = {
+ 'display_name': {'readonly': True},
+ 'tag': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'display_name': {'key': 'DisplayName', 'type': 'str'},
+ 'tag': {'key': 'Tag', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(ApplicationInsightsComponentWebTestLocation, self).__init__(**kwargs)
+ self.display_name = None
+ self.tag = None
+
+
+class CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ComponentPurgeBody(Model):
+ """Describes the body of a purge request for an App Insights component.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param table: Required. Table from which to purge data.
+ :type table: str
+ :param filters: Required. The set of columns and filters (queries) to run
+ over them to purge the resulting data.
+ :type filters:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ComponentPurgeBodyFilters]
+ """
+
+ _validation = {
+ 'table': {'required': True},
+ 'filters': {'required': True},
+ }
+
+ _attribute_map = {
+ 'table': {'key': 'table', 'type': 'str'},
+ 'filters': {'key': 'filters', 'type': '[ComponentPurgeBodyFilters]'},
+ }
+
+ def __init__(self, *, table: str, filters, **kwargs) -> None:
+ super(ComponentPurgeBody, self).__init__(**kwargs)
+ self.table = table
+ self.filters = filters
+
+
+class ComponentPurgeBodyFilters(Model):
+ """User-defined filters to return data which will be purged from the table.
+
+ :param column: The column of the table over which the given query should
+ run
+ :type column: str
+ :param operator: A query operator to evaluate over the provided column and
+ value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between,
+ and have the same behavior as they would in a KQL query.
+ :type operator: str
+ :param value: the value for the operator to function over. This can be a
+ number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of
+ values.
+ :type value: object
+ :param key: When filtering over custom dimensions, this key will be used
+ as the name of the custom dimension.
+ :type key: str
+ """
+
+ _attribute_map = {
+ 'column': {'key': 'column', 'type': 'str'},
+ 'operator': {'key': 'operator', 'type': 'str'},
+ 'value': {'key': 'value', 'type': 'object'},
+ 'key': {'key': 'key', 'type': 'str'},
+ }
+
+ def __init__(self, *, column: str=None, operator: str=None, value=None, key: str=None, **kwargs) -> None:
+ super(ComponentPurgeBodyFilters, self).__init__(**kwargs)
+ self.column = column
+ self.operator = operator
+ self.value = value
+ self.key = key
+
+
+class ComponentPurgeResponse(Model):
+ """Response containing operationId for a specific purge action.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param operation_id: Required. Id to use when querying for status for a
+ particular purge operation.
+ :type operation_id: str
+ """
+
+ _validation = {
+ 'operation_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'operation_id': {'key': 'operationId', 'type': 'str'},
+ }
+
+ def __init__(self, *, operation_id: str, **kwargs) -> None:
+ super(ComponentPurgeResponse, self).__init__(**kwargs)
+ self.operation_id = operation_id
+
+
+class ComponentPurgeStatusResponse(Model):
+ """Response containing status for a specific purge operation.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param status: Required. Status of the operation represented by the
+ requested Id. Possible values include: 'pending', 'completed'
+ :type status: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.PurgeState
+ """
+
+ _validation = {
+ 'status': {'required': True},
+ }
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ }
+
+ def __init__(self, *, status, **kwargs) -> None:
+ super(ComponentPurgeStatusResponse, self).__init__(**kwargs)
+ self.status = status
+
+
+class ErrorFieldContract(Model):
+ """Error Field contract.
+
+ :param code: Property level error code.
+ :type code: str
+ :param message: Human-readable representation of property-level error.
+ :type message: str
+ :param target: Property name.
+ :type target: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None:
+ super(ErrorFieldContract, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.target = target
+
+
+class ErrorResponse(Model):
+ """Error response indicates Insights service is not able to process the
+ incoming request. The reason is provided in the error message.
+
+ :param code: Error code.
+ :type code: str
+ :param message: Error message indicating why the operation failed.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None:
+ super(ErrorResponse, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+
+
+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)
+
+
+class InnerError(Model):
+ """Inner error.
+
+ :param diagnosticcontext: Provides correlation for request
+ :type diagnosticcontext: str
+ :param time: Request time
+ :type time: datetime
+ """
+
+ _attribute_map = {
+ 'diagnosticcontext': {'key': 'diagnosticcontext', 'type': 'str'},
+ 'time': {'key': 'time', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, *, diagnosticcontext: str=None, time=None, **kwargs) -> None:
+ super(InnerError, self).__init__(**kwargs)
+ self.diagnosticcontext = diagnosticcontext
+ self.time = time
+
+
+class LinkProperties(Model):
+ """Contains a sourceId and workbook resource id to link two resources.
+
+ :param source_id: The source Azure resource id
+ :type source_id: str
+ :param target_id: The workbook Azure resource id
+ :type target_id: str
+ :param category: The category of workbook
+ :type category: str
+ """
+
+ _attribute_map = {
+ 'source_id': {'key': 'sourceId', 'type': 'str'},
+ 'target_id': {'key': 'targetId', 'type': 'str'},
+ 'category': {'key': 'category', 'type': 'str'},
+ }
+
+ def __init__(self, *, source_id: str=None, target_id: str=None, category: str=None, **kwargs) -> None:
+ super(LinkProperties, self).__init__(**kwargs)
+ self.source_id = source_id
+ self.target_id = target_id
+ self.category = category
+
+
+class Operation(Model):
+ """CDN REST API operation.
+
+ :param name: Operation name: {provider}/{resource}/{operation}
+ :type name: str
+ :param display: The object that represents the operation.
+ :type display:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.OperationDisplay
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'display': {'key': 'display', 'type': 'OperationDisplay'},
+ }
+
+ def __init__(self, *, name: str=None, display=None, **kwargs) -> None:
+ super(Operation, self).__init__(**kwargs)
+ self.name = name
+ self.display = display
+
+
+class OperationDisplay(Model):
+ """The object that represents the operation.
+
+ :param provider: Service provider: Microsoft.Cdn
+ :type provider: str
+ :param resource: Resource on which the operation is performed: Profile,
+ endpoint, etc.
+ :type resource: str
+ :param operation: Operation type: Read, write, delete, etc.
+ :type operation: str
+ """
+
+ _attribute_map = {
+ 'provider': {'key': 'provider', 'type': 'str'},
+ 'resource': {'key': 'resource', 'type': 'str'},
+ 'operation': {'key': 'operation', 'type': 'str'},
+ }
+
+ def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None:
+ super(OperationDisplay, self).__init__(**kwargs)
+ self.provider = provider
+ self.resource = resource
+ self.operation = operation
+
+
+class PrivateLinkScopedResource(Model):
+ """The private link scope resource reference.
+
+ :param resource_id: The full resource Id of the private link scope
+ resource.
+ :type resource_id: str
+ :param scope_id: The private link scope unique Identifier.
+ :type scope_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'ResourceId', 'type': 'str'},
+ 'scope_id': {'key': 'ScopeId', 'type': 'str'},
+ }
+
+ def __init__(self, *, resource_id: str=None, scope_id: str=None, **kwargs) -> None:
+ super(PrivateLinkScopedResource, self).__init__(**kwargs)
+ self.resource_id = resource_id
+ self.scope_id = scope_id
+
+
+class TagsResource(Model):
+ """A container holding only the Tags for a resource, allowing the user to
+ update the tags on a WebTest instance.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, tags=None, **kwargs) -> None:
+ super(TagsResource, self).__init__(**kwargs)
+ self.tags = tags
+
+
+class WebtestsResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, location: str, tags=None, **kwargs) -> None:
+ super(WebtestsResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = location
+ self.tags = tags
+
+
+class WebTest(WebtestsResource):
+ """An Application Insights web test definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param kind: The kind of web test that this web test watches. Choices are
+ ping and multistep. Possible values include: 'ping', 'multistep'. Default
+ value: "ping" .
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestKind
+ :param synthetic_monitor_id: Required. Unique ID of this WebTest. This is
+ typically the same value as the Name field.
+ :type synthetic_monitor_id: str
+ :param web_test_name: Required. User defined name if this WebTest.
+ :type web_test_name: str
+ :param description: Purpose/user defined descriptive test for this
+ WebTest.
+ :type description: str
+ :param enabled: Is the test actively being monitored.
+ :type enabled: bool
+ :param frequency: Interval in seconds between test runs for this WebTest.
+ Default value is 300. Default value: 300 .
+ :type frequency: int
+ :param timeout: Seconds until this WebTest will timeout and fail. Default
+ value is 30. Default value: 30 .
+ :type timeout: int
+ :param web_test_kind: Required. The kind of web test this is, valid
+ choices are ping and multistep. Possible values include: 'ping',
+ 'multistep'. Default value: "ping" .
+ :type web_test_kind: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestKind
+ :param retry_enabled: Allow for retries should this WebTest fail.
+ :type retry_enabled: bool
+ :param locations: Required. A list of where to physically run the tests
+ from to give global coverage for accessibility of your application.
+ :type locations:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestGeolocation]
+ :param configuration: An XML configuration specification for a WebTest.
+ :type configuration:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestPropertiesConfiguration
+ :ivar provisioning_state: Current state of this component, whether or not
+ is has been provisioned within the resource group it is defined. Users
+ cannot change this value but are able to read from it. Values will include
+ Succeeded, Deploying, Canceled, and Failed.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'synthetic_monitor_id': {'required': True},
+ 'web_test_name': {'required': True},
+ 'web_test_kind': {'required': True},
+ 'locations': {'required': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'kind': {'key': 'kind', 'type': 'WebTestKind'},
+ 'synthetic_monitor_id': {'key': 'properties.SyntheticMonitorId', 'type': 'str'},
+ 'web_test_name': {'key': 'properties.Name', 'type': 'str'},
+ 'description': {'key': 'properties.Description', 'type': 'str'},
+ 'enabled': {'key': 'properties.Enabled', 'type': 'bool'},
+ 'frequency': {'key': 'properties.Frequency', 'type': 'int'},
+ 'timeout': {'key': 'properties.Timeout', 'type': 'int'},
+ 'web_test_kind': {'key': 'properties.Kind', 'type': 'WebTestKind'},
+ 'retry_enabled': {'key': 'properties.RetryEnabled', 'type': 'bool'},
+ 'locations': {'key': 'properties.Locations', 'type': '[WebTestGeolocation]'},
+ 'configuration': {'key': 'properties.Configuration', 'type': 'WebTestPropertiesConfiguration'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, synthetic_monitor_id: str, web_test_name: str, locations, tags=None, kind="ping", description: str=None, enabled: bool=None, frequency: int=300, timeout: int=30, web_test_kind="ping", retry_enabled: bool=None, configuration=None, **kwargs) -> None:
+ super(WebTest, self).__init__(location=location, tags=tags, **kwargs)
+ self.kind = kind
+ self.synthetic_monitor_id = synthetic_monitor_id
+ self.web_test_name = web_test_name
+ self.description = description
+ self.enabled = enabled
+ self.frequency = frequency
+ self.timeout = timeout
+ self.web_test_kind = web_test_kind
+ self.retry_enabled = retry_enabled
+ self.locations = locations
+ self.configuration = configuration
+ self.provisioning_state = None
+
+
+class WebTestGeolocation(Model):
+ """Geo-physical location to run a web test from. You must specify one or more
+ locations for the test to run from.
+
+ :param location: Location ID for the webtest to run from.
+ :type location: str
+ """
+
+ _attribute_map = {
+ 'location': {'key': 'Id', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str=None, **kwargs) -> None:
+ super(WebTestGeolocation, self).__init__(**kwargs)
+ self.location = location
+
+
+class WebTestPropertiesConfiguration(Model):
+ """An XML configuration specification for a WebTest.
+
+ :param web_test: The XML specification of a WebTest to run against an
+ application.
+ :type web_test: str
+ """
+
+ _attribute_map = {
+ 'web_test': {'key': 'WebTest', 'type': 'str'},
+ }
+
+ def __init__(self, *, web_test: str=None, **kwargs) -> None:
+ super(WebTestPropertiesConfiguration, self).__init__(**kwargs)
+ self.web_test = web_test
+
+
+class WorkbookResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, location: str=None, tags=None, **kwargs) -> None:
+ super(WorkbookResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = location
+ self.tags = tags
+
+
+class Workbook(WorkbookResource):
+ """An Application Insights workbook definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param kind: The kind of workbook. Choices are user and shared. Possible
+ values include: 'user', 'shared'
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.SharedTypeKind
+ :param workbook_name: Required. The user-defined name of the workbook.
+ :type workbook_name: str
+ :param serialized_data: Required. Configuration of this particular
+ workbook. Configuration data is a string containing valid JSON
+ :type serialized_data: str
+ :param version: This instance's version of the data model. This can change
+ as new features are added that can be marked workbook.
+ :type version: str
+ :param workbook_id: Required. Internally assigned unique id of the
+ workbook definition.
+ :type workbook_id: str
+ :param shared_type_kind: Required. Enum indicating if this workbook
+ definition is owned by a specific user or is shared between all users with
+ access to the Application Insights component. Possible values include:
+ 'user', 'shared'. Default value: "shared" .
+ :type shared_type_kind: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.SharedTypeKind
+ :ivar time_modified: Date and time in UTC of the last modification that
+ was made to this workbook definition.
+ :vartype time_modified: str
+ :param category: Required. Workbook category, as defined by the user at
+ creation time.
+ :type category: str
+ :param workbook_tags: A list of 0 or more tags that are associated with
+ this workbook definition
+ :type workbook_tags: list[str]
+ :param user_id: Required. Unique user id of the specific user that owns
+ this workbook.
+ :type user_id: str
+ :param source_resource_id: Optional resourceId for a source resource.
+ :type source_resource_id: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'workbook_name': {'required': True},
+ 'serialized_data': {'required': True},
+ 'workbook_id': {'required': True},
+ 'shared_type_kind': {'required': True},
+ 'time_modified': {'readonly': True},
+ 'category': {'required': True},
+ 'user_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'workbook_name': {'key': 'properties.name', 'type': 'str'},
+ 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'},
+ 'version': {'key': 'properties.version', 'type': 'str'},
+ 'workbook_id': {'key': 'properties.workbookId', 'type': 'str'},
+ 'shared_type_kind': {'key': 'properties.kind', 'type': 'str'},
+ 'time_modified': {'key': 'properties.timeModified', 'type': 'str'},
+ 'category': {'key': 'properties.category', 'type': 'str'},
+ 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'},
+ 'user_id': {'key': 'properties.userId', 'type': 'str'},
+ 'source_resource_id': {'key': 'properties.sourceResourceId', 'type': 'str'},
+ }
+
+ def __init__(self, *, workbook_name: str, serialized_data: str, workbook_id: str, category: str, user_id: str, location: str=None, tags=None, kind=None, version: str=None, shared_type_kind="shared", workbook_tags=None, source_resource_id: str=None, **kwargs) -> None:
+ super(Workbook, self).__init__(location=location, tags=tags, **kwargs)
+ self.kind = kind
+ self.workbook_name = workbook_name
+ self.serialized_data = serialized_data
+ self.version = version
+ self.workbook_id = workbook_id
+ self.shared_type_kind = shared_type_kind
+ self.time_modified = None
+ self.category = category
+ self.workbook_tags = workbook_tags
+ self.user_id = user_id
+ self.source_resource_id = source_resource_id
+
+
+class WorkbookError(Model):
+ """Error message body that will indicate why the operation failed.
+
+ :param code: Service-defined error code. This code serves as a sub-status
+ for the HTTP error code specified in the response.
+ :type code: str
+ :param message: Human-readable representation of the error.
+ :type message: str
+ :param details: The list of invalid fields send in request, in case of
+ validation error.
+ :type details:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ErrorFieldContract]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorFieldContract]'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None:
+ super(WorkbookError, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.details = details
+
+
+class WorkbookErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'WorkbookError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args)
+
+
+class WorkItemConfiguration(Model):
+ """Work item configuration associated with an application insights resource.
+
+ :param connector_id: Connector identifier where work item is created
+ :type connector_id: str
+ :param config_display_name: Configuration friendly name
+ :type config_display_name: str
+ :param is_default: Boolean value indicating whether configuration is
+ default
+ :type is_default: bool
+ :param id: Unique Id for work item
+ :type id: str
+ :param config_properties: Serialized JSON object for detailed properties
+ :type config_properties: str
+ """
+
+ _attribute_map = {
+ 'connector_id': {'key': 'ConnectorId', 'type': 'str'},
+ 'config_display_name': {'key': 'ConfigDisplayName', 'type': 'str'},
+ 'is_default': {'key': 'IsDefault', 'type': 'bool'},
+ 'id': {'key': 'Id', 'type': 'str'},
+ 'config_properties': {'key': 'ConfigProperties', 'type': 'str'},
+ }
+
+ def __init__(self, *, connector_id: str=None, config_display_name: str=None, is_default: bool=None, id: str=None, config_properties: str=None, **kwargs) -> None:
+ super(WorkItemConfiguration, self).__init__(**kwargs)
+ self.connector_id = connector_id
+ self.config_display_name = config_display_name
+ self.is_default = is_default
+ self.id = id
+ self.config_properties = config_properties
+
+
+class WorkItemConfigurationError(Model):
+ """Error associated with trying to get work item configuration or
+ configurations.
+
+ :param code: Error detail code and explanation
+ :type code: str
+ :param message: Error message
+ :type message: str
+ :param innererror:
+ :type innererror:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.InnerError
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'innererror': {'key': 'innererror', 'type': 'InnerError'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, innererror=None, **kwargs) -> None:
+ super(WorkItemConfigurationError, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.innererror = innererror
+
+
+class WorkItemConfigurationErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'WorkItemConfigurationError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(WorkItemConfigurationErrorException, self).__init__(deserialize, response, 'WorkItemConfigurationError', *args)
+
+
+class WorkItemCreateConfiguration(Model):
+ """Work item configuration creation payload.
+
+ :param connector_id: Unique connector id
+ :type connector_id: str
+ :param connector_data_configuration: Serialized JSON object for detailed
+ properties
+ :type connector_data_configuration: str
+ :param validate_only: Boolean indicating validate only
+ :type validate_only: bool
+ :param work_item_properties: Custom work item properties
+ :type work_item_properties: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'connector_id': {'key': 'ConnectorId', 'type': 'str'},
+ 'connector_data_configuration': {'key': 'ConnectorDataConfiguration', 'type': 'str'},
+ 'validate_only': {'key': 'ValidateOnly', 'type': 'bool'},
+ 'work_item_properties': {'key': 'WorkItemProperties', 'type': '{str}'},
+ }
+
+ def __init__(self, *, connector_id: str=None, connector_data_configuration: str=None, validate_only: bool=None, work_item_properties=None, **kwargs) -> None:
+ super(WorkItemCreateConfiguration, self).__init__(**kwargs)
+ self.connector_id = connector_id
+ self.connector_data_configuration = connector_data_configuration
+ self.validate_only = validate_only
+ self.work_item_properties = work_item_properties
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_paged_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_paged_models.py
new file mode 100644
index 00000000000..17a42d8050f
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/models/_paged_models.py
@@ -0,0 +1,118 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.paging import Paged
+
+
+class OperationPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`Operation ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[Operation]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(OperationPaged, self).__init__(*args, **kwargs)
+class AnnotationPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`Annotation ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[Annotation]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(AnnotationPaged, self).__init__(*args, **kwargs)
+class ApplicationInsightsComponentAPIKeyPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`ApplicationInsightsComponentAPIKey ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponentAPIKey]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(ApplicationInsightsComponentAPIKeyPaged, self).__init__(*args, **kwargs)
+class ApplicationInsightsComponentPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`ApplicationInsightsComponent ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponent]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(ApplicationInsightsComponentPaged, self).__init__(*args, **kwargs)
+class WorkItemConfigurationPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`WorkItemConfiguration ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[WorkItemConfiguration]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(WorkItemConfigurationPaged, self).__init__(*args, **kwargs)
+class ApplicationInsightsComponentWebTestLocationPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`ApplicationInsightsComponentWebTestLocation ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[ApplicationInsightsComponentWebTestLocation]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(ApplicationInsightsComponentWebTestLocationPaged, self).__init__(*args, **kwargs)
+class WebTestPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`WebTest ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[WebTest]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(WebTestPaged, self).__init__(*args, **kwargs)
+class WorkbookPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`Workbook ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[Workbook]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(WorkbookPaged, self).__init__(*args, **kwargs)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/__init__.py
new file mode 100644
index 00000000000..3bd2ec335a0
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/__init__.py
@@ -0,0 +1,46 @@
+# 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 ._operations import Operations
+from ._annotations_operations import AnnotationsOperations
+from ._api_keys_operations import APIKeysOperations
+from ._export_configurations_operations import ExportConfigurationsOperations
+from ._component_current_billing_features_operations import ComponentCurrentBillingFeaturesOperations
+from ._component_quota_status_operations import ComponentQuotaStatusOperations
+from ._component_feature_capabilities_operations import ComponentFeatureCapabilitiesOperations
+from ._component_available_features_operations import ComponentAvailableFeaturesOperations
+from ._proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations
+from ._components_operations import ComponentsOperations
+from ._work_item_configurations_operations import WorkItemConfigurationsOperations
+from ._favorites_operations import FavoritesOperations
+from ._web_test_locations_operations import WebTestLocationsOperations
+from ._web_tests_operations import WebTestsOperations
+from ._analytics_items_operations import AnalyticsItemsOperations
+from ._workbooks_operations import WorkbooksOperations
+
+__all__ = [
+ 'Operations',
+ 'AnnotationsOperations',
+ 'APIKeysOperations',
+ 'ExportConfigurationsOperations',
+ 'ComponentCurrentBillingFeaturesOperations',
+ 'ComponentQuotaStatusOperations',
+ 'ComponentFeatureCapabilitiesOperations',
+ 'ComponentAvailableFeaturesOperations',
+ 'ProactiveDetectionConfigurationsOperations',
+ 'ComponentsOperations',
+ 'WorkItemConfigurationsOperations',
+ 'FavoritesOperations',
+ 'WebTestLocationsOperations',
+ 'WebTestsOperations',
+ 'AnalyticsItemsOperations',
+ 'WorkbooksOperations',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_analytics_items_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_analytics_items_operations.py
new file mode 100644
index 00000000000..09a10624fd5
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_analytics_items_operations.py
@@ -0,0 +1,374 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class AnalyticsItemsOperations(object):
+ """AnalyticsItemsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2015-05-01"
+
+ self.config = config
+
+ def list(
+ self, resource_group_name, resource_name, scope_path, scope="shared", type="none", include_content=None, custom_headers=None, raw=False, **operation_config):
+ """Gets a list of Analytics Items defined within an Application Insights
+ component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param scope_path: Enum indicating if this item definition is owned by
+ a specific user or is shared between all users with access to the
+ Application Insights component. Possible values include:
+ 'analyticsItems', 'myanalyticsItems'
+ :type scope_path: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemScopePath
+ :param scope: Enum indicating if this item definition is owned by a
+ specific user or is shared between all users with access to the
+ Application Insights component. Possible values include: 'shared',
+ 'user'
+ :type scope: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemScope
+ :param type: Enum indicating the type of the Analytics item. Possible
+ values include: 'none', 'query', 'function', 'folder', 'recent'
+ :type type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemTypeParameter
+ :param include_content: Flag indicating whether or not to return the
+ content of each applicable item. If false, only return the item
+ information.
+ :type include_content: bool
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: list or ClientRawResponse if raw=true
+ :rtype:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAnalyticsItem]
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.list.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'scopePath': self._serialize.url("scope_path", scope_path, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+ if scope is not None:
+ query_parameters['scope'] = self._serialize.query("scope", scope, 'str')
+ if type is not None:
+ query_parameters['type'] = self._serialize.query("type", type, 'str')
+ if include_content is not None:
+ query_parameters['includeContent'] = self._serialize.query("include_content", include_content, 'bool')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('[ApplicationInsightsComponentAnalyticsItem]', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}'}
+
+ def get(
+ self, resource_group_name, resource_name, scope_path, id=None, name=None, custom_headers=None, raw=False, **operation_config):
+ """Gets a specific Analytics Items defined within an Application Insights
+ component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param scope_path: Enum indicating if this item definition is owned by
+ a specific user or is shared between all users with access to the
+ Application Insights component. Possible values include:
+ 'analyticsItems', 'myanalyticsItems'
+ :type scope_path: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemScopePath
+ :param id: The Id of a specific item defined in the Application
+ Insights component
+ :type id: str
+ :param name: The name of a specific item defined in the Application
+ Insights component
+ :type name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentAnalyticsItem or
+ ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAnalyticsItem
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'scopePath': self._serialize.url("scope_path", scope_path, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+ if id is not None:
+ query_parameters['id'] = self._serialize.query("id", id, 'str')
+ if name is not None:
+ query_parameters['name'] = self._serialize.query("name", name, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentAnalyticsItem', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item'}
+
+ def put(
+ self, resource_group_name, resource_name, scope_path, item_properties, override_item=None, custom_headers=None, raw=False, **operation_config):
+ """Adds or Updates a specific Analytics Item within an Application
+ Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param scope_path: Enum indicating if this item definition is owned by
+ a specific user or is shared between all users with access to the
+ Application Insights component. Possible values include:
+ 'analyticsItems', 'myanalyticsItems'
+ :type scope_path: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemScopePath
+ :param item_properties: Properties that need to be specified to create
+ a new item and add it to an Application Insights component.
+ :type item_properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAnalyticsItem
+ :param override_item: Flag indicating whether or not to force save an
+ item. This allows overriding an item if it already exists.
+ :type override_item: bool
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentAnalyticsItem or
+ ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAnalyticsItem
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.put.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'scopePath': self._serialize.url("scope_path", scope_path, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+ if override_item is not None:
+ query_parameters['overrideItem'] = self._serialize.query("override_item", override_item, 'bool')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(item_properties, 'ApplicationInsightsComponentAnalyticsItem')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentAnalyticsItem', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item'}
+
+ def delete(
+ self, resource_group_name, resource_name, scope_path, id=None, name=None, custom_headers=None, raw=False, **operation_config):
+ """Deletes a specific Analytics Items defined within an Application
+ Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param scope_path: Enum indicating if this item definition is owned by
+ a specific user or is shared between all users with access to the
+ Application Insights component. Possible values include:
+ 'analyticsItems', 'myanalyticsItems'
+ :type scope_path: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ItemScopePath
+ :param id: The Id of a specific item defined in the Application
+ Insights component
+ :type id: str
+ :param name: The name of a specific item defined in the Application
+ Insights component
+ :type name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'scopePath': self._serialize.url("scope_path", scope_path, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+ if id is not None:
+ query_parameters['id'] = self._serialize.query("id", id, 'str')
+ if name is not None:
+ query_parameters['name'] = self._serialize.query("name", name, 'str')
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/{scopePath}/item'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_annotations_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_annotations_operations.py
new file mode 100644
index 00000000000..ee2ab6c29dc
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_annotations_operations.py
@@ -0,0 +1,317 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class AnnotationsOperations(object):
+ """AnnotationsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2015-05-01"
+
+ self.config = config
+
+ def list(
+ self, resource_group_name, resource_name, start, end, custom_headers=None, raw=False, **operation_config):
+ """Gets the list of annotations for a component for given time range.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param start: The start time to query from for annotations, cannot be
+ older than 90 days from current date.
+ :type start: str
+ :param end: The end time to query for annotations.
+ :type end: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of Annotation
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.AnnotationPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.Annotation]
+ :raises:
+ :class:`AnnotationErrorException`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+ query_parameters['start'] = self._serialize.query("start", start, 'str')
+ query_parameters['end'] = self._serialize.query("end", end, 'str')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.AnnotationErrorException(self._deserialize, response)
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.AnnotationPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations'}
+
+ def create(
+ self, resource_group_name, resource_name, annotation_properties, custom_headers=None, raw=False, **operation_config):
+ """Create an Annotation of an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param annotation_properties: Properties that need to be specified to
+ create an annotation of a Application Insights component.
+ :type annotation_properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.Annotation
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: list or ClientRawResponse if raw=true
+ :rtype:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.Annotation] or
+ ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`AnnotationErrorException`
+ """
+ # Construct URL
+ url = self.create.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(annotation_properties, 'Annotation')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.AnnotationErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('[Annotation]', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations'}
+
+ def delete(
+ self, resource_group_name, resource_name, annotation_id, custom_headers=None, raw=False, **operation_config):
+ """Delete an Annotation of an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param annotation_id: The unique annotation ID. This is unique within
+ a Application Insights component.
+ :type annotation_id: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'annotationId': self._serialize.url("annotation_id", annotation_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}'}
+
+ def get(
+ self, resource_group_name, resource_name, annotation_id, custom_headers=None, raw=False, **operation_config):
+ """Get the annotation for given id.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param annotation_id: The unique annotation ID. This is unique within
+ a Application Insights component.
+ :type annotation_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: list or ClientRawResponse if raw=true
+ :rtype:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.Annotation] or
+ ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`AnnotationErrorException`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'annotationId': self._serialize.url("annotation_id", annotation_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.AnnotationErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('[Annotation]', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/Annotations/{annotationId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/api_keys_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_api_keys_operations.py
similarity index 74%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/api_keys_operations.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_api_keys_operations.py
index a80e2eddf56..1ba480c3cde 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/api_keys_operations.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_api_keys_operations.py
@@ -19,11 +19,13 @@
class APIKeysOperations(object):
"""APIKeysOperations operations.
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
- :param deserializer: An objec model deserializer.
- :ivar api_version: Client Api Version. Constant value: "2015-05-01".
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
"""
models = models
@@ -41,7 +43,8 @@ def list(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
"""Gets a list of API keys of an Application Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -54,24 +57,23 @@ def list(
:return: An iterator like instance of
ApplicationInsightsComponentAPIKey
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKeyPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey]
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAPIKeyPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAPIKey]
:raises: :class:`CloudError`
"""
- def internal_paging(next_link=None, raw=False):
-
+ def prepare_request(next_link=None):
if not next_link:
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ApiKeys'
+ url = self.list.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
else:
url = next_link
@@ -79,7 +81,7 @@ def internal_paging(next_link=None, raw=False):
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -88,9 +90,13 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(
- request, header_parameters, stream=False, **operation_config)
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -100,20 +106,20 @@ def internal_paging(next_link=None, raw=False):
return response
# Deserialize response
- deserialized = models.ApplicationInsightsComponentAPIKeyPaged(internal_paging, self._deserialize.dependencies)
-
+ header_dict = None
if raw:
header_dict = {}
- client_raw_response = models.ApplicationInsightsComponentAPIKeyPaged(internal_paging, self._deserialize.dependencies, header_dict)
- return client_raw_response
+ deserialized = models.ApplicationInsightsComponentAPIKeyPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys'}
def create(
self, resource_group_name, resource_name, api_key_properties, custom_headers=None, raw=False, **operation_config):
"""Create an API Key of an Application Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -121,7 +127,7 @@ def create(
:param api_key_properties: Properties that need to be specified to
create an API key of a Application Insights component.
:type api_key_properties:
- ~azure.mgmt.applicationinsights.models.APIKeyRequest
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.APIKeyRequest
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
@@ -130,25 +136,26 @@ def create(
:return: ApplicationInsightsComponentAPIKey or ClientRawResponse if
raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAPIKey
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ApiKeys'
+ url = self.create.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
@@ -161,9 +168,8 @@ def create(
body_content = self._serialize.body(api_key_properties, 'APIKeyRequest')
# Construct and send request
- request = self._client.post(url, query_parameters)
- response = self._client.send(
- request, header_parameters, body_content, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -171,7 +177,6 @@ def create(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentAPIKey', response)
@@ -180,12 +185,14 @@ def create(
return client_raw_response
return deserialized
+ create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ApiKeys'}
def delete(
self, resource_group_name, resource_name, key_id, custom_headers=None, raw=False, **operation_config):
"""Delete an API Key of an Application Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -201,15 +208,15 @@ def delete(
:return: ApplicationInsightsComponentAPIKey or ClientRawResponse if
raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAPIKey
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/APIKeys/{keyId}'
+ url = self.delete.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
'keyId': self._serialize.url("key_id", key_id, 'str')
}
@@ -217,11 +224,11 @@ def delete(
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -230,8 +237,8 @@ def delete(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.delete(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -239,7 +246,6 @@ def delete(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentAPIKey', response)
@@ -248,12 +254,14 @@ def delete(
return client_raw_response
return deserialized
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}'}
def get(
self, resource_group_name, resource_name, key_id, custom_headers=None, raw=False, **operation_config):
"""Get the API Key for this key id.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -269,15 +277,15 @@ def get(
:return: ApplicationInsightsComponentAPIKey or ClientRawResponse if
raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentAPIKey
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAPIKey
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/APIKeys/{keyId}'
+ url = self.get.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
'keyId': self._serialize.url("key_id", key_id, 'str')
}
@@ -285,11 +293,11 @@ def get(
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -298,8 +306,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -307,7 +315,6 @@ def get(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentAPIKey', response)
@@ -316,3 +323,4 @@ def get(
return client_raw_response
return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/APIKeys/{keyId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_available_features_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_available_features_operations.py
new file mode 100644
index 00000000000..6dcc4364e87
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_available_features_operations.py
@@ -0,0 +1,105 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class ComponentAvailableFeaturesOperations(object):
+ """ComponentAvailableFeaturesOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2015-05-01"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Returns all available features of the application insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentAvailableFeatures or
+ ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentAvailableFeatures
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentAvailableFeatures', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/getavailablebillingfeatures'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/component_current_billing_features_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_current_billing_features_operations.py
similarity index 77%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/component_current_billing_features_operations.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_current_billing_features_operations.py
index 16cade55aa9..e01909b7ac0 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/component_current_billing_features_operations.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_current_billing_features_operations.py
@@ -19,11 +19,13 @@
class ComponentCurrentBillingFeaturesOperations(object):
"""ComponentCurrentBillingFeaturesOperations operations.
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
- :param deserializer: An objec model deserializer.
- :ivar api_version: Client Api Version. Constant value: "2015-05-01".
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
"""
models = models
@@ -41,7 +43,8 @@ def get(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
"""Returns current billing features for an Application Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -54,26 +57,26 @@ def get(
:return: ApplicationInsightsComponentBillingFeatures or
ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentBillingFeatures
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentBillingFeatures
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/currentbillingfeatures'
+ url = self.get.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -82,8 +85,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -91,7 +94,6 @@ def get(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentBillingFeatures', response)
@@ -100,20 +102,22 @@ def get(
return client_raw_response
return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures'}
def update(
self, resource_group_name, resource_name, data_volume_cap=None, current_billing_features=None, custom_headers=None, raw=False, **operation_config):
"""Update current billing features for an Application Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
:type resource_name: str
:param data_volume_cap: An Application Insights component daily data
- volumne cap
+ volume cap
:type data_volume_cap:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentDataVolumeCap
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentDataVolumeCap
:param current_billing_features: Current enabled pricing plan. When
the component is in the Enterprise plan, this will list both 'Basic'
and 'Application Insights Enterprise'.
@@ -126,27 +130,28 @@ def update(
:return: ApplicationInsightsComponentBillingFeatures or
ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentBillingFeatures
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentBillingFeatures
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
billing_features_properties = models.ApplicationInsightsComponentBillingFeatures(data_volume_cap=data_volume_cap, current_billing_features=current_billing_features)
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/currentbillingfeatures'
+ url = self.update.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
@@ -159,9 +164,8 @@ def update(
body_content = self._serialize.body(billing_features_properties, 'ApplicationInsightsComponentBillingFeatures')
# Construct and send request
- request = self._client.put(url, query_parameters)
- response = self._client.send(
- request, header_parameters, body_content, stream=False, **operation_config)
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -169,7 +173,6 @@ def update(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentBillingFeatures', response)
@@ -178,3 +181,4 @@ def update(
return client_raw_response
return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/currentbillingfeatures'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_feature_capabilities_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_feature_capabilities_operations.py
new file mode 100644
index 00000000000..51515c2c123
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_feature_capabilities_operations.py
@@ -0,0 +1,105 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class ComponentFeatureCapabilitiesOperations(object):
+ """ComponentFeatureCapabilitiesOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2015-05-01"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Returns feature capabilities of the application insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentFeatureCapabilities or
+ ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFeatureCapabilities
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentFeatureCapabilities', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/featurecapabilities'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/component_quota_status_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_quota_status_operations.py
similarity index 77%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/component_quota_status_operations.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_quota_status_operations.py
index 13771c68a22..7c25baf1f00 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/component_quota_status_operations.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_component_quota_status_operations.py
@@ -19,11 +19,13 @@
class ComponentQuotaStatusOperations(object):
"""ComponentQuotaStatusOperations operations.
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
- :param deserializer: An objec model deserializer.
- :ivar api_version: Client Api Version. Constant value: "2015-05-01".
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
"""
models = models
@@ -42,7 +44,8 @@ def get(
"""Returns daily data volume cap (quota) status for an Application
Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -55,26 +58,26 @@ def get(
:return: ApplicationInsightsComponentQuotaStatus or ClientRawResponse
if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentQuotaStatus
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentQuotaStatus
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/quotastatus'
+ url = self.get.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -83,8 +86,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -92,7 +95,6 @@ def get(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentQuotaStatus', response)
@@ -101,3 +103,4 @@ def get(
return client_raw_response
return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/quotastatus'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/components_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_components_operations.py
similarity index 54%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/components_operations.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_components_operations.py
index a8ed3b02337..4bdd9a8b3b2 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/components_operations.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_components_operations.py
@@ -19,11 +19,13 @@
class ComponentsOperations(object):
"""ComponentsOperations operations.
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
- :param deserializer: An objec model deserializer.
- :ivar api_version: Client Api Version. Constant value: "2015-05-01".
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
"""
models = models
@@ -49,22 +51,21 @@ def list(
overrides`.
:return: An iterator like instance of ApplicationInsightsComponent
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent]
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponent]
:raises: :class:`CloudError`
"""
- def internal_paging(next_link=None, raw=False):
-
+ def prepare_request(next_link=None):
if not next_link:
# Construct URL
- url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/components'
+ url = self.list.metadata['url']
path_format_arguments = {
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
else:
url = next_link
@@ -72,7 +73,7 @@ def internal_paging(next_link=None, raw=False):
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -81,9 +82,13 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(
- request, header_parameters, stream=False, **operation_config)
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -93,20 +98,20 @@ def internal_paging(next_link=None, raw=False):
return response
# Deserialize response
- deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies)
-
+ header_dict = None
if raw:
header_dict = {}
- client_raw_response = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict)
- return client_raw_response
+ deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components'}
def list_by_resource_group(
self, resource_group_name, custom_headers=None, raw=False, **operation_config):
"""Gets a list of Application Insights components within a resource group.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
@@ -115,23 +120,22 @@ def list_by_resource_group(
overrides`.
:return: An iterator like instance of ApplicationInsightsComponent
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent]
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponent]
:raises: :class:`CloudError`
"""
- def internal_paging(next_link=None, raw=False):
-
+ def prepare_request(next_link=None):
if not next_link:
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components'
+ url = self.list_by_resource_group.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
else:
url = next_link
@@ -139,7 +143,7 @@ def internal_paging(next_link=None, raw=False):
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -148,9 +152,13 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(
- request, header_parameters, stream=False, **operation_config)
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -160,20 +168,20 @@ def internal_paging(next_link=None, raw=False):
return response
# Deserialize response
- deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies)
-
+ header_dict = None
if raw:
header_dict = {}
- client_raw_response = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict)
- return client_raw_response
+ deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components'}
def delete(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
"""Deletes an Application Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -188,21 +196,20 @@ def delete(
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}'
+ url = self.delete.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -211,8 +218,8 @@ def delete(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.delete(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200, 204]:
exp = CloudError(response)
@@ -222,12 +229,14 @@ def delete(
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'}
def get(
self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
"""Returns an Application Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -239,26 +248,26 @@ def get(
overrides`.
:return: ApplicationInsightsComponent or ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent or
- ~msrest.pipeline.ClientRawResponse
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponent
+ or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}'
+ url = self.get.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -267,8 +276,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -276,7 +285,6 @@ def get(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponent', response)
@@ -285,6 +293,7 @@ def get(
return client_raw_response
return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'}
def create_or_update(
self, resource_group_name, resource_name, insight_properties, custom_headers=None, raw=False, **operation_config):
@@ -292,7 +301,8 @@ def create_or_update(
cannot specify a different value for InstrumentationKey nor AppId in
the Put operation.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -300,7 +310,7 @@ def create_or_update(
:param insight_properties: Properties that need to be specified to
create an Application Insights component.
:type insight_properties:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponent
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
@@ -308,25 +318,26 @@ def create_or_update(
overrides`.
:return: ApplicationInsightsComponent or ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent or
- ~msrest.pipeline.ClientRawResponse
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponent
+ or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}'
+ url = self.create_or_update.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
@@ -339,9 +350,8 @@ def create_or_update(
body_content = self._serialize.body(insight_properties, 'ApplicationInsightsComponent')
# Construct and send request
- request = self._client.put(url, query_parameters)
- response = self._client.send(
- request, header_parameters, body_content, stream=False, **operation_config)
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -349,7 +359,6 @@ def create_or_update(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponent', response)
@@ -358,13 +367,15 @@ def create_or_update(
return client_raw_response
return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'}
def update_tags(
self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config):
"""Updates an existing component's tags. To update other fields use the
CreateOrUpdate method.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -378,27 +389,28 @@ def update_tags(
overrides`.
:return: ApplicationInsightsComponent or ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponent or
- ~msrest.pipeline.ClientRawResponse
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponent
+ or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
component_tags = models.TagsResource(tags=tags)
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}'
+ url = self.update_tags.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
@@ -411,9 +423,8 @@ def update_tags(
body_content = self._serialize.body(component_tags, 'TagsResource')
# Construct and send request
- request = self._client.patch(url, query_parameters)
- response = self._client.send(
- request, header_parameters, body_content, stream=False, **operation_config)
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -421,7 +432,6 @@ def update_tags(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponent', response)
@@ -430,3 +440,155 @@ def update_tags(
return client_raw_response
return deserialized
+ update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'}
+
+ def purge(
+ self, resource_group_name, resource_name, table, filters, custom_headers=None, raw=False, **operation_config):
+ """Purges data in an Application Insights component by a set of
+ user-defined filters.
+ In order to manage system resources, purge requests are throttled at 50
+ requests per hour. You should batch the execution of purge requests by
+ sending a single command whose predicate includes all user identities
+ that require purging. Use the in operator to specify multiple
+ identities. You should run the query prior to using for a purge request
+ to verify that the results are expected.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param table: Table from which to purge data.
+ :type table: str
+ :param filters: The set of columns and filters (queries) to run over
+ them to purge the resulting data.
+ :type filters:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ComponentPurgeBodyFilters]
+ :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: ComponentPurgeResponse or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ComponentPurgeResponse
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ body = models.ComponentPurgeBody(table=table, filters=filters)
+
+ # Construct URL
+ url = self.purge.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(body, 'ComponentPurgeBody')
+
+ # 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 [202]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 202:
+ deserialized = self._deserialize('ComponentPurgeResponse', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ purge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge'}
+
+ def get_purge_status(
+ self, resource_group_name, resource_name, purge_id, custom_headers=None, raw=False, **operation_config):
+ """Get status for an ongoing purge operation.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param purge_id: In a purge status request, this is the Id of the
+ operation the status of which is returned.
+ :type purge_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: ComponentPurgeStatusResponse or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ComponentPurgeStatusResponse
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get_purge_status.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'purgeId': self._serialize.url("purge_id", purge_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ComponentPurgeStatusResponse', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get_purge_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/export_configurations_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_export_configurations_operations.py
similarity index 76%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/export_configurations_operations.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_export_configurations_operations.py
index 8f5cd9f601e..aaf8b6f8709 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/export_configurations_operations.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_export_configurations_operations.py
@@ -19,11 +19,13 @@
class ExportConfigurationsOperations(object):
"""ExportConfigurationsOperations operations.
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
- :param deserializer: An objec model deserializer.
- :ivar api_version: Client Api Version. Constant value: "2015-05-01".
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
"""
models = models
@@ -42,7 +44,8 @@ def list(
"""Gets a list of Continuous Export configuration of an Application
Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -54,26 +57,26 @@ def list(
overrides`.
:return: list or ClientRawResponse if raw=true
:rtype:
- list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration]
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentExportConfiguration]
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/exportconfiguration'
+ url = self.list.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -82,8 +85,8 @@ def list(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -91,7 +94,6 @@ def list(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('[ApplicationInsightsComponentExportConfiguration]', response)
@@ -100,13 +102,15 @@ def list(
return client_raw_response
return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration'}
def create(
self, resource_group_name, resource_name, export_properties, custom_headers=None, raw=False, **operation_config):
"""Create a Continuous Export configuration of an Application Insights
component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -115,7 +119,7 @@ def create(
create a Continuous Export configuration of a Application Insights
component.
:type export_properties:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportRequest
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentExportRequest
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
@@ -123,25 +127,26 @@ def create(
overrides`.
:return: list or ClientRawResponse if raw=true
:rtype:
- list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration]
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentExportConfiguration]
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/exportconfiguration'
+ url = self.create.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
@@ -154,9 +159,8 @@ def create(
body_content = self._serialize.body(export_properties, 'ApplicationInsightsComponentExportRequest')
# Construct and send request
- request = self._client.post(url, query_parameters)
- response = self._client.send(
- request, header_parameters, body_content, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -164,7 +168,6 @@ def create(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('[ApplicationInsightsComponentExportConfiguration]', response)
@@ -173,13 +176,15 @@ def create(
return client_raw_response
return deserialized
+ create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration'}
def delete(
self, resource_group_name, resource_name, export_id, custom_headers=None, raw=False, **operation_config):
"""Delete a Continuous Export configuration of an Application Insights
component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -195,15 +200,15 @@ def delete(
:return: ApplicationInsightsComponentExportConfiguration or
ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentExportConfiguration
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/exportconfiguration/{exportId}'
+ url = self.delete.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
'exportId': self._serialize.url("export_id", export_id, 'str')
}
@@ -211,11 +216,11 @@ def delete(
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -224,8 +229,8 @@ def delete(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.delete(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -233,7 +238,6 @@ def delete(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentExportConfiguration', response)
@@ -242,12 +246,14 @@ def delete(
return client_raw_response
return deserialized
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}'}
def get(
self, resource_group_name, resource_name, export_id, custom_headers=None, raw=False, **operation_config):
"""Get the Continuous Export configuration for this export id.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -263,15 +269,15 @@ def get(
:return: ApplicationInsightsComponentExportConfiguration or
ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentExportConfiguration
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/exportconfiguration/{exportId}'
+ url = self.get.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
'exportId': self._serialize.url("export_id", export_id, 'str')
}
@@ -279,11 +285,11 @@ def get(
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -292,8 +298,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -301,7 +307,6 @@ def get(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentExportConfiguration', response)
@@ -310,12 +315,14 @@ def get(
return client_raw_response
return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}'}
def update(
self, resource_group_name, resource_name, export_id, export_properties, custom_headers=None, raw=False, **operation_config):
"""Update the Continuous Export configuration for this export id.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -326,7 +333,7 @@ def update(
:param export_properties: Properties that need to be specified to
update the Continuous Export configuration.
:type export_properties:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportRequest
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentExportRequest
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
@@ -335,15 +342,15 @@ def update(
:return: ApplicationInsightsComponentExportConfiguration or
ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentExportConfiguration
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentExportConfiguration
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/exportconfiguration/{exportId}'
+ url = self.update.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
'exportId': self._serialize.url("export_id", export_id, 'str')
}
@@ -351,10 +358,11 @@ def update(
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
@@ -367,9 +375,8 @@ def update(
body_content = self._serialize.body(export_properties, 'ApplicationInsightsComponentExportRequest')
# Construct and send request
- request = self._client.put(url, query_parameters)
- response = self._client.send(
- request, header_parameters, body_content, stream=False, **operation_config)
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -377,7 +384,6 @@ def update(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentExportConfiguration', response)
@@ -386,3 +392,4 @@ def update(
return client_raw_response
return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/exportconfiguration/{exportId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_favorites_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_favorites_operations.py
new file mode 100644
index 00000000000..bf0a809265e
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_favorites_operations.py
@@ -0,0 +1,414 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class FavoritesOperations(object):
+ """FavoritesOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2015-05-01"
+
+ self.config = config
+
+ def list(
+ self, resource_group_name, resource_name, favorite_type="shared", source_type=None, can_fetch_content=None, tags=None, custom_headers=None, raw=False, **operation_config):
+ """Gets a list of favorites defined within an Application Insights
+ component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param favorite_type: The type of favorite. Value can be either shared
+ or user. Possible values include: 'shared', 'user'
+ :type favorite_type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.FavoriteType
+ :param source_type: Source type of favorite to return. When left out,
+ the source type defaults to 'other' (not present in this enum).
+ Possible values include: 'retention', 'notebook', 'sessions',
+ 'events', 'userflows', 'funnel', 'impact', 'segmentation'
+ :type source_type: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.FavoriteSourceType
+ :param can_fetch_content: Flag indicating whether or not to return the
+ full content for each applicable favorite. If false, only return
+ summary content for favorites.
+ :type can_fetch_content: bool
+ :param tags: Tags that must be present on each favorite returned.
+ :type tags: list[str]
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: list or ClientRawResponse if raw=true
+ :rtype:
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFavorite]
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.list.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+ if favorite_type is not None:
+ query_parameters['favoriteType'] = self._serialize.query("favorite_type", favorite_type, 'FavoriteType')
+ if source_type is not None:
+ query_parameters['sourceType'] = self._serialize.query("source_type", source_type, 'str')
+ if can_fetch_content is not None:
+ query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool')
+ if tags is not None:
+ query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',')
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('[ApplicationInsightsComponentFavorite]', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites'}
+
+ def get(
+ self, resource_group_name, resource_name, favorite_id, custom_headers=None, raw=False, **operation_config):
+ """Get a single favorite by its FavoriteId, defined within an Application
+ Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param favorite_id: The Id of a specific favorite defined in the
+ Application Insights component
+ :type favorite_id: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentFavorite or ClientRawResponse if
+ raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFavorite
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'}
+
+ def add(
+ self, resource_group_name, resource_name, favorite_id, favorite_properties, custom_headers=None, raw=False, **operation_config):
+ """Adds a new favorites to an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param favorite_id: The Id of a specific favorite defined in the
+ Application Insights component
+ :type favorite_id: str
+ :param favorite_properties: Properties that need to be specified to
+ create a new favorite and add it to an Application Insights component.
+ :type favorite_properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFavorite
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentFavorite or ClientRawResponse if
+ raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFavorite
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.add.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(favorite_properties, 'ApplicationInsightsComponentFavorite')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ add.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'}
+
+ def update(
+ self, resource_group_name, resource_name, favorite_id, favorite_properties, custom_headers=None, raw=False, **operation_config):
+ """Updates a favorite that has already been added to an Application
+ Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param favorite_id: The Id of a specific favorite defined in the
+ Application Insights component
+ :type favorite_id: str
+ :param favorite_properties: Properties that need to be specified to
+ update the existing favorite.
+ :type favorite_properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFavorite
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentFavorite or ClientRawResponse if
+ raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentFavorite
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(favorite_properties, 'ApplicationInsightsComponentFavorite')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentFavorite', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'}
+
+ def delete(
+ self, resource_group_name, resource_name, favorite_id, custom_headers=None, raw=False, **operation_config):
+ """Remove a favorite that is associated to an Application Insights
+ component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param favorite_id: The Id of a specific favorite defined in the
+ Application Insights component
+ :type favorite_id: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'favoriteId': self._serialize.url("favorite_id", favorite_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/favorites/{favoriteId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_operations.py
similarity index 71%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/operations.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_operations.py
index 8c6c4ab58de..b83ba6c5bb6 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/operations.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_operations.py
@@ -18,11 +18,13 @@
class Operations(object):
"""Operations operations.
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
- :param deserializer: An objec model deserializer.
- :ivar api_version: Client Api Version. Constant value: "2015-05-01".
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
"""
models = models
@@ -47,19 +49,18 @@ def list(
overrides`.
:return: An iterator like instance of Operation
:rtype:
- ~azure.mgmt.applicationinsights.models.OperationPaged[~azure.mgmt.applicationinsights.models.Operation]
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.OperationPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.Operation]
:raises:
- :class:`ErrorResponseException`
+ :class:`ErrorResponseException`
"""
- def internal_paging(next_link=None, raw=False):
-
+ def prepare_request(next_link=None):
if not next_link:
# Construct URL
- url = '/providers/microsoft.insights/operations'
+ url = self.list.metadata['url']
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
else:
url = next_link
@@ -67,7 +68,7 @@ def internal_paging(next_link=None, raw=False):
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -76,9 +77,13 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(
- request, header_parameters, stream=False, **operation_config)
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
raise models.ErrorResponseException(self._deserialize, response)
@@ -86,11 +91,10 @@ def internal_paging(next_link=None, raw=False):
return response
# Deserialize response
- deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies)
-
+ header_dict = None
if raw:
header_dict = {}
- client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict)
- return client_raw_response
+ deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
+ list.metadata = {'url': '/providers/Microsoft.Insights/operations'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/proactive_detection_configurations_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_proactive_detection_configurations_operations.py
similarity index 76%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/proactive_detection_configurations_operations.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_proactive_detection_configurations_operations.py
index 3a5f0b76366..809cac1cd38 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/proactive_detection_configurations_operations.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_proactive_detection_configurations_operations.py
@@ -19,11 +19,13 @@
class ProactiveDetectionConfigurationsOperations(object):
"""ProactiveDetectionConfigurationsOperations operations.
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
- :param deserializer: An objec model deserializer.
- :ivar api_version: Client Api Version. Constant value: "2015-05-01".
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
"""
models = models
@@ -42,7 +44,8 @@ def list(
"""Gets a list of ProactiveDetection configurations of an Application
Insights component.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -54,26 +57,26 @@ def list(
overrides`.
:return: list or ClientRawResponse if raw=true
:rtype:
- list[~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration]
+ list[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentProactiveDetectionConfiguration]
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ProactiveDetectionConfigs'
+ url = self.list.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -82,8 +85,8 @@ def list(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -91,7 +94,6 @@ def list(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('[ApplicationInsightsComponentProactiveDetectionConfiguration]', response)
@@ -100,12 +102,14 @@ def list(
return client_raw_response
return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs'}
def get(
self, resource_group_name, resource_name, configuration_id, custom_headers=None, raw=False, **operation_config):
"""Get the ProactiveDetection configuration for this configuration id.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -121,15 +125,15 @@ def get(
:return: ApplicationInsightsComponentProactiveDetectionConfiguration
or ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentProactiveDetectionConfiguration
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'
+ url = self.get.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
'ConfigurationId': self._serialize.url("configuration_id", configuration_id, 'str')
}
@@ -137,11 +141,11 @@ def get(
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -150,8 +154,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -159,7 +163,6 @@ def get(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response)
@@ -168,12 +171,14 @@ def get(
return client_raw_response
return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'}
def update(
self, resource_group_name, resource_name, configuration_id, proactive_detection_properties, custom_headers=None, raw=False, **operation_config):
"""Update the ProactiveDetection configuration for this configuration id.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param resource_name: The name of the Application Insights component
resource.
@@ -184,7 +189,7 @@ def update(
:param proactive_detection_properties: Properties that need to be
specified to update the ProactiveDetection configuration.
:type proactive_detection_properties:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentProactiveDetectionConfiguration
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
@@ -193,15 +198,15 @@ def update(
:return: ApplicationInsightsComponentProactiveDetectionConfiguration
or ClientRawResponse if raw=true
:rtype:
- ~azure.mgmt.applicationinsights.models.ApplicationInsightsComponentProactiveDetectionConfiguration
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentProactiveDetectionConfiguration
or ~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'
+ url = self.update.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
'ConfigurationId': self._serialize.url("configuration_id", configuration_id, 'str')
}
@@ -209,10 +214,11 @@ def update(
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
@@ -225,9 +231,8 @@ def update(
body_content = self._serialize.body(proactive_detection_properties, 'ApplicationInsightsComponentProactiveDetectionConfiguration')
# Construct and send request
- request = self._client.put(url, query_parameters)
- response = self._client.send(
- request, header_parameters, body_content, stream=False, **operation_config)
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -235,7 +240,6 @@ def update(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response)
@@ -244,3 +248,4 @@ def update(
return client_raw_response
return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_web_test_locations_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_web_test_locations_operations.py
new file mode 100644
index 00000000000..f20750520e7
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_web_test_locations_operations.py
@@ -0,0 +1,116 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class WebTestLocationsOperations(object):
+ """WebTestLocationsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2015-05-01"
+
+ self.config = config
+
+ def list(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Gets a list of web test locations available to this Application
+ Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of
+ ApplicationInsightsComponentWebTestLocation
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentWebTestLocationPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.ApplicationInsightsComponentWebTestLocation]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.ApplicationInsightsComponentWebTestLocationPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/syntheticmonitorlocations'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/web_tests_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_web_tests_operations.py
similarity index 63%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/web_tests_operations.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_web_tests_operations.py
index 44a6e74d6e2..c3bf172e11c 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/operations/web_tests_operations.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_web_tests_operations.py
@@ -19,11 +19,13 @@
class WebTestsOperations(object):
"""WebTestsOperations operations.
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
- :param deserializer: An objec model deserializer.
- :ivar api_version: Client Api Version. Constant value: "2015-05-01".
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
"""
models = models
@@ -42,7 +44,8 @@ def list_by_resource_group(
"""Get all Application Insights web tests defined within a specified
resource group.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
@@ -51,23 +54,22 @@ def list_by_resource_group(
overrides`.
:return: An iterator like instance of WebTest
:rtype:
- ~azure.mgmt.applicationinsights.models.WebTestPaged[~azure.mgmt.applicationinsights.models.WebTest]
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.WebTest]
:raises: :class:`CloudError`
"""
- def internal_paging(next_link=None, raw=False):
-
+ def prepare_request(next_link=None):
if not next_link:
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/webtests'
+ url = self.list_by_resource_group.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
else:
url = next_link
@@ -75,7 +77,7 @@ def internal_paging(next_link=None, raw=False):
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -84,9 +86,13 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(
- request, header_parameters, stream=False, **operation_config)
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -96,20 +102,20 @@ def internal_paging(next_link=None, raw=False):
return response
# Deserialize response
- deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies)
-
+ header_dict = None
if raw:
header_dict = {}
- client_raw_response = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict)
- return client_raw_response
+ deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests'}
def get(
self, resource_group_name, web_test_name, custom_headers=None, raw=False, **operation_config):
"""Get a specific Application Insights web test definition.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param web_test_name: The name of the Application Insights webtest
resource.
@@ -120,26 +126,26 @@ def get(
:param operation_config: :ref:`Operation configuration
overrides`.
:return: WebTest or ClientRawResponse if raw=true
- :rtype: ~azure.mgmt.applicationinsights.models.WebTest or
+ :rtype: ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTest or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/webtests/{webTestName}'
+ url = self.get.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'webTestName': self._serialize.url("web_test_name", web_test_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -148,8 +154,8 @@ def get(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ 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]:
exp = CloudError(response)
@@ -157,7 +163,6 @@ def get(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('WebTest', response)
@@ -166,12 +171,14 @@ def get(
return client_raw_response
return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'}
def create_or_update(
self, resource_group_name, web_test_name, web_test_definition, custom_headers=None, raw=False, **operation_config):
"""Creates or updates an Application Insights web test definition.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param web_test_name: The name of the Application Insights webtest
resource.
@@ -179,32 +186,33 @@ def create_or_update(
:param web_test_definition: Properties that need to be specified to
create or update an Application Insights web test definition.
:type web_test_definition:
- ~azure.mgmt.applicationinsights.models.WebTest
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTest
: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: WebTest or ClientRawResponse if raw=true
- :rtype: ~azure.mgmt.applicationinsights.models.WebTest or
+ :rtype: ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTest or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/webtests/{webTestName}'
+ url = self.create_or_update.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'webTestName': self._serialize.url("web_test_name", web_test_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
@@ -217,9 +225,8 @@ def create_or_update(
body_content = self._serialize.body(web_test_definition, 'WebTest')
# Construct and send request
- request = self._client.put(url, query_parameters)
- response = self._client.send(
- request, header_parameters, body_content, stream=False, **operation_config)
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -227,7 +234,6 @@ def create_or_update(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('WebTest', response)
@@ -236,12 +242,14 @@ def create_or_update(
return client_raw_response
return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'}
def update_tags(
self, resource_group_name, web_test_name, tags=None, custom_headers=None, raw=False, **operation_config):
"""Creates or updates an Application Insights web test definition.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param web_test_name: The name of the Application Insights webtest
resource.
@@ -254,27 +262,28 @@ def update_tags(
:param operation_config: :ref:`Operation configuration
overrides`.
:return: WebTest or ClientRawResponse if raw=true
- :rtype: ~azure.mgmt.applicationinsights.models.WebTest or
+ :rtype: ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTest or
~msrest.pipeline.ClientRawResponse
:raises: :class:`CloudError`
"""
web_test_tags = models.TagsResource(tags=tags)
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/webtests/{webTestName}'
+ url = self.update_tags.metadata['url']
path_format_arguments = {
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
'webTestName': self._serialize.url("web_test_name", web_test_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
@@ -287,9 +296,8 @@ def update_tags(
body_content = self._serialize.body(web_test_tags, 'TagsResource')
# Construct and send request
- request = self._client.patch(url, query_parameters)
- response = self._client.send(
- request, header_parameters, body_content, stream=False, **operation_config)
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -297,7 +305,6 @@ def update_tags(
raise exp
deserialized = None
-
if response.status_code == 200:
deserialized = self._deserialize('WebTest', response)
@@ -306,12 +313,14 @@ def update_tags(
return client_raw_response
return deserialized
+ update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'}
def delete(
self, resource_group_name, web_test_name, custom_headers=None, raw=False, **operation_config):
"""Deletes an Application Insights web test.
- :param resource_group_name: The name of the resource group.
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
:type resource_group_name: str
:param web_test_name: The name of the Application Insights webtest
resource.
@@ -326,21 +335,20 @@ def delete(
:raises: :class:`CloudError`
"""
# Construct URL
- url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/webtests/{webTestName}'
+ url = self.delete.metadata['url']
path_format_arguments = {
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'),
- 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
'webTestName': self._serialize.url("web_test_name", web_test_name, 'str')
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -349,8 +357,8 @@ def delete(
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.delete(url, query_parameters)
- response = self._client.send(request, header_parameters, stream=False, **operation_config)
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200, 204]:
exp = CloudError(response)
@@ -360,10 +368,11 @@ def delete(
if raw:
client_raw_response = ClientRawResponse(None, response)
return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/webtests/{webTestName}'}
def list(
self, custom_headers=None, raw=False, **operation_config):
- """Get all Application Insights web test alerts definitioned within a
+ """Get all Application Insights web test alerts definitions within a
subscription.
:param dict custom_headers: headers that will be added to the request
@@ -373,22 +382,21 @@ def list(
overrides`.
:return: An iterator like instance of WebTest
:rtype:
- ~azure.mgmt.applicationinsights.models.WebTestPaged[~azure.mgmt.applicationinsights.models.WebTest]
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.WebTest]
:raises: :class:`CloudError`
"""
- def internal_paging(next_link=None, raw=False):
-
+ def prepare_request(next_link=None):
if not next_link:
# Construct URL
- url = '/subscriptions/{subscriptionId}/providers/microsoft.insights/webtests'
+ url = self.list.metadata['url']
path_format_arguments = {
- 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
}
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {}
- query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
else:
url = next_link
@@ -396,7 +404,7 @@ def internal_paging(next_link=None, raw=False):
# Construct headers
header_parameters = {}
- header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ header_parameters['Accept'] = 'application/json'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
@@ -405,9 +413,13 @@ def internal_paging(next_link=None, raw=False):
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
# Construct and send request
- request = self._client.get(url, query_parameters)
- response = self._client.send(
- request, header_parameters, stream=False, **operation_config)
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
if response.status_code not in [200]:
exp = CloudError(response)
@@ -417,11 +429,85 @@ def internal_paging(next_link=None, raw=False):
return response
# Deserialize response
- deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies)
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict)
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/webtests'}
+
+ def list_by_component(
+ self, component_name, resource_group_name, custom_headers=None, raw=False, **operation_config):
+ """Get all Application Insights web tests defined for the specified
+ component.
+
+ :param component_name: The name of the Application Insights component
+ resource.
+ :type component_name: str
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of WebTest
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WebTestPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.WebTest]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_component.metadata['url']
+ path_format_arguments = {
+ 'componentName': self._serialize.url("component_name", component_name, 'str'),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
if raw:
header_dict = {}
- client_raw_response = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict)
- return client_raw_response
+ deserialized = models.WebTestPaged(internal_paging, self._deserialize.dependencies, header_dict)
return deserialized
+ list_by_component.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{componentName}/webtests'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_work_item_configurations_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_work_item_configurations_operations.py
new file mode 100644
index 00000000000..c8dd5d0fc59
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_work_item_configurations_operations.py
@@ -0,0 +1,458 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class WorkItemConfigurationsOperations(object):
+ """WorkItemConfigurationsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2015-05-01"
+
+ self.config = config
+
+ def list(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Gets the list work item configurations that exist for the application.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of WorkItemConfiguration
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WorkItemConfigurationPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.WorkItemConfiguration]
+ :raises:
+ :class:`WorkItemConfigurationErrorException`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.WorkItemConfigurationErrorException(self._deserialize, response)
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.WorkItemConfigurationPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs'}
+
+ def create(
+ self, resource_group_name, resource_name, work_item_configuration_properties, custom_headers=None, raw=False, **operation_config):
+ """Create a work item configuration for an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param work_item_configuration_properties: Properties that need to be
+ specified to create a work item configuration of a Application
+ Insights component.
+ :type work_item_configuration_properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WorkItemCreateConfiguration
+ :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: WorkItemConfiguration or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WorkItemConfiguration
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.create.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(work_item_configuration_properties, 'WorkItemCreateConfiguration')
+
+ # 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]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('WorkItemConfiguration', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs'}
+
+ def get_default(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Gets default work item configurations that exist for the application.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: WorkItemConfiguration or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WorkItemConfiguration
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get_default.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('WorkItemConfiguration', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get_default.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/DefaultWorkItemConfig'}
+
+ def delete(
+ self, resource_group_name, resource_name, work_item_config_id, custom_headers=None, raw=False, **operation_config):
+ """Delete a work item configuration of an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param work_item_config_id: The unique work item configuration Id.
+ This can be either friendly name of connector as defined in connector
+ configuration
+ :type work_item_config_id: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'workItemConfigId': self._serialize.url("work_item_config_id", work_item_config_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}'}
+
+ def get_item(
+ self, resource_group_name, resource_name, work_item_config_id, custom_headers=None, raw=False, **operation_config):
+ """Gets specified work item configuration for an Application Insights
+ component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param work_item_config_id: The unique work item configuration Id.
+ This can be either friendly name of connector as defined in connector
+ configuration
+ :type work_item_config_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: WorkItemConfiguration or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WorkItemConfiguration
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get_item.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'workItemConfigId': self._serialize.url("work_item_config_id", work_item_config_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('WorkItemConfiguration', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}'}
+
+ def update_item(
+ self, resource_group_name, resource_name, work_item_config_id, work_item_configuration_properties, custom_headers=None, raw=False, **operation_config):
+ """Update a work item configuration for an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param work_item_config_id: The unique work item configuration Id.
+ This can be either friendly name of connector as defined in connector
+ configuration
+ :type work_item_config_id: str
+ :param work_item_configuration_properties: Properties that need to be
+ specified to update a work item configuration for this Application
+ Insights component.
+ :type work_item_configuration_properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WorkItemCreateConfiguration
+ :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: WorkItemConfiguration or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WorkItemConfiguration
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.update_item.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'workItemConfigId': self._serialize.url("work_item_config_id", work_item_config_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(work_item_configuration_properties, 'WorkItemCreateConfiguration')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('WorkItemConfiguration', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update_item.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/WorkItemConfigs/{workItemConfigId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_workbooks_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_workbooks_operations.py
new file mode 100644
index 00000000000..48aee77b9de
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/operations/_workbooks_operations.py
@@ -0,0 +1,382 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+
+from .. import models
+
+
+class WorkbooksOperations(object):
+ """WorkbooksOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2015-05-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2015-05-01"
+
+ self.config = config
+
+ def list_by_resource_group(
+ self, resource_group_name, category, tags=None, can_fetch_content=None, custom_headers=None, raw=False, **operation_config):
+ """Get all Workbooks defined within a specified resource group and
+ category.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param category: Category of workbook to return. Possible values
+ include: 'workbook', 'TSG', 'performance', 'retention'
+ :type category: str or
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.CategoryType
+ :param tags: Tags presents on each workbook returned.
+ :type tags: list[str]
+ :param can_fetch_content: Flag indicating whether or not to return the
+ full content for each applicable workbook. If false, only return
+ summary content for workbooks.
+ :type can_fetch_content: bool
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of Workbook
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.WorkbookPaged[~azure.mgmt.applicationinsights.v2015_05_01.models.Workbook]
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['category'] = self._serialize.query("category", category, 'str')
+ if tags is not None:
+ query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',')
+ if can_fetch_content is not None:
+ query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.WorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks'}
+
+ def get(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Get a single workbook by its resourceName.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: Workbook or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.applicationinsights.v2015_05_01.models.Workbook or
+ ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('Workbook', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
+
+ def delete(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Delete a workbook.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [201, 204]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
+
+ def create_or_update(
+ self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config):
+ """Create a new workbook.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param workbook_properties: Properties that need to be specified to
+ create a new workbook.
+ :type workbook_properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.Workbook
+ :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: Workbook or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.applicationinsights.v2015_05_01.models.Workbook or
+ ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(workbook_properties, 'Workbook')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('Workbook', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('Workbook', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
+
+ def update(
+ self, resource_group_name, resource_name, workbook_properties, custom_headers=None, raw=False, **operation_config):
+ """Updates a workbook that has already been added.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param workbook_properties: Properties that need to be specified to
+ create a new workbook.
+ :type workbook_properties:
+ ~azure.mgmt.applicationinsights.v2015_05_01.models.Workbook
+ :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: Workbook or ClientRawResponse if raw=true
+ :rtype: ~azure.mgmt.applicationinsights.v2015_05_01.models.Workbook or
+ ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(workbook_properties, 'Workbook')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('Workbook', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/version.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/version.py
new file mode 100644
index 00000000000..10f4c707bc5
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2015_05_01/version.py
@@ -0,0 +1,13 @@
+# 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 = "2015-05-01"
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/__init__.py
new file mode 100644
index 00000000000..298512941d9
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/__init__.py
@@ -0,0 +1,19 @@
+# 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 ._configuration import ApplicationInsightsManagementClientConfiguration
+from ._application_insights_management_client import ApplicationInsightsManagementClient
+__all__ = ['ApplicationInsightsManagementClient', 'ApplicationInsightsManagementClientConfiguration']
+
+from .version import VERSION
+
+__version__ = VERSION
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/_application_insights_management_client.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/_application_insights_management_client.py
new file mode 100644
index 00000000000..46cf6e1043c
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/_application_insights_management_client.py
@@ -0,0 +1,64 @@
+# 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 Serializer, Deserializer
+
+from ._configuration import ApplicationInsightsManagementClientConfiguration
+from .operations import EASubscriptionMigrateToNewPricingModelOperations
+from .operations import EASubscriptionRollbackToLegacyPricingModelOperations
+from .operations import EASubscriptionListMigrationDateOperations
+from .operations import ComponentCurrentPricingPlanOperations
+from . import models
+
+
+class ApplicationInsightsManagementClient(SDKClient):
+ """Composite Swagger for Application Insights Management Client
+
+ :ivar config: Configuration for client.
+ :vartype config: ApplicationInsightsManagementClientConfiguration
+
+ :ivar ea_subscription_migrate_to_new_pricing_model: EASubscriptionMigrateToNewPricingModel operations
+ :vartype ea_subscription_migrate_to_new_pricing_model: azure.mgmt.applicationinsights.v2017_10_01.operations.EASubscriptionMigrateToNewPricingModelOperations
+ :ivar ea_subscription_rollback_to_legacy_pricing_model: EASubscriptionRollbackToLegacyPricingModel operations
+ :vartype ea_subscription_rollback_to_legacy_pricing_model: azure.mgmt.applicationinsights.v2017_10_01.operations.EASubscriptionRollbackToLegacyPricingModelOperations
+ :ivar ea_subscription_list_migration_date: EASubscriptionListMigrationDate operations
+ :vartype ea_subscription_list_migration_date: azure.mgmt.applicationinsights.v2017_10_01.operations.EASubscriptionListMigrationDateOperations
+ :ivar component_current_pricing_plan: ComponentCurrentPricingPlan operations
+ :vartype component_current_pricing_plan: azure.mgmt.applicationinsights.v2017_10_01.operations.ComponentCurrentPricingPlanOperations
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
+ super(ApplicationInsightsManagementClient, 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 = '2017-10-01'
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+
+ self.ea_subscription_migrate_to_new_pricing_model = EASubscriptionMigrateToNewPricingModelOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.ea_subscription_rollback_to_legacy_pricing_model = EASubscriptionRollbackToLegacyPricingModelOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.ea_subscription_list_migration_date = EASubscriptionListMigrationDateOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.component_current_pricing_plan = ComponentCurrentPricingPlanOperations(
+ self._client, self.config, self._serialize, self._deserialize)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/_configuration.py
new file mode 100644
index 00000000000..6c855295a4b
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/_configuration.py
@@ -0,0 +1,48 @@
+# 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 msrestazure import AzureConfiguration
+
+from .version import VERSION
+
+
+class ApplicationInsightsManagementClientConfiguration(AzureConfiguration):
+ """Configuration for ApplicationInsightsManagementClient
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ if credentials is None:
+ raise ValueError("Parameter 'credentials' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if not base_url:
+ base_url = 'https://management.azure.com'
+
+ super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url)
+
+ # Starting Autorest.Python 4.0.64, make connection pool activated by default
+ self.keep_alive = True
+
+ self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION))
+ self.add_user_agent('Azure-SDK-For-Python')
+
+ self.credentials = credentials
+ self.subscription_id = subscription_id
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/models/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/models/__init__.py
new file mode 100644
index 00000000000..1a0bb9c4519
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/models/__init__.py
@@ -0,0 +1,25 @@
+# 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 ._models_py3 import ApplicationInsightsComponentPricingPlan
+ from ._models_py3 import EASubscriptionMigrationDate
+ from ._models_py3 import Resource
+except (SyntaxError, ImportError):
+ from ._models import ApplicationInsightsComponentPricingPlan
+ from ._models import EASubscriptionMigrationDate
+ from ._models import Resource
+
+__all__ = [
+ 'ApplicationInsightsComponentPricingPlan',
+ 'EASubscriptionMigrationDate',
+ 'Resource',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/models/_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/models/_models.py
new file mode 100644
index 00000000000..49bdf7ba204
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/models/_models.py
@@ -0,0 +1,191 @@
+# 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 Resource(Model):
+ """An Azure resource.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id.
+ :vartype id: str
+ :ivar name: Azure resource name.
+ :vartype name: str
+ :ivar type: Azure resource type.
+ :vartype type: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(Resource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+
+
+class ApplicationInsightsComponentPricingPlan(Resource):
+ """An Application Insights component pricing plan.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id.
+ :vartype id: str
+ :ivar name: Azure resource name.
+ :vartype name: str
+ :ivar type: Azure resource type.
+ :vartype type: str
+ :param plan_type: Pricing Plan Type Name.
+ :type plan_type: str
+ :param cap: Daily data volume cap in GB.
+ :type cap: float
+ :ivar reset_hour: Daily data volume cap UTC reset hour.
+ :vartype reset_hour: int
+ :param warning_threshold: Reserved, not used for now.
+ :type warning_threshold: int
+ :param stop_send_notification_when_hit_threshold: Reserved, not used for
+ now.
+ :type stop_send_notification_when_hit_threshold: bool
+ :param stop_send_notification_when_hit_cap: Do not send a notification
+ email when the daily data volume cap is met.
+ :type stop_send_notification_when_hit_cap: bool
+ :ivar max_history_cap: Maximum daily data volume cap that the user can set
+ for this component.
+ :vartype max_history_cap: float
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'reset_hour': {'readonly': True},
+ 'max_history_cap': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'plan_type': {'key': 'properties.planType', 'type': 'str'},
+ 'cap': {'key': 'properties.cap', 'type': 'float'},
+ 'reset_hour': {'key': 'properties.resetHour', 'type': 'int'},
+ 'warning_threshold': {'key': 'properties.warningThreshold', 'type': 'int'},
+ 'stop_send_notification_when_hit_threshold': {'key': 'properties.stopSendNotificationWhenHitThreshold', 'type': 'bool'},
+ 'stop_send_notification_when_hit_cap': {'key': 'properties.stopSendNotificationWhenHitCap', 'type': 'bool'},
+ 'max_history_cap': {'key': 'properties.maxHistoryCap', 'type': 'float'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentPricingPlan, self).__init__(**kwargs)
+ self.plan_type = kwargs.get('plan_type', None)
+ self.cap = kwargs.get('cap', None)
+ self.reset_hour = None
+ self.warning_threshold = kwargs.get('warning_threshold', None)
+ self.stop_send_notification_when_hit_threshold = kwargs.get('stop_send_notification_when_hit_threshold', None)
+ self.stop_send_notification_when_hit_cap = kwargs.get('stop_send_notification_when_hit_cap', None)
+ self.max_history_cap = None
+
+
+class CloudError(Model):
+ """An error response from the Batch service.
+
+ :param error: Cloud error body.
+ :type error:
+ ~azure.mgmt.applicationinsights.v2017_10_01.models.CloudErrorBody
+ """
+
+ _attribute_map = {
+ 'error': {'key': 'error', 'type': 'CloudErrorBody'},
+ }
+
+ def __init__(self, **kwargs):
+ super(CloudError, self).__init__(**kwargs)
+ self.error = kwargs.get('error', None)
+
+
+class CloudErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'CloudError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args)
+
+
+class CloudErrorBody(Model):
+ """An error response from the Batch service.
+
+ :param code: An identifier for the error. Codes are invariant and are
+ intended to be consumed programmatically.
+ :type code: str
+ :param message: A message describing the error, intended to be suitable
+ for display in a user interface.
+ :type message: str
+ :param target: The target of the particular error. For example, the name
+ of the property in error.
+ :type target: str
+ :param details: A list of additional details about the error.
+ :type details:
+ list[~azure.mgmt.applicationinsights.v2017_10_01.models.CloudErrorBody]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[CloudErrorBody]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(CloudErrorBody, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.target = kwargs.get('target', None)
+ self.details = kwargs.get('details', None)
+
+
+class EASubscriptionMigrationDate(Model):
+ """Subscription migrate date information properties.
+
+ :param is_grand_fatherable_subscription: Is subscription in the grand
+ fatherable subscription list.
+ :type is_grand_fatherable_subscription: bool
+ :param opted_in_date: Time to start using new pricing model.
+ :type opted_in_date: datetime
+ """
+
+ _attribute_map = {
+ 'is_grand_fatherable_subscription': {'key': 'isGrandFatherableSubscription', 'type': 'bool'},
+ 'opted_in_date': {'key': 'optedInDate', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, **kwargs):
+ super(EASubscriptionMigrationDate, self).__init__(**kwargs)
+ self.is_grand_fatherable_subscription = kwargs.get('is_grand_fatherable_subscription', None)
+ self.opted_in_date = kwargs.get('opted_in_date', None)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/models/_models_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/models/_models_py3.py
new file mode 100644
index 00000000000..74b7642069d
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/models/_models_py3.py
@@ -0,0 +1,191 @@
+# 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 Resource(Model):
+ """An Azure resource.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id.
+ :vartype id: str
+ :ivar name: Azure resource name.
+ :vartype name: str
+ :ivar type: Azure resource type.
+ :vartype type: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(Resource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+
+
+class ApplicationInsightsComponentPricingPlan(Resource):
+ """An Application Insights component pricing plan.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id.
+ :vartype id: str
+ :ivar name: Azure resource name.
+ :vartype name: str
+ :ivar type: Azure resource type.
+ :vartype type: str
+ :param plan_type: Pricing Plan Type Name.
+ :type plan_type: str
+ :param cap: Daily data volume cap in GB.
+ :type cap: float
+ :ivar reset_hour: Daily data volume cap UTC reset hour.
+ :vartype reset_hour: int
+ :param warning_threshold: Reserved, not used for now.
+ :type warning_threshold: int
+ :param stop_send_notification_when_hit_threshold: Reserved, not used for
+ now.
+ :type stop_send_notification_when_hit_threshold: bool
+ :param stop_send_notification_when_hit_cap: Do not send a notification
+ email when the daily data volume cap is met.
+ :type stop_send_notification_when_hit_cap: bool
+ :ivar max_history_cap: Maximum daily data volume cap that the user can set
+ for this component.
+ :vartype max_history_cap: float
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'reset_hour': {'readonly': True},
+ 'max_history_cap': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'plan_type': {'key': 'properties.planType', 'type': 'str'},
+ 'cap': {'key': 'properties.cap', 'type': 'float'},
+ 'reset_hour': {'key': 'properties.resetHour', 'type': 'int'},
+ 'warning_threshold': {'key': 'properties.warningThreshold', 'type': 'int'},
+ 'stop_send_notification_when_hit_threshold': {'key': 'properties.stopSendNotificationWhenHitThreshold', 'type': 'bool'},
+ 'stop_send_notification_when_hit_cap': {'key': 'properties.stopSendNotificationWhenHitCap', 'type': 'bool'},
+ 'max_history_cap': {'key': 'properties.maxHistoryCap', 'type': 'float'},
+ }
+
+ def __init__(self, *, plan_type: str=None, cap: float=None, warning_threshold: int=None, stop_send_notification_when_hit_threshold: bool=None, stop_send_notification_when_hit_cap: bool=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentPricingPlan, self).__init__(**kwargs)
+ self.plan_type = plan_type
+ self.cap = cap
+ self.reset_hour = None
+ self.warning_threshold = warning_threshold
+ self.stop_send_notification_when_hit_threshold = stop_send_notification_when_hit_threshold
+ self.stop_send_notification_when_hit_cap = stop_send_notification_when_hit_cap
+ self.max_history_cap = None
+
+
+class CloudError(Model):
+ """An error response from the Batch service.
+
+ :param error: Cloud error body.
+ :type error:
+ ~azure.mgmt.applicationinsights.v2017_10_01.models.CloudErrorBody
+ """
+
+ _attribute_map = {
+ 'error': {'key': 'error', 'type': 'CloudErrorBody'},
+ }
+
+ def __init__(self, *, error=None, **kwargs) -> None:
+ super(CloudError, self).__init__(**kwargs)
+ self.error = error
+
+
+class CloudErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'CloudError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(CloudErrorException, self).__init__(deserialize, response, 'CloudError', *args)
+
+
+class CloudErrorBody(Model):
+ """An error response from the Batch service.
+
+ :param code: An identifier for the error. Codes are invariant and are
+ intended to be consumed programmatically.
+ :type code: str
+ :param message: A message describing the error, intended to be suitable
+ for display in a user interface.
+ :type message: str
+ :param target: The target of the particular error. For example, the name
+ of the property in error.
+ :type target: str
+ :param details: A list of additional details about the error.
+ :type details:
+ list[~azure.mgmt.applicationinsights.v2017_10_01.models.CloudErrorBody]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[CloudErrorBody]'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, target: str=None, details=None, **kwargs) -> None:
+ super(CloudErrorBody, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.target = target
+ self.details = details
+
+
+class EASubscriptionMigrationDate(Model):
+ """Subscription migrate date information properties.
+
+ :param is_grand_fatherable_subscription: Is subscription in the grand
+ fatherable subscription list.
+ :type is_grand_fatherable_subscription: bool
+ :param opted_in_date: Time to start using new pricing model.
+ :type opted_in_date: datetime
+ """
+
+ _attribute_map = {
+ 'is_grand_fatherable_subscription': {'key': 'isGrandFatherableSubscription', 'type': 'bool'},
+ 'opted_in_date': {'key': 'optedInDate', 'type': 'iso-8601'},
+ }
+
+ def __init__(self, *, is_grand_fatherable_subscription: bool=None, opted_in_date=None, **kwargs) -> None:
+ super(EASubscriptionMigrationDate, self).__init__(**kwargs)
+ self.is_grand_fatherable_subscription = is_grand_fatherable_subscription
+ self.opted_in_date = opted_in_date
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/__init__.py
new file mode 100644
index 00000000000..c4fd7484266
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/__init__.py
@@ -0,0 +1,22 @@
+# 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 ._ea_subscription_migrate_to_new_pricing_model_operations import EASubscriptionMigrateToNewPricingModelOperations
+from ._ea_subscription_rollback_to_legacy_pricing_model_operations import EASubscriptionRollbackToLegacyPricingModelOperations
+from ._ea_subscription_list_migration_date_operations import EASubscriptionListMigrationDateOperations
+from ._component_current_pricing_plan_operations import ComponentCurrentPricingPlanOperations
+
+__all__ = [
+ 'EASubscriptionMigrateToNewPricingModelOperations',
+ 'EASubscriptionRollbackToLegacyPricingModelOperations',
+ 'EASubscriptionListMigrationDateOperations',
+ 'ComponentCurrentPricingPlanOperations',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_component_current_pricing_plan_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_component_current_pricing_plan_operations.py
new file mode 100644
index 00000000000..0ad252ac270
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_component_current_pricing_plan_operations.py
@@ -0,0 +1,252 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class ComponentCurrentPricingPlanOperations(object):
+ """ComponentCurrentPricingPlanOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2017-10-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2017-10-01"
+
+ self.config = config
+
+ def get(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Returns the current pricing plan setting for an Application Insights
+ component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentPricingPlan or ClientRawResponse
+ if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2017_10_01.models.ApplicationInsightsComponentPricingPlan
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentPricingPlan', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/pricingPlans/current'}
+
+ def create_and_update(
+ self, resource_group_name, resource_name, pricing_plan_properties, custom_headers=None, raw=False, **operation_config):
+ """Replace current pricing plan for an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param pricing_plan_properties: Properties that need to be specified
+ to update current pricing plan for an Application Insights component.
+ :type pricing_plan_properties:
+ ~azure.mgmt.applicationinsights.v2017_10_01.models.ApplicationInsightsComponentPricingPlan
+ :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: ApplicationInsightsComponentPricingPlan or ClientRawResponse
+ if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2017_10_01.models.ApplicationInsightsComponentPricingPlan
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.create_and_update.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(pricing_plan_properties, 'ApplicationInsightsComponentPricingPlan')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentPricingPlan', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create_and_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/pricingPlans/current'}
+
+ def update(
+ self, resource_group_name, resource_name, pricing_plan_properties, custom_headers=None, raw=False, **operation_config):
+ """Update current pricing plan for an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param pricing_plan_properties: Properties that need to be specified
+ to update current pricing plan for an Application Insights component.
+ :type pricing_plan_properties:
+ ~azure.mgmt.applicationinsights.v2017_10_01.models.ApplicationInsightsComponentPricingPlan
+ :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: ApplicationInsightsComponentPricingPlan or ClientRawResponse
+ if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2017_10_01.models.ApplicationInsightsComponentPricingPlan
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(pricing_plan_properties, 'ApplicationInsightsComponentPricingPlan')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentPricingPlan', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{resourceName}/pricingPlans/current'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_ea_subscription_list_migration_date_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_ea_subscription_list_migration_date_operations.py
new file mode 100644
index 00000000000..c67b3c20655
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_ea_subscription_list_migration_date_operations.py
@@ -0,0 +1,96 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class EASubscriptionListMigrationDateOperations(object):
+ """EASubscriptionListMigrationDateOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2017-10-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2017-10-01"
+
+ self.config = config
+
+ def post(
+ self, custom_headers=None, raw=False, **operation_config):
+ """list date to migrate to new pricing model.
+
+ :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: EASubscriptionMigrationDate or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2017_10_01.models.EASubscriptionMigrationDate
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.post.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('EASubscriptionMigrationDate', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ post.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/listMigrationdate'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_ea_subscription_migrate_to_new_pricing_model_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_ea_subscription_migrate_to_new_pricing_model_operations.py
new file mode 100644
index 00000000000..47dd725572d
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_ea_subscription_migrate_to_new_pricing_model_operations.py
@@ -0,0 +1,87 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class EASubscriptionMigrateToNewPricingModelOperations(object):
+ """EASubscriptionMigrateToNewPricingModelOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2017-10-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2017-10-01"
+
+ self.config = config
+
+ def post(
+ self, custom_headers=None, raw=False, **operation_config):
+ """Enterprise Agreement Customer opted to use new pricing model.
+
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.post.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ post.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/migrateToNewPricingModel'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_ea_subscription_rollback_to_legacy_pricing_model_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_ea_subscription_rollback_to_legacy_pricing_model_operations.py
new file mode 100644
index 00000000000..e4c7118bedd
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/operations/_ea_subscription_rollback_to_legacy_pricing_model_operations.py
@@ -0,0 +1,87 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class EASubscriptionRollbackToLegacyPricingModelOperations(object):
+ """EASubscriptionRollbackToLegacyPricingModelOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2017-10-01".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2017-10-01"
+
+ self.config = config
+
+ def post(
+ self, custom_headers=None, raw=False, **operation_config):
+ """Enterprise Agreement Customer roll back to use legacy pricing model.
+
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.post.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ post.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/rollbackToLegacyPricingModel'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/version.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/version.py
new file mode 100644
index 00000000000..6fd4531cf9a
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2017_10_01/version.py
@@ -0,0 +1,13 @@
+# 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 = "2017-10-01"
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/__init__.py
new file mode 100644
index 00000000000..298512941d9
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/__init__.py
@@ -0,0 +1,19 @@
+# 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 ._configuration import ApplicationInsightsManagementClientConfiguration
+from ._application_insights_management_client import ApplicationInsightsManagementClient
+__all__ = ['ApplicationInsightsManagementClient', 'ApplicationInsightsManagementClientConfiguration']
+
+from .version import VERSION
+
+__version__ = VERSION
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/_application_insights_management_client.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/_application_insights_management_client.py
new file mode 100644
index 00000000000..d98837e38c0
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/_application_insights_management_client.py
@@ -0,0 +1,54 @@
+# 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 Serializer, Deserializer
+
+from ._configuration import ApplicationInsightsManagementClientConfiguration
+from .operations import ProactiveDetectionConfigurationsOperations
+from .operations import ComponentsOperations
+from . import models
+
+
+class ApplicationInsightsManagementClient(SDKClient):
+ """Composite Swagger for Application Insights Management Client
+
+ :ivar config: Configuration for client.
+ :vartype config: ApplicationInsightsManagementClientConfiguration
+
+ :ivar proactive_detection_configurations: ProactiveDetectionConfigurations operations
+ :vartype proactive_detection_configurations: azure.mgmt.applicationinsights.v2018_05_01_preview.operations.ProactiveDetectionConfigurationsOperations
+ :ivar components: Components operations
+ :vartype components: azure.mgmt.applicationinsights.v2018_05_01_preview.operations.ComponentsOperations
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
+ super(ApplicationInsightsManagementClient, 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 = '2018-05-01-preview'
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+
+ self.proactive_detection_configurations = ProactiveDetectionConfigurationsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.components = ComponentsOperations(
+ self._client, self.config, self._serialize, self._deserialize)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/_configuration.py
new file mode 100644
index 00000000000..6c855295a4b
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/_configuration.py
@@ -0,0 +1,48 @@
+# 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 msrestazure import AzureConfiguration
+
+from .version import VERSION
+
+
+class ApplicationInsightsManagementClientConfiguration(AzureConfiguration):
+ """Configuration for ApplicationInsightsManagementClient
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ if credentials is None:
+ raise ValueError("Parameter 'credentials' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if not base_url:
+ base_url = 'https://management.azure.com'
+
+ super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url)
+
+ # Starting Autorest.Python 4.0.64, make connection pool activated by default
+ self.keep_alive = True
+
+ self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION))
+ self.add_user_agent('Azure-SDK-For-Python')
+
+ self.credentials = credentials
+ self.subscription_id = subscription_id
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/__init__.py
new file mode 100644
index 00000000000..ba5030f7471
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/__init__.py
@@ -0,0 +1,60 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+try:
+ from ._models_py3 import ApplicationInsightsComponent
+ from ._models_py3 import ApplicationInsightsComponentProactiveDetectionConfiguration
+ from ._models_py3 import ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions
+ from ._models_py3 import ComponentPurgeBody
+ from ._models_py3 import ComponentPurgeBodyFilters
+ from ._models_py3 import ComponentPurgeResponse
+ from ._models_py3 import ComponentPurgeStatusResponse
+ from ._models_py3 import ComponentsResource
+ from ._models_py3 import PrivateLinkScopedResource
+ from ._models_py3 import TagsResource
+except (SyntaxError, ImportError):
+ from ._models import ApplicationInsightsComponent
+ from ._models import ApplicationInsightsComponentProactiveDetectionConfiguration
+ from ._models import ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions
+ from ._models import ComponentPurgeBody
+ from ._models import ComponentPurgeBodyFilters
+ from ._models import ComponentPurgeResponse
+ from ._models import ComponentPurgeStatusResponse
+ from ._models import ComponentsResource
+ from ._models import PrivateLinkScopedResource
+ from ._models import TagsResource
+from ._paged_models import ApplicationInsightsComponentPaged
+from ._application_insights_management_client_enums import (
+ ApplicationType,
+ FlowType,
+ RequestSource,
+ PublicNetworkAccessType,
+ PurgeState,
+)
+
+__all__ = [
+ 'ApplicationInsightsComponent',
+ 'ApplicationInsightsComponentProactiveDetectionConfiguration',
+ 'ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions',
+ 'ComponentPurgeBody',
+ 'ComponentPurgeBodyFilters',
+ 'ComponentPurgeResponse',
+ 'ComponentPurgeStatusResponse',
+ 'ComponentsResource',
+ 'PrivateLinkScopedResource',
+ 'TagsResource',
+ 'ApplicationInsightsComponentPaged',
+ 'ApplicationType',
+ 'FlowType',
+ 'RequestSource',
+ 'PublicNetworkAccessType',
+ 'PurgeState',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_application_insights_management_client_enums.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_application_insights_management_client_enums.py
new file mode 100644
index 00000000000..cab8df5318d
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_application_insights_management_client_enums.py
@@ -0,0 +1,40 @@
+# 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 ApplicationType(str, Enum):
+
+ web = "web"
+ other = "other"
+
+
+class FlowType(str, Enum):
+
+ bluefield = "Bluefield"
+
+
+class RequestSource(str, Enum):
+
+ rest = "rest"
+
+
+class PublicNetworkAccessType(str, Enum):
+
+ enabled = "Enabled" #: Enables connectivity to Application Insights through public DNS.
+ disabled = "Disabled" #: Disables public connectivity to Application Insights through public DNS.
+
+
+class PurgeState(str, Enum):
+
+ pending = "pending"
+ completed = "completed"
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_models.py
new file mode 100644
index 00000000000..7d95273618e
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_models.py
@@ -0,0 +1,489 @@
+# 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 ComponentsResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentsResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
+
+
+class ApplicationInsightsComponent(ComponentsResource):
+ """An Application Insights component definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param kind: Required. The kind of application that this component refers
+ to, used to customize UI. This value is a freeform string, values should
+ typically be one of the following: web, ios, other, store, java, phone.
+ :type kind: str
+ :ivar application_id: The unique ID of your application. This field
+ mirrors the 'Name' field and cannot be changed.
+ :vartype application_id: str
+ :ivar app_id: Application Insights Unique ID for your Application.
+ :vartype app_id: str
+ :param application_type: Required. Type of application being monitored.
+ Possible values include: 'web', 'other'. Default value: "web" .
+ :type application_type: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationType
+ :param flow_type: Used by the Application Insights system to determine
+ what kind of flow this component was created by. This is to be set to
+ 'Bluefield' when creating/updating a component via the REST API. Possible
+ values include: 'Bluefield'. Default value: "Bluefield" .
+ :type flow_type: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.FlowType
+ :param request_source: Describes what tool created this Application
+ Insights component. Customers using this API should set this to the
+ default 'rest'. Possible values include: 'rest'. Default value: "rest" .
+ :type request_source: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.RequestSource
+ :ivar instrumentation_key: Application Insights Instrumentation key. A
+ read-only value that applications can use to identify the destination for
+ all telemetry sent to Azure Application Insights. This value will be
+ supplied upon construction of each new Application Insights component.
+ :vartype instrumentation_key: str
+ :ivar creation_date: Creation Date for the Application Insights component,
+ in ISO 8601 format.
+ :vartype creation_date: datetime
+ :ivar tenant_id: Azure Tenant Id.
+ :vartype tenant_id: str
+ :param hockey_app_id: The unique application ID created when a new
+ application is added to HockeyApp, used for communications with HockeyApp.
+ :type hockey_app_id: str
+ :ivar hockey_app_token: Token used to authenticate communications with
+ between Application Insights and HockeyApp.
+ :vartype hockey_app_token: str
+ :ivar provisioning_state: Current state of this component: whether or not
+ is has been provisioned within the resource group it is defined. Users
+ cannot change this value but are able to read from it. Values will include
+ Succeeded, Deploying, Canceled, and Failed.
+ :vartype provisioning_state: str
+ :param sampling_percentage: Percentage of the data produced by the
+ application being monitored that is being sampled for Application Insights
+ telemetry.
+ :type sampling_percentage: float
+ :ivar connection_string: Application Insights component connection string.
+ :vartype connection_string: str
+ :param retention_in_days: Retention period in days. Default value: 90 .
+ :type retention_in_days: int
+ :param disable_ip_masking: Disable IP masking.
+ :type disable_ip_masking: bool
+ :param immediate_purge_data_on30_days: Purge data immediately after 30
+ days.
+ :type immediate_purge_data_on30_days: bool
+ :ivar private_link_scoped_resources: List of linked private link scope
+ resources.
+ :vartype private_link_scoped_resources:
+ list[~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PrivateLinkScopedResource]
+ :param public_network_access_for_ingestion: The network access type for
+ accessing Application Insights ingestion. Possible values include:
+ 'Enabled', 'Disabled'. Default value: "Enabled" .
+ :type public_network_access_for_ingestion: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PublicNetworkAccessType
+ :param public_network_access_for_query: The network access type for
+ accessing Application Insights query. Possible values include: 'Enabled',
+ 'Disabled'. Default value: "Enabled" .
+ :type public_network_access_for_query: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PublicNetworkAccessType
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'kind': {'required': True},
+ 'application_id': {'readonly': True},
+ 'app_id': {'readonly': True},
+ 'application_type': {'required': True},
+ 'instrumentation_key': {'readonly': True},
+ 'creation_date': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'hockey_app_token': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'connection_string': {'readonly': True},
+ 'private_link_scoped_resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'application_id': {'key': 'properties.ApplicationId', 'type': 'str'},
+ 'app_id': {'key': 'properties.AppId', 'type': 'str'},
+ 'application_type': {'key': 'properties.Application_Type', 'type': 'str'},
+ 'flow_type': {'key': 'properties.Flow_Type', 'type': 'str'},
+ 'request_source': {'key': 'properties.Request_Source', 'type': 'str'},
+ 'instrumentation_key': {'key': 'properties.InstrumentationKey', 'type': 'str'},
+ 'creation_date': {'key': 'properties.CreationDate', 'type': 'iso-8601'},
+ 'tenant_id': {'key': 'properties.TenantId', 'type': 'str'},
+ 'hockey_app_id': {'key': 'properties.HockeyAppId', 'type': 'str'},
+ 'hockey_app_token': {'key': 'properties.HockeyAppToken', 'type': 'str'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'sampling_percentage': {'key': 'properties.SamplingPercentage', 'type': 'float'},
+ 'connection_string': {'key': 'properties.ConnectionString', 'type': 'str'},
+ 'retention_in_days': {'key': 'properties.RetentionInDays', 'type': 'int'},
+ 'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'},
+ 'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'},
+ 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'},
+ 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'},
+ 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponent, self).__init__(**kwargs)
+ self.kind = kwargs.get('kind', None)
+ self.application_id = None
+ self.app_id = None
+ self.application_type = kwargs.get('application_type', "web")
+ self.flow_type = kwargs.get('flow_type', "Bluefield")
+ self.request_source = kwargs.get('request_source', "rest")
+ self.instrumentation_key = None
+ self.creation_date = None
+ self.tenant_id = None
+ self.hockey_app_id = kwargs.get('hockey_app_id', None)
+ self.hockey_app_token = None
+ self.provisioning_state = None
+ self.sampling_percentage = kwargs.get('sampling_percentage', None)
+ self.connection_string = None
+ self.retention_in_days = kwargs.get('retention_in_days', 90)
+ self.disable_ip_masking = kwargs.get('disable_ip_masking', None)
+ self.immediate_purge_data_on30_days = kwargs.get('immediate_purge_data_on30_days', None)
+ self.private_link_scoped_resources = None
+ self.public_network_access_for_ingestion = kwargs.get('public_network_access_for_ingestion', "Enabled")
+ self.public_network_access_for_query = kwargs.get('public_network_access_for_query', "Enabled")
+
+
+class ApplicationInsightsComponentProactiveDetectionConfiguration(Model):
+ """A ProactiveDetection configuration definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :param name: Azure resource name
+ :type name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Resource location
+ :type location: str
+ :ivar name1: The rule name
+ :vartype name1: str
+ :param enabled: A flag that indicates whether this rule is enabled by the
+ user
+ :type enabled: bool
+ :param send_emails_to_subscription_owners: A flag that indicated whether
+ notifications on this rule should be sent to subscription owners
+ :type send_emails_to_subscription_owners: bool
+ :param custom_emails: Custom email addresses for this rule notifications
+ :type custom_emails: list[str]
+ :ivar last_updated_time: The last time this rule was updated
+ :vartype last_updated_time: str
+ :param rule_definitions: Static definitions of the ProactiveDetection
+ configuration rule (same values for all components).
+ :type rule_definitions:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'type': {'readonly': True},
+ 'name1': {'readonly': True},
+ 'last_updated_time': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'name1': {'key': 'properties.Name', 'type': 'str'},
+ 'enabled': {'key': 'properties.Enabled', 'type': 'bool'},
+ 'send_emails_to_subscription_owners': {'key': 'properties.SendEmailsToSubscriptionOwners', 'type': 'bool'},
+ 'custom_emails': {'key': 'properties.CustomEmails', 'type': '[str]'},
+ 'last_updated_time': {'key': 'properties.LastUpdatedTime', 'type': 'str'},
+ 'rule_definitions': {'key': 'properties.RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__(**kwargs)
+ self.id = None
+ self.name = kwargs.get('name', None)
+ self.type = None
+ self.location = kwargs.get('location', None)
+ self.name1 = None
+ self.enabled = kwargs.get('enabled', None)
+ self.send_emails_to_subscription_owners = kwargs.get('send_emails_to_subscription_owners', None)
+ self.custom_emails = kwargs.get('custom_emails', None)
+ self.last_updated_time = None
+ self.rule_definitions = kwargs.get('rule_definitions', None)
+
+
+class ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions(Model):
+ """Static definitions of the ProactiveDetection configuration rule (same
+ values for all components).
+
+ :param name: The rule name
+ :type name: str
+ :param display_name: The rule name as it is displayed in UI
+ :type display_name: str
+ :param description: The rule description
+ :type description: str
+ :param help_url: URL which displays additional info about the proactive
+ detection rule
+ :type help_url: str
+ :param is_hidden: A flag indicating whether the rule is hidden (from the
+ UI)
+ :type is_hidden: bool
+ :param is_enabled_by_default: A flag indicating whether the rule is
+ enabled by default
+ :type is_enabled_by_default: bool
+ :param is_in_preview: A flag indicating whether the rule is in preview
+ :type is_in_preview: bool
+ :param supports_email_notifications: A flag indicating whether email
+ notifications are supported for detections for this rule
+ :type supports_email_notifications: bool
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'display_name': {'key': 'DisplayName', 'type': 'str'},
+ 'description': {'key': 'Description', 'type': 'str'},
+ 'help_url': {'key': 'HelpUrl', 'type': 'str'},
+ 'is_hidden': {'key': 'IsHidden', 'type': 'bool'},
+ 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'},
+ 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'},
+ 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.display_name = kwargs.get('display_name', None)
+ self.description = kwargs.get('description', None)
+ self.help_url = kwargs.get('help_url', None)
+ self.is_hidden = kwargs.get('is_hidden', None)
+ self.is_enabled_by_default = kwargs.get('is_enabled_by_default', None)
+ self.is_in_preview = kwargs.get('is_in_preview', None)
+ self.supports_email_notifications = kwargs.get('supports_email_notifications', None)
+
+
+class CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ComponentPurgeBody(Model):
+ """Describes the body of a purge request for an App Insights component.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param table: Required. Table from which to purge data.
+ :type table: str
+ :param filters: Required. The set of columns and filters (queries) to run
+ over them to purge the resulting data.
+ :type filters:
+ list[~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ComponentPurgeBodyFilters]
+ """
+
+ _validation = {
+ 'table': {'required': True},
+ 'filters': {'required': True},
+ }
+
+ _attribute_map = {
+ 'table': {'key': 'table', 'type': 'str'},
+ 'filters': {'key': 'filters', 'type': '[ComponentPurgeBodyFilters]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentPurgeBody, self).__init__(**kwargs)
+ self.table = kwargs.get('table', None)
+ self.filters = kwargs.get('filters', None)
+
+
+class ComponentPurgeBodyFilters(Model):
+ """User-defined filters to return data which will be purged from the table.
+
+ :param column: The column of the table over which the given query should
+ run
+ :type column: str
+ :param operator: A query operator to evaluate over the provided column and
+ value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between,
+ and have the same behavior as they would in a KQL query.
+ :type operator: str
+ :param value: the value for the operator to function over. This can be a
+ number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of
+ values.
+ :type value: object
+ :param key: When filtering over custom dimensions, this key will be used
+ as the name of the custom dimension.
+ :type key: str
+ """
+
+ _attribute_map = {
+ 'column': {'key': 'column', 'type': 'str'},
+ 'operator': {'key': 'operator', 'type': 'str'},
+ 'value': {'key': 'value', 'type': 'object'},
+ 'key': {'key': 'key', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentPurgeBodyFilters, self).__init__(**kwargs)
+ self.column = kwargs.get('column', None)
+ self.operator = kwargs.get('operator', None)
+ self.value = kwargs.get('value', None)
+ self.key = kwargs.get('key', None)
+
+
+class ComponentPurgeResponse(Model):
+ """Response containing operationId for a specific purge action.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param operation_id: Required. Id to use when querying for status for a
+ particular purge operation.
+ :type operation_id: str
+ """
+
+ _validation = {
+ 'operation_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'operation_id': {'key': 'operationId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentPurgeResponse, self).__init__(**kwargs)
+ self.operation_id = kwargs.get('operation_id', None)
+
+
+class ComponentPurgeStatusResponse(Model):
+ """Response containing status for a specific purge operation.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param status: Required. Status of the operation represented by the
+ requested Id. Possible values include: 'pending', 'completed'
+ :type status: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PurgeState
+ """
+
+ _validation = {
+ 'status': {'required': True},
+ }
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ComponentPurgeStatusResponse, self).__init__(**kwargs)
+ self.status = kwargs.get('status', None)
+
+
+class PrivateLinkScopedResource(Model):
+ """The private link scope resource reference.
+
+ :param resource_id: The full resource Id of the private link scope
+ resource.
+ :type resource_id: str
+ :param scope_id: The private link scope unique Identifier.
+ :type scope_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'ResourceId', 'type': 'str'},
+ 'scope_id': {'key': 'ScopeId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(PrivateLinkScopedResource, self).__init__(**kwargs)
+ self.resource_id = kwargs.get('resource_id', None)
+ self.scope_id = kwargs.get('scope_id', None)
+
+
+class TagsResource(Model):
+ """A container holding only the Tags for a resource, allowing the user to
+ update the tags on a WebTest instance.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(TagsResource, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_models_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_models_py3.py
new file mode 100644
index 00000000000..ce015182f99
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_models_py3.py
@@ -0,0 +1,489 @@
+# 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 ComponentsResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, location: str, tags=None, **kwargs) -> None:
+ super(ComponentsResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = location
+ self.tags = tags
+
+
+class ApplicationInsightsComponent(ComponentsResource):
+ """An Application Insights component definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param kind: Required. The kind of application that this component refers
+ to, used to customize UI. This value is a freeform string, values should
+ typically be one of the following: web, ios, other, store, java, phone.
+ :type kind: str
+ :ivar application_id: The unique ID of your application. This field
+ mirrors the 'Name' field and cannot be changed.
+ :vartype application_id: str
+ :ivar app_id: Application Insights Unique ID for your Application.
+ :vartype app_id: str
+ :param application_type: Required. Type of application being monitored.
+ Possible values include: 'web', 'other'. Default value: "web" .
+ :type application_type: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationType
+ :param flow_type: Used by the Application Insights system to determine
+ what kind of flow this component was created by. This is to be set to
+ 'Bluefield' when creating/updating a component via the REST API. Possible
+ values include: 'Bluefield'. Default value: "Bluefield" .
+ :type flow_type: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.FlowType
+ :param request_source: Describes what tool created this Application
+ Insights component. Customers using this API should set this to the
+ default 'rest'. Possible values include: 'rest'. Default value: "rest" .
+ :type request_source: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.RequestSource
+ :ivar instrumentation_key: Application Insights Instrumentation key. A
+ read-only value that applications can use to identify the destination for
+ all telemetry sent to Azure Application Insights. This value will be
+ supplied upon construction of each new Application Insights component.
+ :vartype instrumentation_key: str
+ :ivar creation_date: Creation Date for the Application Insights component,
+ in ISO 8601 format.
+ :vartype creation_date: datetime
+ :ivar tenant_id: Azure Tenant Id.
+ :vartype tenant_id: str
+ :param hockey_app_id: The unique application ID created when a new
+ application is added to HockeyApp, used for communications with HockeyApp.
+ :type hockey_app_id: str
+ :ivar hockey_app_token: Token used to authenticate communications with
+ between Application Insights and HockeyApp.
+ :vartype hockey_app_token: str
+ :ivar provisioning_state: Current state of this component: whether or not
+ is has been provisioned within the resource group it is defined. Users
+ cannot change this value but are able to read from it. Values will include
+ Succeeded, Deploying, Canceled, and Failed.
+ :vartype provisioning_state: str
+ :param sampling_percentage: Percentage of the data produced by the
+ application being monitored that is being sampled for Application Insights
+ telemetry.
+ :type sampling_percentage: float
+ :ivar connection_string: Application Insights component connection string.
+ :vartype connection_string: str
+ :param retention_in_days: Retention period in days. Default value: 90 .
+ :type retention_in_days: int
+ :param disable_ip_masking: Disable IP masking.
+ :type disable_ip_masking: bool
+ :param immediate_purge_data_on30_days: Purge data immediately after 30
+ days.
+ :type immediate_purge_data_on30_days: bool
+ :ivar private_link_scoped_resources: List of linked private link scope
+ resources.
+ :vartype private_link_scoped_resources:
+ list[~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PrivateLinkScopedResource]
+ :param public_network_access_for_ingestion: The network access type for
+ accessing Application Insights ingestion. Possible values include:
+ 'Enabled', 'Disabled'. Default value: "Enabled" .
+ :type public_network_access_for_ingestion: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PublicNetworkAccessType
+ :param public_network_access_for_query: The network access type for
+ accessing Application Insights query. Possible values include: 'Enabled',
+ 'Disabled'. Default value: "Enabled" .
+ :type public_network_access_for_query: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PublicNetworkAccessType
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'kind': {'required': True},
+ 'application_id': {'readonly': True},
+ 'app_id': {'readonly': True},
+ 'application_type': {'required': True},
+ 'instrumentation_key': {'readonly': True},
+ 'creation_date': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ 'hockey_app_token': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ 'connection_string': {'readonly': True},
+ 'private_link_scoped_resources': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'application_id': {'key': 'properties.ApplicationId', 'type': 'str'},
+ 'app_id': {'key': 'properties.AppId', 'type': 'str'},
+ 'application_type': {'key': 'properties.Application_Type', 'type': 'str'},
+ 'flow_type': {'key': 'properties.Flow_Type', 'type': 'str'},
+ 'request_source': {'key': 'properties.Request_Source', 'type': 'str'},
+ 'instrumentation_key': {'key': 'properties.InstrumentationKey', 'type': 'str'},
+ 'creation_date': {'key': 'properties.CreationDate', 'type': 'iso-8601'},
+ 'tenant_id': {'key': 'properties.TenantId', 'type': 'str'},
+ 'hockey_app_id': {'key': 'properties.HockeyAppId', 'type': 'str'},
+ 'hockey_app_token': {'key': 'properties.HockeyAppToken', 'type': 'str'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ 'sampling_percentage': {'key': 'properties.SamplingPercentage', 'type': 'float'},
+ 'connection_string': {'key': 'properties.ConnectionString', 'type': 'str'},
+ 'retention_in_days': {'key': 'properties.RetentionInDays', 'type': 'int'},
+ 'disable_ip_masking': {'key': 'properties.DisableIpMasking', 'type': 'bool'},
+ 'immediate_purge_data_on30_days': {'key': 'properties.ImmediatePurgeDataOn30Days', 'type': 'bool'},
+ 'private_link_scoped_resources': {'key': 'properties.PrivateLinkScopedResources', 'type': '[PrivateLinkScopedResource]'},
+ 'public_network_access_for_ingestion': {'key': 'properties.publicNetworkAccessForIngestion', 'type': 'str'},
+ 'public_network_access_for_query': {'key': 'properties.publicNetworkAccessForQuery', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, kind: str, tags=None, application_type="web", flow_type="Bluefield", request_source="rest", hockey_app_id: str=None, sampling_percentage: float=None, retention_in_days: int=90, disable_ip_masking: bool=None, immediate_purge_data_on30_days: bool=None, public_network_access_for_ingestion="Enabled", public_network_access_for_query="Enabled", **kwargs) -> None:
+ super(ApplicationInsightsComponent, self).__init__(location=location, tags=tags, **kwargs)
+ self.kind = kind
+ self.application_id = None
+ self.app_id = None
+ self.application_type = application_type
+ self.flow_type = flow_type
+ self.request_source = request_source
+ self.instrumentation_key = None
+ self.creation_date = None
+ self.tenant_id = None
+ self.hockey_app_id = hockey_app_id
+ self.hockey_app_token = None
+ self.provisioning_state = None
+ self.sampling_percentage = sampling_percentage
+ self.connection_string = None
+ self.retention_in_days = retention_in_days
+ self.disable_ip_masking = disable_ip_masking
+ self.immediate_purge_data_on30_days = immediate_purge_data_on30_days
+ self.private_link_scoped_resources = None
+ self.public_network_access_for_ingestion = public_network_access_for_ingestion
+ self.public_network_access_for_query = public_network_access_for_query
+
+
+class ApplicationInsightsComponentProactiveDetectionConfiguration(Model):
+ """A ProactiveDetection configuration definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :param name: Azure resource name
+ :type name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Resource location
+ :type location: str
+ :ivar name1: The rule name
+ :vartype name1: str
+ :param enabled: A flag that indicates whether this rule is enabled by the
+ user
+ :type enabled: bool
+ :param send_emails_to_subscription_owners: A flag that indicated whether
+ notifications on this rule should be sent to subscription owners
+ :type send_emails_to_subscription_owners: bool
+ :param custom_emails: Custom email addresses for this rule notifications
+ :type custom_emails: list[str]
+ :ivar last_updated_time: The last time this rule was updated
+ :vartype last_updated_time: str
+ :param rule_definitions: Static definitions of the ProactiveDetection
+ configuration rule (same values for all components).
+ :type rule_definitions:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'type': {'readonly': True},
+ 'name1': {'readonly': True},
+ 'last_updated_time': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'name1': {'key': 'properties.Name', 'type': 'str'},
+ 'enabled': {'key': 'properties.Enabled', 'type': 'bool'},
+ 'send_emails_to_subscription_owners': {'key': 'properties.SendEmailsToSubscriptionOwners', 'type': 'bool'},
+ 'custom_emails': {'key': 'properties.CustomEmails', 'type': '[str]'},
+ 'last_updated_time': {'key': 'properties.LastUpdatedTime', 'type': 'str'},
+ 'rule_definitions': {'key': 'properties.RuleDefinitions', 'type': 'ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions'},
+ }
+
+ def __init__(self, *, name: str=None, location: str=None, enabled: bool=None, send_emails_to_subscription_owners: bool=None, custom_emails=None, rule_definitions=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentProactiveDetectionConfiguration, self).__init__(**kwargs)
+ self.id = None
+ self.name = name
+ self.type = None
+ self.location = location
+ self.name1 = None
+ self.enabled = enabled
+ self.send_emails_to_subscription_owners = send_emails_to_subscription_owners
+ self.custom_emails = custom_emails
+ self.last_updated_time = None
+ self.rule_definitions = rule_definitions
+
+
+class ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions(Model):
+ """Static definitions of the ProactiveDetection configuration rule (same
+ values for all components).
+
+ :param name: The rule name
+ :type name: str
+ :param display_name: The rule name as it is displayed in UI
+ :type display_name: str
+ :param description: The rule description
+ :type description: str
+ :param help_url: URL which displays additional info about the proactive
+ detection rule
+ :type help_url: str
+ :param is_hidden: A flag indicating whether the rule is hidden (from the
+ UI)
+ :type is_hidden: bool
+ :param is_enabled_by_default: A flag indicating whether the rule is
+ enabled by default
+ :type is_enabled_by_default: bool
+ :param is_in_preview: A flag indicating whether the rule is in preview
+ :type is_in_preview: bool
+ :param supports_email_notifications: A flag indicating whether email
+ notifications are supported for detections for this rule
+ :type supports_email_notifications: bool
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'Name', 'type': 'str'},
+ 'display_name': {'key': 'DisplayName', 'type': 'str'},
+ 'description': {'key': 'Description', 'type': 'str'},
+ 'help_url': {'key': 'HelpUrl', 'type': 'str'},
+ 'is_hidden': {'key': 'IsHidden', 'type': 'bool'},
+ 'is_enabled_by_default': {'key': 'IsEnabledByDefault', 'type': 'bool'},
+ 'is_in_preview': {'key': 'IsInPreview', 'type': 'bool'},
+ 'supports_email_notifications': {'key': 'SupportsEmailNotifications', 'type': 'bool'},
+ }
+
+ def __init__(self, *, name: str=None, display_name: str=None, description: str=None, help_url: str=None, is_hidden: bool=None, is_enabled_by_default: bool=None, is_in_preview: bool=None, supports_email_notifications: bool=None, **kwargs) -> None:
+ super(ApplicationInsightsComponentProactiveDetectionConfigurationPropertiesRuleDefinitions, self).__init__(**kwargs)
+ self.name = name
+ self.display_name = display_name
+ self.description = description
+ self.help_url = help_url
+ self.is_hidden = is_hidden
+ self.is_enabled_by_default = is_enabled_by_default
+ self.is_in_preview = is_in_preview
+ self.supports_email_notifications = supports_email_notifications
+
+
+class CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ComponentPurgeBody(Model):
+ """Describes the body of a purge request for an App Insights component.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param table: Required. Table from which to purge data.
+ :type table: str
+ :param filters: Required. The set of columns and filters (queries) to run
+ over them to purge the resulting data.
+ :type filters:
+ list[~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ComponentPurgeBodyFilters]
+ """
+
+ _validation = {
+ 'table': {'required': True},
+ 'filters': {'required': True},
+ }
+
+ _attribute_map = {
+ 'table': {'key': 'table', 'type': 'str'},
+ 'filters': {'key': 'filters', 'type': '[ComponentPurgeBodyFilters]'},
+ }
+
+ def __init__(self, *, table: str, filters, **kwargs) -> None:
+ super(ComponentPurgeBody, self).__init__(**kwargs)
+ self.table = table
+ self.filters = filters
+
+
+class ComponentPurgeBodyFilters(Model):
+ """User-defined filters to return data which will be purged from the table.
+
+ :param column: The column of the table over which the given query should
+ run
+ :type column: str
+ :param operator: A query operator to evaluate over the provided column and
+ value(s). Supported operators are ==, =~, in, in~, >, >=, <, <=, between,
+ and have the same behavior as they would in a KQL query.
+ :type operator: str
+ :param value: the value for the operator to function over. This can be a
+ number (e.g., > 100), a string (timestamp >= '2017-09-01') or array of
+ values.
+ :type value: object
+ :param key: When filtering over custom dimensions, this key will be used
+ as the name of the custom dimension.
+ :type key: str
+ """
+
+ _attribute_map = {
+ 'column': {'key': 'column', 'type': 'str'},
+ 'operator': {'key': 'operator', 'type': 'str'},
+ 'value': {'key': 'value', 'type': 'object'},
+ 'key': {'key': 'key', 'type': 'str'},
+ }
+
+ def __init__(self, *, column: str=None, operator: str=None, value=None, key: str=None, **kwargs) -> None:
+ super(ComponentPurgeBodyFilters, self).__init__(**kwargs)
+ self.column = column
+ self.operator = operator
+ self.value = value
+ self.key = key
+
+
+class ComponentPurgeResponse(Model):
+ """Response containing operationId for a specific purge action.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param operation_id: Required. Id to use when querying for status for a
+ particular purge operation.
+ :type operation_id: str
+ """
+
+ _validation = {
+ 'operation_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'operation_id': {'key': 'operationId', 'type': 'str'},
+ }
+
+ def __init__(self, *, operation_id: str, **kwargs) -> None:
+ super(ComponentPurgeResponse, self).__init__(**kwargs)
+ self.operation_id = operation_id
+
+
+class ComponentPurgeStatusResponse(Model):
+ """Response containing status for a specific purge operation.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param status: Required. Status of the operation represented by the
+ requested Id. Possible values include: 'pending', 'completed'
+ :type status: str or
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.PurgeState
+ """
+
+ _validation = {
+ 'status': {'required': True},
+ }
+
+ _attribute_map = {
+ 'status': {'key': 'status', 'type': 'str'},
+ }
+
+ def __init__(self, *, status, **kwargs) -> None:
+ super(ComponentPurgeStatusResponse, self).__init__(**kwargs)
+ self.status = status
+
+
+class PrivateLinkScopedResource(Model):
+ """The private link scope resource reference.
+
+ :param resource_id: The full resource Id of the private link scope
+ resource.
+ :type resource_id: str
+ :param scope_id: The private link scope unique Identifier.
+ :type scope_id: str
+ """
+
+ _attribute_map = {
+ 'resource_id': {'key': 'ResourceId', 'type': 'str'},
+ 'scope_id': {'key': 'ScopeId', 'type': 'str'},
+ }
+
+ def __init__(self, *, resource_id: str=None, scope_id: str=None, **kwargs) -> None:
+ super(PrivateLinkScopedResource, self).__init__(**kwargs)
+ self.resource_id = resource_id
+ self.scope_id = scope_id
+
+
+class TagsResource(Model):
+ """A container holding only the Tags for a resource, allowing the user to
+ update the tags on a WebTest instance.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, tags=None, **kwargs) -> None:
+ super(TagsResource, self).__init__(**kwargs)
+ self.tags = tags
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_paged.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_paged_models.py
similarity index 88%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_paged.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_paged_models.py
index 7283609bd08..5f0557dea71 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_component_paged.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/models/_paged_models.py
@@ -14,7 +14,7 @@
class ApplicationInsightsComponentPaged(Paged):
"""
- A paging container for iterating over a list of :class:`ApplicationInsightsComponent ` object
+ A paging container for iterating over a list of :class:`ApplicationInsightsComponent ` object
"""
_attribute_map = {
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/operations/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/operations/__init__.py
new file mode 100644
index 00000000000..6ed05ddaf00
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/operations/__init__.py
@@ -0,0 +1,18 @@
+# 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 ._proactive_detection_configurations_operations import ProactiveDetectionConfigurationsOperations
+from ._components_operations import ComponentsOperations
+
+__all__ = [
+ 'ProactiveDetectionConfigurationsOperations',
+ 'ComponentsOperations',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/operations/_components_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/operations/_components_operations.py
new file mode 100644
index 00000000000..1b13e0be0ab
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/operations/_components_operations.py
@@ -0,0 +1,598 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class ComponentsOperations(object):
+ """ComponentsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2018-05-01-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2018-05-01-preview"
+
+ self.config = config
+
+ def list(
+ self, custom_headers=None, raw=False, **operation_config):
+ """Gets a list of all Application Insights components within a
+ subscription.
+
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of ApplicationInsightsComponent
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponent]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/components'}
+
+ def list_by_resource_group(
+ self, resource_group_name, custom_headers=None, raw=False, **operation_config):
+ """Gets a list of Application Insights components within a resource group.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of ApplicationInsightsComponent
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponentPaged[~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponent]
+ :raises: :class:`CloudError`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.ApplicationInsightsComponentPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components'}
+
+ def delete(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Deletes an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 204]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'}
+
+ def get(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Returns an Application Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponent or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponent
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponent', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'}
+
+ def create_or_update(
+ self, resource_group_name, resource_name, insight_properties, custom_headers=None, raw=False, **operation_config):
+ """Creates (or updates) an Application Insights component. Note: You
+ cannot specify a different value for InstrumentationKey nor AppId in
+ the Put operation.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param insight_properties: Properties that need to be specified to
+ create an Application Insights component.
+ :type insight_properties:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponent
+ :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: ApplicationInsightsComponent or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponent
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(insight_properties, 'ApplicationInsightsComponent')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponent', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('ApplicationInsightsComponent', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'}
+
+ def update_tags(
+ self, resource_group_name, resource_name, tags=None, custom_headers=None, raw=False, **operation_config):
+ """Updates an existing component's tags. To update other fields use the
+ CreateOrUpdate method.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param tags: Resource tags
+ :type tags: dict[str, 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: ApplicationInsightsComponent or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponent
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ component_tags = models.TagsResource(tags=tags)
+
+ # Construct URL
+ url = self.update_tags.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(component_tags, 'TagsResource')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponent', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('ApplicationInsightsComponent', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}'}
+
+ def purge(
+ self, resource_group_name, resource_name, table, filters, custom_headers=None, raw=False, **operation_config):
+ """Purges data in an Application Insights component by a set of
+ user-defined filters.
+ In order to manage system resources, purge requests are throttled at 50
+ requests per hour. You should batch the execution of purge requests by
+ sending a single command whose predicate includes all user identities
+ that require purging. Use the in operator to specify multiple
+ identities. You should run the query prior to using for a purge request
+ to verify that the results are expected.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param table: Table from which to purge data.
+ :type table: str
+ :param filters: The set of columns and filters (queries) to run over
+ them to purge the resulting data.
+ :type filters:
+ list[~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ComponentPurgeBodyFilters]
+ :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: ComponentPurgeResponse or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ComponentPurgeResponse
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ body = models.ComponentPurgeBody(table=table, filters=filters)
+
+ # Construct URL
+ url = self.purge.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(body, 'ComponentPurgeBody')
+
+ # 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 [202]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 202:
+ deserialized = self._deserialize('ComponentPurgeResponse', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ purge.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/purge'}
+
+ def get_purge_status(
+ self, resource_group_name, resource_name, purge_id, custom_headers=None, raw=False, **operation_config):
+ """Get status for an ongoing purge operation.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param purge_id: In a purge status request, this is the Id of the
+ operation the status of which is returned.
+ :type purge_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: ComponentPurgeStatusResponse or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ComponentPurgeStatusResponse
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get_purge_status.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'purgeId': self._serialize.url("purge_id", purge_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ComponentPurgeStatusResponse', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get_purge_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/operations/{purgeId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/operations/_proactive_detection_configurations_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/operations/_proactive_detection_configurations_operations.py
new file mode 100644
index 00000000000..1c55d15e5dc
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/operations/_proactive_detection_configurations_operations.py
@@ -0,0 +1,251 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+from msrestazure.azure_exceptions import CloudError
+
+from .. import models
+
+
+class ProactiveDetectionConfigurationsOperations(object):
+ """ProactiveDetectionConfigurationsOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2018-05-01-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2018-05-01-preview"
+
+ self.config = config
+
+ def list(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Gets a list of ProactiveDetection configurations of an Application
+ Insights component.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: list or ClientRawResponse if raw=true
+ :rtype:
+ list[~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponentProactiveDetectionConfiguration]
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.list.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('[ApplicationInsightsComponentProactiveDetectionConfiguration]', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs'}
+
+ def get(
+ self, resource_group_name, resource_name, configuration_id, custom_headers=None, raw=False, **operation_config):
+ """Get the ProactiveDetection configuration for this configuration id.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param configuration_id: The ProactiveDetection configuration ID. This
+ is unique within a Application Insights component.
+ :type configuration_id: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentProactiveDetectionConfiguration
+ or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponentProactiveDetectionConfiguration
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'ConfigurationId': self._serialize.url("configuration_id", configuration_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'}
+
+ def update(
+ self, resource_group_name, resource_name, configuration_id, proactive_detection_properties, custom_headers=None, raw=False, **operation_config):
+ """Update the ProactiveDetection configuration for this configuration id.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param configuration_id: The ProactiveDetection configuration ID. This
+ is unique within a Application Insights component.
+ :type configuration_id: str
+ :param proactive_detection_properties: Properties that need to be
+ specified to update the ProactiveDetection configuration.
+ :type proactive_detection_properties:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponentProactiveDetectionConfiguration
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: ApplicationInsightsComponentProactiveDetectionConfiguration
+ or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_05_01_preview.models.ApplicationInsightsComponentProactiveDetectionConfiguration
+ or ~msrest.pipeline.ClientRawResponse
+ :raises: :class:`CloudError`
+ """
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str'),
+ 'ConfigurationId': self._serialize.url("configuration_id", configuration_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(proactive_detection_properties, 'ApplicationInsightsComponentProactiveDetectionConfiguration')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ exp = CloudError(response)
+ exp.request_id = response.headers.get('x-ms-request-id')
+ raise exp
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('ApplicationInsightsComponentProactiveDetectionConfiguration', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/components/{resourceName}/ProactiveDetectionConfigs/{ConfigurationId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/version.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/version.py
new file mode 100644
index 00000000000..7921c843fb5
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_05_01_preview/version.py
@@ -0,0 +1,13 @@
+# 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 = "2018-05-01-preview"
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/__init__.py
new file mode 100644
index 00000000000..298512941d9
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/__init__.py
@@ -0,0 +1,19 @@
+# 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 ._configuration import ApplicationInsightsManagementClientConfiguration
+from ._application_insights_management_client import ApplicationInsightsManagementClient
+__all__ = ['ApplicationInsightsManagementClient', 'ApplicationInsightsManagementClientConfiguration']
+
+from .version import VERSION
+
+__version__ = VERSION
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/_application_insights_management_client.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/_application_insights_management_client.py
new file mode 100644
index 00000000000..8cb035be52a
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/_application_insights_management_client.py
@@ -0,0 +1,49 @@
+# 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 Serializer, Deserializer
+
+from ._configuration import ApplicationInsightsManagementClientConfiguration
+from .operations import WorkbooksOperations
+from . import models
+
+
+class ApplicationInsightsManagementClient(SDKClient):
+ """Composite Swagger for Application Insights Management Client
+
+ :ivar config: Configuration for client.
+ :vartype config: ApplicationInsightsManagementClientConfiguration
+
+ :ivar workbooks: Workbooks operations
+ :vartype workbooks: azure.mgmt.applicationinsights.v2018_06_17_preview.operations.WorkbooksOperations
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
+ super(ApplicationInsightsManagementClient, 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 = '2018-06-17-preview'
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+
+ self.workbooks = WorkbooksOperations(
+ self._client, self.config, self._serialize, self._deserialize)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/_configuration.py
new file mode 100644
index 00000000000..6c855295a4b
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/_configuration.py
@@ -0,0 +1,48 @@
+# 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 msrestazure import AzureConfiguration
+
+from .version import VERSION
+
+
+class ApplicationInsightsManagementClientConfiguration(AzureConfiguration):
+ """Configuration for ApplicationInsightsManagementClient
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ if credentials is None:
+ raise ValueError("Parameter 'credentials' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if not base_url:
+ base_url = 'https://management.azure.com'
+
+ super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url)
+
+ # Starting Autorest.Python 4.0.64, make connection pool activated by default
+ self.keep_alive = True
+
+ self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION))
+ self.add_user_agent('Azure-SDK-For-Python')
+
+ self.credentials = credentials
+ self.subscription_id = subscription_id
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/__init__.py
new file mode 100644
index 00000000000..90b398780bc
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/__init__.py
@@ -0,0 +1,39 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+try:
+ from ._models_py3 import ErrorFieldContract
+ from ._models_py3 import Resource
+ from ._models_py3 import Workbook
+ from ._models_py3 import WorkbookError, WorkbookErrorException
+ from ._models_py3 import WorkbookUpdateParameters
+except (SyntaxError, ImportError):
+ from ._models import ErrorFieldContract
+ from ._models import Resource
+ from ._models import Workbook
+ from ._models import WorkbookError, WorkbookErrorException
+ from ._models import WorkbookUpdateParameters
+from ._paged_models import WorkbookPaged
+from ._application_insights_management_client_enums import (
+ SharedTypeKind,
+ CategoryType,
+)
+
+__all__ = [
+ 'ErrorFieldContract',
+ 'Resource',
+ 'Workbook',
+ 'WorkbookError', 'WorkbookErrorException',
+ 'WorkbookUpdateParameters',
+ 'WorkbookPaged',
+ 'SharedTypeKind',
+ 'CategoryType',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_management_client_enums.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_application_insights_management_client_enums.py
similarity index 67%
rename from src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_management_client_enums.py
rename to src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_application_insights_management_client_enums.py
index fdb344ca6bf..9543a1c3d43 100644
--- a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/models/application_insights_management_client_enums.py
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_application_insights_management_client_enums.py
@@ -12,23 +12,15 @@
from enum import Enum
-class ApplicationType(Enum):
+class SharedTypeKind(str, Enum):
- web = "web"
- other = "other"
+ user = "user"
+ shared = "shared"
-class FlowType(Enum):
+class CategoryType(str, Enum):
- bluefield = "Bluefield"
-
-
-class RequestSource(Enum):
-
- rest = "rest"
-
-
-class WebTestKind(Enum):
-
- ping = "ping"
- multistep = "multistep"
+ workbook = "workbook"
+ tsg = "TSG"
+ performance = "performance"
+ retention = "retention"
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_models.py
new file mode 100644
index 00000000000..a1c45697859
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_models.py
@@ -0,0 +1,261 @@
+# 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 CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ErrorFieldContract(Model):
+ """Error Field contract.
+
+ :param code: Property level error code.
+ :type code: str
+ :param message: Human-readable representation of property-level error.
+ :type message: str
+ :param target: Property name.
+ :type target: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ErrorFieldContract, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.target = kwargs.get('target', None)
+
+
+class Resource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name. This is GUID value. The display name
+ should be assigned within properties field.
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param kind: The kind of workbook. Choices are user and shared. Possible
+ values include: 'user', 'shared'
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.SharedTypeKind
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(Resource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.kind = kwargs.get('kind', None)
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
+
+
+class Workbook(Resource):
+ """An Application Insights workbook definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name. This is GUID value. The display name
+ should be assigned within properties field.
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param kind: The kind of workbook. Choices are user and shared. Possible
+ values include: 'user', 'shared'
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.SharedTypeKind
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param display_name: Required. The user-defined name (display name) of the
+ workbook.
+ :type display_name: str
+ :param serialized_data: Required. Configuration of this particular
+ workbook. Configuration data is a string containing valid JSON
+ :type serialized_data: str
+ :ivar time_modified: Date and time in UTC of the last modification that
+ was made to this workbook definition.
+ :vartype time_modified: str
+ :param category: Required. Workbook category, as defined by the user at
+ creation time.
+ :type category: str
+ :param version: Workbook version
+ :type version: str
+ :param workbook_tags: A list of 0 or more tags that are associated with
+ this workbook definition
+ :type workbook_tags: list[str]
+ :param user_id: Required. Unique user id of the specific user that owns
+ this workbook.
+ :type user_id: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'display_name': {'required': True},
+ 'serialized_data': {'required': True},
+ 'time_modified': {'readonly': True},
+ 'category': {'required': True},
+ 'user_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'},
+ 'time_modified': {'key': 'properties.timeModified', 'type': 'str'},
+ 'category': {'key': 'properties.category', 'type': 'str'},
+ 'version': {'key': 'properties.version', 'type': 'str'},
+ 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'},
+ 'user_id': {'key': 'properties.userId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(Workbook, self).__init__(**kwargs)
+ self.display_name = kwargs.get('display_name', None)
+ self.serialized_data = kwargs.get('serialized_data', None)
+ self.time_modified = None
+ self.category = kwargs.get('category', None)
+ self.version = kwargs.get('version', None)
+ self.workbook_tags = kwargs.get('workbook_tags', None)
+ self.user_id = kwargs.get('user_id', None)
+
+
+class WorkbookError(Model):
+ """Error message body that will indicate why the operation failed.
+
+ :param code: Service-defined error code. This code serves as a sub-status
+ for the HTTP error code specified in the response.
+ :type code: str
+ :param message: Human-readable representation of the error.
+ :type message: str
+ :param details: The list of invalid fields send in request, in case of
+ validation error.
+ :type details:
+ list[~azure.mgmt.applicationinsights.v2018_06_17_preview.models.ErrorFieldContract]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorFieldContract]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookError, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.details = kwargs.get('details', None)
+
+
+class WorkbookErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'WorkbookError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args)
+
+
+class WorkbookUpdateParameters(Model):
+ """The parameters that can be provided when updating workbook properties
+ properties.
+
+ :param kind: The kind of workbook. Choices are user and shared. Possible
+ values include: 'user', 'shared'
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.SharedTypeKind
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param display_name: The user-defined name (display name) of the workbook.
+ :type display_name: str
+ :param serialized_data: Configuration of this particular workbook.
+ Configuration data is a string containing valid JSON
+ :type serialized_data: str
+ :param category: Workbook category, as defined by the user at creation
+ time.
+ :type category: str
+ :param tags1: A list of 0 or more tags that are associated with this
+ workbook definition
+ :type tags1: list[str]
+ """
+
+ _attribute_map = {
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'},
+ 'category': {'key': 'properties.category', 'type': 'str'},
+ 'tags1': {'key': 'properties.tags', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookUpdateParameters, self).__init__(**kwargs)
+ self.kind = kwargs.get('kind', None)
+ self.tags = kwargs.get('tags', None)
+ self.display_name = kwargs.get('display_name', None)
+ self.serialized_data = kwargs.get('serialized_data', None)
+ self.category = kwargs.get('category', None)
+ self.tags1 = kwargs.get('tags1', None)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_models_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_models_py3.py
new file mode 100644
index 00000000000..59055e5e800
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_models_py3.py
@@ -0,0 +1,261 @@
+# 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 CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ErrorFieldContract(Model):
+ """Error Field contract.
+
+ :param code: Property level error code.
+ :type code: str
+ :param message: Human-readable representation of property-level error.
+ :type message: str
+ :param target: Property name.
+ :type target: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None:
+ super(ErrorFieldContract, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.target = target
+
+
+class Resource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name. This is GUID value. The display name
+ should be assigned within properties field.
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param kind: The kind of workbook. Choices are user and shared. Possible
+ values include: 'user', 'shared'
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.SharedTypeKind
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, location: str, kind=None, tags=None, **kwargs) -> None:
+ super(Resource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.kind = kind
+ self.location = location
+ self.tags = tags
+
+
+class Workbook(Resource):
+ """An Application Insights workbook definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name. This is GUID value. The display name
+ should be assigned within properties field.
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param kind: The kind of workbook. Choices are user and shared. Possible
+ values include: 'user', 'shared'
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.SharedTypeKind
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param display_name: Required. The user-defined name (display name) of the
+ workbook.
+ :type display_name: str
+ :param serialized_data: Required. Configuration of this particular
+ workbook. Configuration data is a string containing valid JSON
+ :type serialized_data: str
+ :ivar time_modified: Date and time in UTC of the last modification that
+ was made to this workbook definition.
+ :vartype time_modified: str
+ :param category: Required. Workbook category, as defined by the user at
+ creation time.
+ :type category: str
+ :param version: Workbook version
+ :type version: str
+ :param workbook_tags: A list of 0 or more tags that are associated with
+ this workbook definition
+ :type workbook_tags: list[str]
+ :param user_id: Required. Unique user id of the specific user that owns
+ this workbook.
+ :type user_id: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'display_name': {'required': True},
+ 'serialized_data': {'required': True},
+ 'time_modified': {'readonly': True},
+ 'category': {'required': True},
+ 'user_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'},
+ 'time_modified': {'key': 'properties.timeModified', 'type': 'str'},
+ 'category': {'key': 'properties.category', 'type': 'str'},
+ 'version': {'key': 'properties.version', 'type': 'str'},
+ 'workbook_tags': {'key': 'properties.tags', 'type': '[str]'},
+ 'user_id': {'key': 'properties.userId', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, display_name: str, serialized_data: str, category: str, user_id: str, kind=None, tags=None, version: str=None, workbook_tags=None, **kwargs) -> None:
+ super(Workbook, self).__init__(kind=kind, location=location, tags=tags, **kwargs)
+ self.display_name = display_name
+ self.serialized_data = serialized_data
+ self.time_modified = None
+ self.category = category
+ self.version = version
+ self.workbook_tags = workbook_tags
+ self.user_id = user_id
+
+
+class WorkbookError(Model):
+ """Error message body that will indicate why the operation failed.
+
+ :param code: Service-defined error code. This code serves as a sub-status
+ for the HTTP error code specified in the response.
+ :type code: str
+ :param message: Human-readable representation of the error.
+ :type message: str
+ :param details: The list of invalid fields send in request, in case of
+ validation error.
+ :type details:
+ list[~azure.mgmt.applicationinsights.v2018_06_17_preview.models.ErrorFieldContract]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorFieldContract]'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None:
+ super(WorkbookError, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.details = details
+
+
+class WorkbookErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'WorkbookError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args)
+
+
+class WorkbookUpdateParameters(Model):
+ """The parameters that can be provided when updating workbook properties
+ properties.
+
+ :param kind: The kind of workbook. Choices are user and shared. Possible
+ values include: 'user', 'shared'
+ :type kind: str or
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.SharedTypeKind
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param display_name: The user-defined name (display name) of the workbook.
+ :type display_name: str
+ :param serialized_data: Configuration of this particular workbook.
+ Configuration data is a string containing valid JSON
+ :type serialized_data: str
+ :param category: Workbook category, as defined by the user at creation
+ time.
+ :type category: str
+ :param tags1: A list of 0 or more tags that are associated with this
+ workbook definition
+ :type tags1: list[str]
+ """
+
+ _attribute_map = {
+ 'kind': {'key': 'kind', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'serialized_data': {'key': 'properties.serializedData', 'type': 'str'},
+ 'category': {'key': 'properties.category', 'type': 'str'},
+ 'tags1': {'key': 'properties.tags', 'type': '[str]'},
+ }
+
+ def __init__(self, *, kind=None, tags=None, display_name: str=None, serialized_data: str=None, category: str=None, tags1=None, **kwargs) -> None:
+ super(WorkbookUpdateParameters, self).__init__(**kwargs)
+ self.kind = kind
+ self.tags = tags
+ self.display_name = display_name
+ self.serialized_data = serialized_data
+ self.category = category
+ self.tags1 = tags1
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_paged_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_paged_models.py
new file mode 100644
index 00000000000..e09ec5de4fb
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/models/_paged_models.py
@@ -0,0 +1,27 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.paging import Paged
+
+
+class WorkbookPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`Workbook ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[Workbook]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(WorkbookPaged, self).__init__(*args, **kwargs)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/operations/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/operations/__init__.py
new file mode 100644
index 00000000000..fde86e919a6
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/operations/__init__.py
@@ -0,0 +1,16 @@
+# 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 ._workbooks_operations import WorkbooksOperations
+
+__all__ = [
+ 'WorkbooksOperations',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/operations/_workbooks_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/operations/_workbooks_operations.py
new file mode 100644
index 00000000000..18e678e0603
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/operations/_workbooks_operations.py
@@ -0,0 +1,400 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+
+from .. import models
+
+
+class WorkbooksOperations(object):
+ """WorkbooksOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2018-06-17-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2018-06-17-preview"
+
+ self.config = config
+
+ def list_by_resource_group(
+ self, resource_group_name, category, source_id, tags=None, can_fetch_content=None, custom_headers=None, raw=False, **operation_config):
+ """Get all Workbooks defined within a specified resource group and
+ category.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param category: Category of workbook to return. Possible values
+ include: 'workbook', 'TSG', 'performance', 'retention'
+ :type category: str or
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.CategoryType
+ :param source_id: Azure Resource Id that will fetch all related
+ workbooks.
+ :type source_id: str
+ :param tags: Tags presents on each workbook returned.
+ :type tags: list[str]
+ :param can_fetch_content: Flag indicating whether or not to return the
+ full content for each applicable workbook. If false, only return
+ summary content for workbooks.
+ :type can_fetch_content: bool
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of Workbook
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.WorkbookPaged[~azure.mgmt.applicationinsights.v2018_06_17_preview.models.Workbook]
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['category'] = self._serialize.query("category", category, 'str')
+ if tags is not None:
+ query_parameters['tags'] = self._serialize.query("tags", tags, '[str]', div=',')
+ query_parameters['sourceId'] = self._serialize.query("source_id", source_id, 'str')
+ if can_fetch_content is not None:
+ query_parameters['canFetchContent'] = self._serialize.query("can_fetch_content", can_fetch_content, 'bool')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.WorkbookPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks'}
+
+ def get(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Get a single workbook by its resourceName.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: Workbook or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.Workbook or
+ ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('Workbook', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
+
+ def delete(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Delete a workbook.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [201, 204]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
+
+ def create_or_update(
+ self, resource_group_name, resource_name, source_id, workbook_properties, custom_headers=None, raw=False, **operation_config):
+ """Create a new workbook.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param source_id: Azure Resource Id that will fetch all related
+ workbooks.
+ :type source_id: str
+ :param workbook_properties: Properties that need to be specified to
+ create a new workbook.
+ :type workbook_properties:
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.Workbook
+ :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: Workbook or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.Workbook or
+ ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['sourceId'] = self._serialize.query("source_id", source_id, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(workbook_properties, 'Workbook')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('Workbook', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('Workbook', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
+
+ def update(
+ self, resource_group_name, resource_name, source_id, workbook_update_parameters=None, custom_headers=None, raw=False, **operation_config):
+ """Updates a workbook that has already been added.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param source_id: Azure Resource Id that will fetch all related
+ workbooks.
+ :type source_id: str
+ :param workbook_update_parameters: Properties that need to be
+ specified to create a new workbook.
+ :type workbook_update_parameters:
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.WorkbookUpdateParameters
+ :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: Workbook or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2018_06_17_preview.models.Workbook or
+ ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['sourceId'] = self._serialize.query("source_id", source_id, 'str')
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ if workbook_update_parameters is not None:
+ body_content = self._serialize.body(workbook_update_parameters, 'WorkbookUpdateParameters')
+ else:
+ body_content = None
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('Workbook', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooks/{resourceName}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/version.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/version.py
new file mode 100644
index 00000000000..a3fe5c0e22e
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2018_06_17_preview/version.py
@@ -0,0 +1,13 @@
+# 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 = "2018-06-17-preview"
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/__init__.py
new file mode 100644
index 00000000000..298512941d9
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/__init__.py
@@ -0,0 +1,19 @@
+# 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 ._configuration import ApplicationInsightsManagementClientConfiguration
+from ._application_insights_management_client import ApplicationInsightsManagementClient
+__all__ = ['ApplicationInsightsManagementClient', 'ApplicationInsightsManagementClientConfiguration']
+
+from .version import VERSION
+
+__version__ = VERSION
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/_application_insights_management_client.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/_application_insights_management_client.py
new file mode 100644
index 00000000000..97b6838e03d
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/_application_insights_management_client.py
@@ -0,0 +1,54 @@
+# 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 Serializer, Deserializer
+
+from ._configuration import ApplicationInsightsManagementClientConfiguration
+from .operations import QueriesOperations
+from .operations import QueryPacksOperations
+from . import models
+
+
+class ApplicationInsightsManagementClient(SDKClient):
+ """Composite Swagger for Application Insights Management Client
+
+ :ivar config: Configuration for client.
+ :vartype config: ApplicationInsightsManagementClientConfiguration
+
+ :ivar queries: Queries operations
+ :vartype queries: azure.mgmt.applicationinsights.v2019_09_01_preview.operations.QueriesOperations
+ :ivar query_packs: QueryPacks operations
+ :vartype query_packs: azure.mgmt.applicationinsights.v2019_09_01_preview.operations.QueryPacksOperations
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
+ super(ApplicationInsightsManagementClient, 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 = '2019-09-01-preview'
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+
+ self.queries = QueriesOperations(
+ self._client, self.config, self._serialize, self._deserialize)
+ self.query_packs = QueryPacksOperations(
+ self._client, self.config, self._serialize, self._deserialize)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/_configuration.py
new file mode 100644
index 00000000000..6c855295a4b
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/_configuration.py
@@ -0,0 +1,48 @@
+# 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 msrestazure import AzureConfiguration
+
+from .version import VERSION
+
+
+class ApplicationInsightsManagementClientConfiguration(AzureConfiguration):
+ """Configuration for ApplicationInsightsManagementClient
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ if credentials is None:
+ raise ValueError("Parameter 'credentials' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if not base_url:
+ base_url = 'https://management.azure.com'
+
+ super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url)
+
+ # Starting Autorest.Python 4.0.64, make connection pool activated by default
+ self.keep_alive = True
+
+ self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION))
+ self.add_user_agent('Azure-SDK-For-Python')
+
+ self.credentials = credentials
+ self.subscription_id = subscription_id
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/__init__.py
new file mode 100644
index 00000000000..1295c33096a
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/__init__.py
@@ -0,0 +1,41 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+try:
+ from ._models_py3 import AzureResourceProperties
+ from ._models_py3 import ErrorResponse, ErrorResponseException
+ from ._models_py3 import LogAnalyticsQueryPack
+ from ._models_py3 import LogAnalyticsQueryPackQuery
+ from ._models_py3 import LogAnalyticsQueryPackQuerySearchProperties
+ from ._models_py3 import QueryPacksResource
+ from ._models_py3 import TagsResource
+except (SyntaxError, ImportError):
+ from ._models import AzureResourceProperties
+ from ._models import ErrorResponse, ErrorResponseException
+ from ._models import LogAnalyticsQueryPack
+ from ._models import LogAnalyticsQueryPackQuery
+ from ._models import LogAnalyticsQueryPackQuerySearchProperties
+ from ._models import QueryPacksResource
+ from ._models import TagsResource
+from ._paged_models import LogAnalyticsQueryPackPaged
+from ._paged_models import LogAnalyticsQueryPackQueryPaged
+
+__all__ = [
+ 'AzureResourceProperties',
+ 'ErrorResponse', 'ErrorResponseException',
+ 'LogAnalyticsQueryPack',
+ 'LogAnalyticsQueryPackQuery',
+ 'LogAnalyticsQueryPackQuerySearchProperties',
+ 'QueryPacksResource',
+ 'TagsResource',
+ 'LogAnalyticsQueryPackQueryPaged',
+ 'LogAnalyticsQueryPackPaged',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/_models.py
new file mode 100644
index 00000000000..411eceadf4d
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/_models.py
@@ -0,0 +1,322 @@
+# 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 AzureResourceProperties(Model):
+ """An Azure resource QueryPack-Query object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(AzureResourceProperties, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+
+
+class CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ErrorResponse(Model):
+ """Describe the format of an Error response.
+
+ :param code: Error code
+ :type code: str
+ :param message: Error message indicating why the operation failed.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ErrorResponse, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', 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)
+
+
+class QueryPacksResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(QueryPacksResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
+
+
+class LogAnalyticsQueryPack(QueryPacksResource):
+ """An Log Analytics QueryPack definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :ivar query_pack_id: The unique ID of your application. This field cannot
+ be changed.
+ :vartype query_pack_id: str
+ :ivar time_created: Creation Date for the Log Analytics QueryPack, in ISO
+ 8601 format.
+ :vartype time_created: datetime
+ :ivar time_modified: Last modified date of the Log Analytics QueryPack, in
+ ISO 8601 format.
+ :vartype time_modified: datetime
+ :ivar provisioning_state: Current state of this QueryPack: whether or not
+ is has been provisioned within the resource group it is defined. Users
+ cannot change this value but are able to read from it. Values will include
+ Succeeded, Deploying, Canceled, and Failed.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'query_pack_id': {'readonly': True},
+ 'time_created': {'readonly': True},
+ 'time_modified': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'query_pack_id': {'key': 'properties.queryPackId', 'type': 'str'},
+ 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
+ 'time_modified': {'key': 'properties.timeModified', 'type': 'iso-8601'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(LogAnalyticsQueryPack, self).__init__(**kwargs)
+ self.query_pack_id = None
+ self.time_created = None
+ self.time_modified = None
+ self.provisioning_state = None
+
+
+class LogAnalyticsQueryPackQuery(AzureResourceProperties):
+ """A Log Analytics QueryPack-Query definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :ivar query_id: The unique ID of your application. This field cannot be
+ changed.
+ :vartype query_id: str
+ :param display_name: Required. Unique display name for your query within
+ the Query Pack.
+ :type display_name: str
+ :ivar time_created: Creation Date for the Log Analytics Query, in ISO 8601
+ format.
+ :vartype time_created: datetime
+ :ivar time_modified: Last modified date of the Log Analytics Query, in ISO
+ 8601 format.
+ :vartype time_modified: datetime
+ :ivar author: Object Id of user creating the query.
+ :vartype author: str
+ :param description: Description of the query.
+ :type description: str
+ :param body: Required. Body of the query.
+ :type body: str
+ :param linked_resource_id: Resource id associated with the query.
+ :type linked_resource_id: str
+ :param categories: Categories associated with the query.
+ :type categories: list[str]
+ :param resource_types: Resource Types associated with the query.
+ :type resource_types: list[str]
+ :param labels: Labels associated with the query.
+ :type labels: list[str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'query_id': {'readonly': True},
+ 'display_name': {'required': True},
+ 'time_created': {'readonly': True},
+ 'time_modified': {'readonly': True},
+ 'author': {'readonly': True},
+ 'body': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'query_id': {'key': 'properties.queryId', 'type': 'str'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
+ 'time_modified': {'key': 'properties.timeModified', 'type': 'iso-8601'},
+ 'author': {'key': 'properties.author', 'type': 'str'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'body': {'key': 'properties.body', 'type': 'str'},
+ 'linked_resource_id': {'key': 'properties.linkedResourceId', 'type': 'str'},
+ 'categories': {'key': 'properties.categories', 'type': '[str]'},
+ 'resource_types': {'key': 'properties.resourceTypes', 'type': '[str]'},
+ 'labels': {'key': 'properties.labels', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(LogAnalyticsQueryPackQuery, self).__init__(**kwargs)
+ self.query_id = None
+ self.display_name = kwargs.get('display_name', None)
+ self.time_created = None
+ self.time_modified = None
+ self.author = None
+ self.description = kwargs.get('description', None)
+ self.body = kwargs.get('body', None)
+ self.linked_resource_id = kwargs.get('linked_resource_id', None)
+ self.categories = kwargs.get('categories', None)
+ self.resource_types = kwargs.get('resource_types', None)
+ self.labels = kwargs.get('labels', None)
+
+
+class LogAnalyticsQueryPackQuerySearchProperties(Model):
+ """Properties that define an Log Analytics QueryPack-Query search properties.
+
+ :param categories: Categories associated with the query.
+ :type categories: list[str]
+ :param resource_types: Resource Types associated with the query.
+ :type resource_types: list[str]
+ :param labels: Labels associated with the query.
+ :type labels: list[str]
+ """
+
+ _attribute_map = {
+ 'categories': {'key': 'categories', 'type': '[str]'},
+ 'resource_types': {'key': 'resourceTypes', 'type': '[str]'},
+ 'labels': {'key': 'labels', 'type': '[str]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(LogAnalyticsQueryPackQuerySearchProperties, self).__init__(**kwargs)
+ self.categories = kwargs.get('categories', None)
+ self.resource_types = kwargs.get('resource_types', None)
+ self.labels = kwargs.get('labels', None)
+
+
+class TagsResource(Model):
+ """A container holding only the Tags for a resource, allowing the user to
+ update the tags on a QueryPack instance.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(TagsResource, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/_models_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/_models_py3.py
new file mode 100644
index 00000000000..53951bc79d1
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/_models_py3.py
@@ -0,0 +1,322 @@
+# 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 AzureResourceProperties(Model):
+ """An Azure resource QueryPack-Query object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(AzureResourceProperties, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+
+
+class CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ErrorResponse(Model):
+ """Describe the format of an Error response.
+
+ :param code: Error code
+ :type code: str
+ :param message: Error message indicating why the operation failed.
+ :type message: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None:
+ super(ErrorResponse, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+
+
+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)
+
+
+class QueryPacksResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, location: str, tags=None, **kwargs) -> None:
+ super(QueryPacksResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = location
+ self.tags = tags
+
+
+class LogAnalyticsQueryPack(QueryPacksResource):
+ """An Log Analytics QueryPack definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :ivar query_pack_id: The unique ID of your application. This field cannot
+ be changed.
+ :vartype query_pack_id: str
+ :ivar time_created: Creation Date for the Log Analytics QueryPack, in ISO
+ 8601 format.
+ :vartype time_created: datetime
+ :ivar time_modified: Last modified date of the Log Analytics QueryPack, in
+ ISO 8601 format.
+ :vartype time_modified: datetime
+ :ivar provisioning_state: Current state of this QueryPack: whether or not
+ is has been provisioned within the resource group it is defined. Users
+ cannot change this value but are able to read from it. Values will include
+ Succeeded, Deploying, Canceled, and Failed.
+ :vartype provisioning_state: str
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'query_pack_id': {'readonly': True},
+ 'time_created': {'readonly': True},
+ 'time_modified': {'readonly': True},
+ 'provisioning_state': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'query_pack_id': {'key': 'properties.queryPackId', 'type': 'str'},
+ 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
+ 'time_modified': {'key': 'properties.timeModified', 'type': 'iso-8601'},
+ 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
+ }
+
+ def __init__(self, *, location: str, tags=None, **kwargs) -> None:
+ super(LogAnalyticsQueryPack, self).__init__(location=location, tags=tags, **kwargs)
+ self.query_pack_id = None
+ self.time_created = None
+ self.time_modified = None
+ self.provisioning_state = None
+
+
+class LogAnalyticsQueryPackQuery(AzureResourceProperties):
+ """A Log Analytics QueryPack-Query definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :ivar query_id: The unique ID of your application. This field cannot be
+ changed.
+ :vartype query_id: str
+ :param display_name: Required. Unique display name for your query within
+ the Query Pack.
+ :type display_name: str
+ :ivar time_created: Creation Date for the Log Analytics Query, in ISO 8601
+ format.
+ :vartype time_created: datetime
+ :ivar time_modified: Last modified date of the Log Analytics Query, in ISO
+ 8601 format.
+ :vartype time_modified: datetime
+ :ivar author: Object Id of user creating the query.
+ :vartype author: str
+ :param description: Description of the query.
+ :type description: str
+ :param body: Required. Body of the query.
+ :type body: str
+ :param linked_resource_id: Resource id associated with the query.
+ :type linked_resource_id: str
+ :param categories: Categories associated with the query.
+ :type categories: list[str]
+ :param resource_types: Resource Types associated with the query.
+ :type resource_types: list[str]
+ :param labels: Labels associated with the query.
+ :type labels: list[str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'query_id': {'readonly': True},
+ 'display_name': {'required': True},
+ 'time_created': {'readonly': True},
+ 'time_modified': {'readonly': True},
+ 'author': {'readonly': True},
+ 'body': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'query_id': {'key': 'properties.queryId', 'type': 'str'},
+ 'display_name': {'key': 'properties.displayName', 'type': 'str'},
+ 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'},
+ 'time_modified': {'key': 'properties.timeModified', 'type': 'iso-8601'},
+ 'author': {'key': 'properties.author', 'type': 'str'},
+ 'description': {'key': 'properties.description', 'type': 'str'},
+ 'body': {'key': 'properties.body', 'type': 'str'},
+ 'linked_resource_id': {'key': 'properties.linkedResourceId', 'type': 'str'},
+ 'categories': {'key': 'properties.categories', 'type': '[str]'},
+ 'resource_types': {'key': 'properties.resourceTypes', 'type': '[str]'},
+ 'labels': {'key': 'properties.labels', 'type': '[str]'},
+ }
+
+ def __init__(self, *, display_name: str, body: str, description: str=None, linked_resource_id: str=None, categories=None, resource_types=None, labels=None, **kwargs) -> None:
+ super(LogAnalyticsQueryPackQuery, self).__init__(**kwargs)
+ self.query_id = None
+ self.display_name = display_name
+ self.time_created = None
+ self.time_modified = None
+ self.author = None
+ self.description = description
+ self.body = body
+ self.linked_resource_id = linked_resource_id
+ self.categories = categories
+ self.resource_types = resource_types
+ self.labels = labels
+
+
+class LogAnalyticsQueryPackQuerySearchProperties(Model):
+ """Properties that define an Log Analytics QueryPack-Query search properties.
+
+ :param categories: Categories associated with the query.
+ :type categories: list[str]
+ :param resource_types: Resource Types associated with the query.
+ :type resource_types: list[str]
+ :param labels: Labels associated with the query.
+ :type labels: list[str]
+ """
+
+ _attribute_map = {
+ 'categories': {'key': 'categories', 'type': '[str]'},
+ 'resource_types': {'key': 'resourceTypes', 'type': '[str]'},
+ 'labels': {'key': 'labels', 'type': '[str]'},
+ }
+
+ def __init__(self, *, categories=None, resource_types=None, labels=None, **kwargs) -> None:
+ super(LogAnalyticsQueryPackQuerySearchProperties, self).__init__(**kwargs)
+ self.categories = categories
+ self.resource_types = resource_types
+ self.labels = labels
+
+
+class TagsResource(Model):
+ """A container holding only the Tags for a resource, allowing the user to
+ update the tags on a QueryPack instance.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, tags=None, **kwargs) -> None:
+ super(TagsResource, self).__init__(**kwargs)
+ self.tags = tags
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/_paged_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/_paged_models.py
new file mode 100644
index 00000000000..aa3deeaa633
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/models/_paged_models.py
@@ -0,0 +1,40 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.paging import Paged
+
+
+class LogAnalyticsQueryPackQueryPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`LogAnalyticsQueryPackQuery ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[LogAnalyticsQueryPackQuery]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(LogAnalyticsQueryPackQueryPaged, self).__init__(*args, **kwargs)
+class LogAnalyticsQueryPackPaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`LogAnalyticsQueryPack ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[LogAnalyticsQueryPack]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(LogAnalyticsQueryPackPaged, self).__init__(*args, **kwargs)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/operations/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/operations/__init__.py
new file mode 100644
index 00000000000..d7a4805c2c6
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/operations/__init__.py
@@ -0,0 +1,18 @@
+# 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 ._queries_operations import QueriesOperations
+from ._query_packs_operations import QueryPacksOperations
+
+__all__ = [
+ 'QueriesOperations',
+ 'QueryPacksOperations',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/operations/_queries_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/operations/_queries_operations.py
new file mode 100644
index 00000000000..cc037bf33ba
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/operations/_queries_operations.py
@@ -0,0 +1,423 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+
+from .. import models
+
+
+class QueriesOperations(object):
+ """QueriesOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2019-09-01-preview"
+
+ self.config = config
+
+ def list(
+ self, resource_group_name, query_pack_name, top=None, include_body=None, skip_token=None, custom_headers=None, raw=False, **operation_config):
+ """Gets a list of Queries defined within a Log Analytics QueryPack.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param query_pack_name: The name of the Log Analytics QueryPack
+ resource.
+ :type query_pack_name: str
+ :param top: Maximum items returned in page.
+ :type top: int
+ :param include_body: Flag indicating whether or not to return the body
+ of each applicable query. If false, only return the query information.
+ :type include_body: bool
+ :param skip_token: Base64 encoded token used to fetch the next page of
+ items. Default is null.
+ :type skip_token: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of LogAnalyticsQueryPackQuery
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQueryPaged[~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuery]
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+ if include_body is not None:
+ query_parameters['includeBody'] = self._serialize.query("include_body", include_body, 'bool')
+ if skip_token is not None:
+ query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.LogAnalyticsQueryPackQueryPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries'}
+
+ def search(
+ self, resource_group_name, query_pack_name, query_search_properties, top=None, include_body=None, skip_token=None, custom_headers=None, raw=False, **operation_config):
+ """Search a list of Queries defined within a Log Analytics QueryPack
+ according to given search properties.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param query_pack_name: The name of the Log Analytics QueryPack
+ resource.
+ :type query_pack_name: str
+ :param query_search_properties: Properties by which to search queries
+ in the given Log Analytics QueryPack.
+ :type query_search_properties:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuerySearchProperties
+ :param top: Maximum items returned in page.
+ :type top: int
+ :param include_body: Flag indicating whether or not to return the body
+ of each applicable query. If false, only return the query information.
+ :type include_body: bool
+ :param skip_token: Base64 encoded token used to fetch the next page of
+ items. Default is null.
+ :type skip_token: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of LogAnalyticsQueryPackQuery
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQueryPaged[~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuery]
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.search.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+ if top is not None:
+ query_parameters['$top'] = self._serialize.query("top", top, 'int')
+ if include_body is not None:
+ query_parameters['includeBody'] = self._serialize.query("include_body", include_body, 'bool')
+ if skip_token is not None:
+ query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str')
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(query_search_properties, 'LogAnalyticsQueryPackQuerySearchProperties')
+
+ # Construct and send request
+ request = self._client.post(url, query_parameters, header_parameters, body_content)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.LogAnalyticsQueryPackQueryPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ search.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/search'}
+
+ def get(
+ self, resource_group_name, query_pack_name, query_id, custom_headers=None, raw=False, **operation_config):
+ """Gets a specific Log Analytics Query defined within a Log Analytics
+ QueryPack.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param query_pack_name: The name of the Log Analytics QueryPack
+ resource.
+ :type query_pack_name: str
+ :param query_id: The id of a specific query defined in the Log
+ Analytics QueryPack
+ :type query_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: LogAnalyticsQueryPackQuery or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuery
+ or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str'),
+ 'queryId': self._serialize.url("query_id", query_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('LogAnalyticsQueryPackQuery', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/{queryId}'}
+
+ def put(
+ self, resource_group_name, query_pack_name, query_id, query_payload, custom_headers=None, raw=False, **operation_config):
+ """Adds or Updates a specific Query within a Log Analytics QueryPack.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param query_pack_name: The name of the Log Analytics QueryPack
+ resource.
+ :type query_pack_name: str
+ :param query_id: The id of a specific query defined in the Log
+ Analytics QueryPack
+ :type query_id: str
+ :param query_payload: Properties that need to be specified to create a
+ new query and add it to a Log Analytics QueryPack.
+ :type query_payload:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuery
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: LogAnalyticsQueryPackQuery or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackQuery
+ or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ # Construct URL
+ url = self.put.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str'),
+ 'queryId': self._serialize.url("query_id", query_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(query_payload, 'LogAnalyticsQueryPackQuery')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('LogAnalyticsQueryPackQuery', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/{queryId}'}
+
+ def delete(
+ self, resource_group_name, query_pack_name, query_id, custom_headers=None, raw=False, **operation_config):
+ """Deletes a specific Query defined within an Log Analytics QueryPack.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param query_pack_name: The name of the Log Analytics QueryPack
+ resource.
+ :type query_pack_name: str
+ :param query_id: The id of a specific query defined in the Log
+ Analytics QueryPack
+ :type query_id: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str'),
+ 'queryId': self._serialize.url("query_id", query_id, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 204]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}/queries/{queryId}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/operations/_query_packs_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/operations/_query_packs_operations.py
new file mode 100644
index 00000000000..3eaaddab0ae
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/operations/_query_packs_operations.py
@@ -0,0 +1,437 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+
+from .. import models
+
+
+class QueryPacksOperations(object):
+ """QueryPacksOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2019-09-01-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2019-09-01-preview"
+
+ self.config = config
+
+ def list(
+ self, custom_headers=None, raw=False, **operation_config):
+ """Gets a list of all Log Analytics QueryPacks within a subscription.
+
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of LogAnalyticsQueryPack
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackPaged[~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPack]
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.LogAnalyticsQueryPackPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/queryPacks'}
+
+ def list_by_resource_group(
+ self, resource_group_name, custom_headers=None, raw=False, **operation_config):
+ """Gets a list of Log Analytics QueryPacks within a resource group.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of LogAnalyticsQueryPack
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPackPaged[~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPack]
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1)
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.LogAnalyticsQueryPackPaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks'}
+
+ def delete(
+ self, resource_group_name, query_pack_name, custom_headers=None, raw=False, **operation_config):
+ """Deletes a Log Analytics QueryPack.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param query_pack_name: The name of the Log Analytics QueryPack
+ resource.
+ :type query_pack_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 204]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}'}
+
+ def get(
+ self, resource_group_name, query_pack_name, custom_headers=None, raw=False, **operation_config):
+ """Returns a Log Analytics QueryPack.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param query_pack_name: The name of the Log Analytics QueryPack
+ resource.
+ :type query_pack_name: str
+ :param 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: LogAnalyticsQueryPack or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPack
+ or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('LogAnalyticsQueryPack', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}'}
+
+ def create_or_update(
+ self, resource_group_name, query_pack_name, location, tags=None, custom_headers=None, raw=False, **operation_config):
+ """Creates (or updates) a Log Analytics QueryPack. Note: You cannot
+ specify a different value for InstrumentationKey nor AppId in the Put
+ operation.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param query_pack_name: The name of the Log Analytics QueryPack
+ resource.
+ :type query_pack_name: str
+ :param location: Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, 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: LogAnalyticsQueryPack or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPack
+ or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ log_analytics_query_pack_payload = models.LogAnalyticsQueryPack(location=location, tags=tags)
+
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(log_analytics_query_pack_payload, 'LogAnalyticsQueryPack')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('LogAnalyticsQueryPack', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}'}
+
+ def update_tags(
+ self, resource_group_name, query_pack_name, tags=None, custom_headers=None, raw=False, **operation_config):
+ """Updates an existing QueryPack's tags. To update other fields use the
+ CreateOrUpdate method.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param query_pack_name: The name of the Log Analytics QueryPack
+ resource.
+ :type query_pack_name: str
+ :param tags: Resource tags
+ :type tags: dict[str, 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: LogAnalyticsQueryPack or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_09_01_preview.models.LogAnalyticsQueryPack
+ or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`ErrorResponseException`
+ """
+ query_pack_tags = models.TagsResource(tags=tags)
+
+ # Construct URL
+ url = self.update_tags.metadata['url']
+ path_format_arguments = {
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'queryPackName': self._serialize.url("query_pack_name", query_pack_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(query_pack_tags, 'TagsResource')
+
+ # Construct and send request
+ request = self._client.patch(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.ErrorResponseException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('LogAnalyticsQueryPack', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/queryPacks/{queryPackName}'}
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/version.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/version.py
new file mode 100644
index 00000000000..e8485659e01
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_09_01_preview/version.py
@@ -0,0 +1,13 @@
+# 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 = "2019-09-01-preview"
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/__init__.py
new file mode 100644
index 00000000000..298512941d9
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/__init__.py
@@ -0,0 +1,19 @@
+# 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 ._configuration import ApplicationInsightsManagementClientConfiguration
+from ._application_insights_management_client import ApplicationInsightsManagementClient
+__all__ = ['ApplicationInsightsManagementClient', 'ApplicationInsightsManagementClientConfiguration']
+
+from .version import VERSION
+
+__version__ = VERSION
+
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/_application_insights_management_client.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/_application_insights_management_client.py
new file mode 100644
index 00000000000..bb7008b820a
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/_application_insights_management_client.py
@@ -0,0 +1,49 @@
+# 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 Serializer, Deserializer
+
+from ._configuration import ApplicationInsightsManagementClientConfiguration
+from .operations import WorkbookTemplatesOperations
+from . import models
+
+
+class ApplicationInsightsManagementClient(SDKClient):
+ """Composite Swagger for Application Insights Management Client
+
+ :ivar config: Configuration for client.
+ :vartype config: ApplicationInsightsManagementClientConfiguration
+
+ :ivar workbook_templates: WorkbookTemplates operations
+ :vartype workbook_templates: azure.mgmt.applicationinsights.v2019_10_17_preview.operations.WorkbookTemplatesOperations
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ self.config = ApplicationInsightsManagementClientConfiguration(credentials, subscription_id, base_url)
+ super(ApplicationInsightsManagementClient, 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 = '2019-10-17-preview'
+ self._serialize = Serializer(client_models)
+ self._deserialize = Deserializer(client_models)
+
+ self.workbook_templates = WorkbookTemplatesOperations(
+ self._client, self.config, self._serialize, self._deserialize)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/_configuration.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/_configuration.py
new file mode 100644
index 00000000000..6c855295a4b
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/_configuration.py
@@ -0,0 +1,48 @@
+# 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 msrestazure import AzureConfiguration
+
+from .version import VERSION
+
+
+class ApplicationInsightsManagementClientConfiguration(AzureConfiguration):
+ """Configuration for ApplicationInsightsManagementClient
+ Note that all parameters used to create this instance are saved as instance
+ attributes.
+
+ :param credentials: Credentials needed for the client to connect to Azure.
+ :type credentials: :mod:`A msrestazure Credentials
+ object`
+ :param subscription_id: The ID of the target subscription.
+ :type subscription_id: str
+ :param str base_url: Service URL
+ """
+
+ def __init__(
+ self, credentials, subscription_id, base_url=None):
+
+ if credentials is None:
+ raise ValueError("Parameter 'credentials' must not be None.")
+ if subscription_id is None:
+ raise ValueError("Parameter 'subscription_id' must not be None.")
+ if not base_url:
+ base_url = 'https://management.azure.com'
+
+ super(ApplicationInsightsManagementClientConfiguration, self).__init__(base_url)
+
+ # Starting Autorest.Python 4.0.64, make connection pool activated by default
+ self.keep_alive = True
+
+ self.add_user_agent('azure-mgmt-applicationinsights/{}'.format(VERSION))
+ self.add_user_agent('Azure-SDK-For-Python')
+
+ self.credentials = credentials
+ self.subscription_id = subscription_id
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/__init__.py
new file mode 100644
index 00000000000..99e1f673930
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/__init__.py
@@ -0,0 +1,39 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+try:
+ from ._models_py3 import ErrorFieldContract
+ from ._models_py3 import WorkbookError, WorkbookErrorException
+ from ._models_py3 import WorkbookTemplate
+ from ._models_py3 import WorkbookTemplateGallery
+ from ._models_py3 import WorkbookTemplateLocalizedGallery
+ from ._models_py3 import WorkbookTemplateResource
+ from ._models_py3 import WorkbookTemplateUpdateParameters
+except (SyntaxError, ImportError):
+ from ._models import ErrorFieldContract
+ from ._models import WorkbookError, WorkbookErrorException
+ from ._models import WorkbookTemplate
+ from ._models import WorkbookTemplateGallery
+ from ._models import WorkbookTemplateLocalizedGallery
+ from ._models import WorkbookTemplateResource
+ from ._models import WorkbookTemplateUpdateParameters
+from ._paged_models import WorkbookTemplatePaged
+
+__all__ = [
+ 'ErrorFieldContract',
+ 'WorkbookError', 'WorkbookErrorException',
+ 'WorkbookTemplate',
+ 'WorkbookTemplateGallery',
+ 'WorkbookTemplateLocalizedGallery',
+ 'WorkbookTemplateResource',
+ 'WorkbookTemplateUpdateParameters',
+ 'WorkbookTemplatePaged',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/_models.py
new file mode 100644
index 00000000000..16880297700
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/_models.py
@@ -0,0 +1,296 @@
+# 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 CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ErrorFieldContract(Model):
+ """Error Field contract.
+
+ :param code: Property level error code.
+ :type code: str
+ :param message: Human-readable representation of property-level error.
+ :type message: str
+ :param target: Property name.
+ :type target: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ErrorFieldContract, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.target = kwargs.get('target', None)
+
+
+class WorkbookError(Model):
+ """Error message body that will indicate why the operation failed.
+
+ :param code: Service-defined error code. This code serves as a sub-status
+ for the HTTP error code specified in the response.
+ :type code: str
+ :param message: Human-readable representation of the error.
+ :type message: str
+ :param details: The list of invalid fields send in request, in case of
+ validation error.
+ :type details:
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.ErrorFieldContract]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorFieldContract]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookError, self).__init__(**kwargs)
+ self.code = kwargs.get('code', None)
+ self.message = kwargs.get('message', None)
+ self.details = kwargs.get('details', None)
+
+
+class WorkbookErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'WorkbookError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args)
+
+
+class WorkbookTemplateResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name.
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookTemplateResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = kwargs.get('location', None)
+ self.tags = kwargs.get('tags', None)
+
+
+class WorkbookTemplate(WorkbookTemplateResource):
+ """An Application Insights workbook template definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name.
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param priority: Priority of the template. Determines which template to
+ open when a workbook gallery is opened in viewer mode.
+ :type priority: int
+ :param author: Information about the author of the workbook template.
+ :type author: str
+ :param template_data: Required. Valid JSON object containing workbook
+ template payload.
+ :type template_data: object
+ :param galleries: Required. Workbook galleries supported by the template.
+ :type galleries:
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateGallery]
+ :param localized: Key value pair of localized gallery. Each key is the
+ locale code of languages supported by the Azure portal.
+ :type localized: dict[str,
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateLocalizedGallery]]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'template_data': {'required': True},
+ 'galleries': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'priority': {'key': 'properties.priority', 'type': 'int'},
+ 'author': {'key': 'properties.author', 'type': 'str'},
+ 'template_data': {'key': 'properties.templateData', 'type': 'object'},
+ 'galleries': {'key': 'properties.galleries', 'type': '[WorkbookTemplateGallery]'},
+ 'localized': {'key': 'properties.localized', 'type': '{[WorkbookTemplateLocalizedGallery]}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookTemplate, self).__init__(**kwargs)
+ self.priority = kwargs.get('priority', None)
+ self.author = kwargs.get('author', None)
+ self.template_data = kwargs.get('template_data', None)
+ self.galleries = kwargs.get('galleries', None)
+ self.localized = kwargs.get('localized', None)
+
+
+class WorkbookTemplateGallery(Model):
+ """Gallery information for a workbook template.
+
+ :param name: Name of the workbook template in the gallery.
+ :type name: str
+ :param category: Category for the gallery.
+ :type category: str
+ :param type: Type of workbook supported by the workbook template.
+ :type type: str
+ :param order: Order of the template within the gallery.
+ :type order: int
+ :param resource_type: Azure resource type supported by the gallery.
+ :type resource_type: str
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'category': {'key': 'category', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'order': {'key': 'order', 'type': 'int'},
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookTemplateGallery, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.category = kwargs.get('category', None)
+ self.type = kwargs.get('type', None)
+ self.order = kwargs.get('order', None)
+ self.resource_type = kwargs.get('resource_type', None)
+
+
+class WorkbookTemplateLocalizedGallery(Model):
+ """Localized template data and gallery information.
+
+ :param template_data: Valid JSON object containing workbook template
+ payload.
+ :type template_data: object
+ :param galleries: Workbook galleries supported by the template.
+ :type galleries:
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateGallery]
+ """
+
+ _attribute_map = {
+ 'template_data': {'key': 'templateData', 'type': 'object'},
+ 'galleries': {'key': 'galleries', 'type': '[WorkbookTemplateGallery]'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookTemplateLocalizedGallery, self).__init__(**kwargs)
+ self.template_data = kwargs.get('template_data', None)
+ self.galleries = kwargs.get('galleries', None)
+
+
+class WorkbookTemplateUpdateParameters(Model):
+ """The parameters that can be provided when updating workbook template.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param priority: Priority of the template. Determines which template to
+ open when a workbook gallery is opened in viewer mode.
+ :type priority: int
+ :param author: Information about the author of the workbook template.
+ :type author: str
+ :param template_data: Required. Valid JSON object containing workbook
+ template payload.
+ :type template_data: object
+ :param galleries: Required. Workbook galleries supported by the template.
+ :type galleries:
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateGallery]
+ :param localized: Key value pair of localized gallery. Each key is the
+ locale code of languages supported by the Azure portal.
+ :type localized: dict[str,
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateLocalizedGallery]]
+ """
+
+ _validation = {
+ 'template_data': {'required': True},
+ 'galleries': {'required': True},
+ }
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'priority': {'key': 'properties.priority', 'type': 'int'},
+ 'author': {'key': 'properties.author', 'type': 'str'},
+ 'template_data': {'key': 'properties.templateData', 'type': 'object'},
+ 'galleries': {'key': 'properties.galleries', 'type': '[WorkbookTemplateGallery]'},
+ 'localized': {'key': 'properties.localized', 'type': '{[WorkbookTemplateLocalizedGallery]}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(WorkbookTemplateUpdateParameters, self).__init__(**kwargs)
+ self.tags = kwargs.get('tags', None)
+ self.priority = kwargs.get('priority', None)
+ self.author = kwargs.get('author', None)
+ self.template_data = kwargs.get('template_data', None)
+ self.galleries = kwargs.get('galleries', None)
+ self.localized = kwargs.get('localized', None)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/_models_py3.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/_models_py3.py
new file mode 100644
index 00000000000..6fcea9531a0
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/_models_py3.py
@@ -0,0 +1,296 @@
+# 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 CloudError(Model):
+ """CloudError.
+ """
+
+ _attribute_map = {
+ }
+
+
+class ErrorFieldContract(Model):
+ """Error Field contract.
+
+ :param code: Property level error code.
+ :type code: str
+ :param message: Human-readable representation of property-level error.
+ :type message: str
+ :param target: Property name.
+ :type target: str
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'target': {'key': 'target', 'type': 'str'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, target: str=None, **kwargs) -> None:
+ super(ErrorFieldContract, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.target = target
+
+
+class WorkbookError(Model):
+ """Error message body that will indicate why the operation failed.
+
+ :param code: Service-defined error code. This code serves as a sub-status
+ for the HTTP error code specified in the response.
+ :type code: str
+ :param message: Human-readable representation of the error.
+ :type message: str
+ :param details: The list of invalid fields send in request, in case of
+ validation error.
+ :type details:
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.ErrorFieldContract]
+ """
+
+ _attribute_map = {
+ 'code': {'key': 'code', 'type': 'str'},
+ 'message': {'key': 'message', 'type': 'str'},
+ 'details': {'key': 'details', 'type': '[ErrorFieldContract]'},
+ }
+
+ def __init__(self, *, code: str=None, message: str=None, details=None, **kwargs) -> None:
+ super(WorkbookError, self).__init__(**kwargs)
+ self.code = code
+ self.message = message
+ self.details = details
+
+
+class WorkbookErrorException(HttpOperationError):
+ """Server responsed with exception of type: 'WorkbookError'.
+
+ :param deserialize: A deserializer
+ :param response: Server response to be deserialized.
+ """
+
+ def __init__(self, deserialize, response, *args):
+
+ super(WorkbookErrorException, self).__init__(deserialize, response, 'WorkbookError', *args)
+
+
+class WorkbookTemplateResource(Model):
+ """An azure resource object.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name.
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ }
+
+ def __init__(self, *, location: str, tags=None, **kwargs) -> None:
+ super(WorkbookTemplateResource, self).__init__(**kwargs)
+ self.id = None
+ self.name = None
+ self.type = None
+ self.location = location
+ self.tags = tags
+
+
+class WorkbookTemplate(WorkbookTemplateResource):
+ """An Application Insights workbook template definition.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :ivar id: Azure resource Id
+ :vartype id: str
+ :ivar name: Azure resource name.
+ :vartype name: str
+ :ivar type: Azure resource type
+ :vartype type: str
+ :param location: Required. Resource location
+ :type location: str
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param priority: Priority of the template. Determines which template to
+ open when a workbook gallery is opened in viewer mode.
+ :type priority: int
+ :param author: Information about the author of the workbook template.
+ :type author: str
+ :param template_data: Required. Valid JSON object containing workbook
+ template payload.
+ :type template_data: object
+ :param galleries: Required. Workbook galleries supported by the template.
+ :type galleries:
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateGallery]
+ :param localized: Key value pair of localized gallery. Each key is the
+ locale code of languages supported by the Azure portal.
+ :type localized: dict[str,
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateLocalizedGallery]]
+ """
+
+ _validation = {
+ 'id': {'readonly': True},
+ 'name': {'readonly': True},
+ 'type': {'readonly': True},
+ 'location': {'required': True},
+ 'template_data': {'required': True},
+ 'galleries': {'required': True},
+ }
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ 'name': {'key': 'name', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'location': {'key': 'location', 'type': 'str'},
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'priority': {'key': 'properties.priority', 'type': 'int'},
+ 'author': {'key': 'properties.author', 'type': 'str'},
+ 'template_data': {'key': 'properties.templateData', 'type': 'object'},
+ 'galleries': {'key': 'properties.galleries', 'type': '[WorkbookTemplateGallery]'},
+ 'localized': {'key': 'properties.localized', 'type': '{[WorkbookTemplateLocalizedGallery]}'},
+ }
+
+ def __init__(self, *, location: str, template_data, galleries, tags=None, priority: int=None, author: str=None, localized=None, **kwargs) -> None:
+ super(WorkbookTemplate, self).__init__(location=location, tags=tags, **kwargs)
+ self.priority = priority
+ self.author = author
+ self.template_data = template_data
+ self.galleries = galleries
+ self.localized = localized
+
+
+class WorkbookTemplateGallery(Model):
+ """Gallery information for a workbook template.
+
+ :param name: Name of the workbook template in the gallery.
+ :type name: str
+ :param category: Category for the gallery.
+ :type category: str
+ :param type: Type of workbook supported by the workbook template.
+ :type type: str
+ :param order: Order of the template within the gallery.
+ :type order: int
+ :param resource_type: Azure resource type supported by the gallery.
+ :type resource_type: str
+ """
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'category': {'key': 'category', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
+ 'order': {'key': 'order', 'type': 'int'},
+ 'resource_type': {'key': 'resourceType', 'type': 'str'},
+ }
+
+ def __init__(self, *, name: str=None, category: str=None, type: str=None, order: int=None, resource_type: str=None, **kwargs) -> None:
+ super(WorkbookTemplateGallery, self).__init__(**kwargs)
+ self.name = name
+ self.category = category
+ self.type = type
+ self.order = order
+ self.resource_type = resource_type
+
+
+class WorkbookTemplateLocalizedGallery(Model):
+ """Localized template data and gallery information.
+
+ :param template_data: Valid JSON object containing workbook template
+ payload.
+ :type template_data: object
+ :param galleries: Workbook galleries supported by the template.
+ :type galleries:
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateGallery]
+ """
+
+ _attribute_map = {
+ 'template_data': {'key': 'templateData', 'type': 'object'},
+ 'galleries': {'key': 'galleries', 'type': '[WorkbookTemplateGallery]'},
+ }
+
+ def __init__(self, *, template_data=None, galleries=None, **kwargs) -> None:
+ super(WorkbookTemplateLocalizedGallery, self).__init__(**kwargs)
+ self.template_data = template_data
+ self.galleries = galleries
+
+
+class WorkbookTemplateUpdateParameters(Model):
+ """The parameters that can be provided when updating workbook template.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param tags: Resource tags
+ :type tags: dict[str, str]
+ :param priority: Priority of the template. Determines which template to
+ open when a workbook gallery is opened in viewer mode.
+ :type priority: int
+ :param author: Information about the author of the workbook template.
+ :type author: str
+ :param template_data: Required. Valid JSON object containing workbook
+ template payload.
+ :type template_data: object
+ :param galleries: Required. Workbook galleries supported by the template.
+ :type galleries:
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateGallery]
+ :param localized: Key value pair of localized gallery. Each key is the
+ locale code of languages supported by the Azure portal.
+ :type localized: dict[str,
+ list[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateLocalizedGallery]]
+ """
+
+ _validation = {
+ 'template_data': {'required': True},
+ 'galleries': {'required': True},
+ }
+
+ _attribute_map = {
+ 'tags': {'key': 'tags', 'type': '{str}'},
+ 'priority': {'key': 'properties.priority', 'type': 'int'},
+ 'author': {'key': 'properties.author', 'type': 'str'},
+ 'template_data': {'key': 'properties.templateData', 'type': 'object'},
+ 'galleries': {'key': 'properties.galleries', 'type': '[WorkbookTemplateGallery]'},
+ 'localized': {'key': 'properties.localized', 'type': '{[WorkbookTemplateLocalizedGallery]}'},
+ }
+
+ def __init__(self, *, template_data, galleries, tags=None, priority: int=None, author: str=None, localized=None, **kwargs) -> None:
+ super(WorkbookTemplateUpdateParameters, self).__init__(**kwargs)
+ self.tags = tags
+ self.priority = priority
+ self.author = author
+ self.template_data = template_data
+ self.galleries = galleries
+ self.localized = localized
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/_paged_models.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/_paged_models.py
new file mode 100644
index 00000000000..b521e3aeb23
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/models/_paged_models.py
@@ -0,0 +1,27 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+from msrest.paging import Paged
+
+
+class WorkbookTemplatePaged(Paged):
+ """
+ A paging container for iterating over a list of :class:`WorkbookTemplate ` object
+ """
+
+ _attribute_map = {
+ 'next_link': {'key': 'nextLink', 'type': 'str'},
+ 'current_page': {'key': 'value', 'type': '[WorkbookTemplate]'}
+ }
+
+ def __init__(self, *args, **kwargs):
+
+ super(WorkbookTemplatePaged, self).__init__(*args, **kwargs)
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/operations/__init__.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/operations/__init__.py
new file mode 100644
index 00000000000..13a3437c8d3
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/operations/__init__.py
@@ -0,0 +1,16 @@
+# 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 ._workbook_templates_operations import WorkbookTemplatesOperations
+
+__all__ = [
+ 'WorkbookTemplatesOperations',
+]
diff --git a/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/operations/_workbook_templates_operations.py b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/operations/_workbook_templates_operations.py
new file mode 100644
index 00000000000..17066285b1a
--- /dev/null
+++ b/src/application-insights/azext_applicationinsights/vendored_sdks/mgmt_applicationinsights/v2019_10_17_preview/operations/_workbook_templates_operations.py
@@ -0,0 +1,372 @@
+# coding=utf-8
+# --------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+#
+# Code generated by Microsoft (R) AutoRest Code Generator.
+# Changes may cause incorrect behavior and will be lost if the code is
+# regenerated.
+# --------------------------------------------------------------------------
+
+import uuid
+from msrest.pipeline import ClientRawResponse
+
+from .. import models
+
+
+class WorkbookTemplatesOperations(object):
+ """WorkbookTemplatesOperations operations.
+
+ You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.
+
+ :param client: Client for service requests.
+ :param config: Configuration of service client.
+ :param serializer: An object model serializer.
+ :param deserializer: An object model deserializer.
+ :ivar api_version: The API version to use for this operation. Constant value: "2019-10-17-preview".
+ """
+
+ models = models
+
+ def __init__(self, client, config, serializer, deserializer):
+
+ self._client = client
+ self._serialize = serializer
+ self._deserialize = deserializer
+ self.api_version = "2019-10-17-preview"
+
+ self.config = config
+
+ def list_by_resource_group(
+ self, resource_group_name, custom_headers=None, raw=False, **operation_config):
+ """Get all Workbook templates defined within a specified resource group.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: An iterator like instance of WorkbookTemplate
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplatePaged[~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplate]
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ def prepare_request(next_link=None):
+ if not next_link:
+ # Construct URL
+ url = self.list_by_resource_group.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ else:
+ url = next_link
+ query_parameters = {}
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ return request
+
+ def internal_paging(next_link=None):
+ request = prepare_request(next_link)
+
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ return response
+
+ # Deserialize response
+ header_dict = None
+ if raw:
+ header_dict = {}
+ deserialized = models.WorkbookTemplatePaged(internal_paging, self._deserialize.dependencies, header_dict)
+
+ return deserialized
+ list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooktemplates'}
+
+ def get(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Get a single workbook template by its resourceName.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: WorkbookTemplate or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplate
+ or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.get.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.get(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('WorkbookTemplate', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'}
+
+ def delete(
+ self, resource_group_name, resource_name, custom_headers=None, raw=False, **operation_config):
+ """Delete a workbook template.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param dict custom_headers: headers that will be added to the request
+ :param bool raw: returns the direct response alongside the
+ deserialized response
+ :param operation_config: :ref:`Operation configuration
+ overrides`.
+ :return: None or ClientRawResponse if raw=true
+ :rtype: None or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.delete.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct and send request
+ request = self._client.delete(url, query_parameters, header_parameters)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 204]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(None, response)
+ return client_raw_response
+ delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'}
+
+ def create_or_update(
+ self, resource_group_name, resource_name, workbook_template_properties, custom_headers=None, raw=False, **operation_config):
+ """Create a new workbook template.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param workbook_template_properties: Properties that need to be
+ specified to create a new workbook.
+ :type workbook_template_properties:
+ ~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplate
+ :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: WorkbookTemplate or ClientRawResponse if raw=true
+ :rtype:
+ ~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplate
+ or ~msrest.pipeline.ClientRawResponse
+ :raises:
+ :class:`WorkbookErrorException`
+ """
+ # Construct URL
+ url = self.create_or_update.metadata['url']
+ path_format_arguments = {
+ 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str', min_length=1),
+ 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'),
+ 'resourceName': self._serialize.url("resource_name", resource_name, 'str')
+ }
+ url = self._client.format_url(url, **path_format_arguments)
+
+ # Construct parameters
+ query_parameters = {}
+ query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str', min_length=1)
+
+ # Construct headers
+ header_parameters = {}
+ header_parameters['Accept'] = 'application/json'
+ header_parameters['Content-Type'] = 'application/json; charset=utf-8'
+ if self.config.generate_client_request_id:
+ header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
+ if custom_headers:
+ header_parameters.update(custom_headers)
+ if self.config.accept_language is not None:
+ header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')
+
+ # Construct body
+ body_content = self._serialize.body(workbook_template_properties, 'WorkbookTemplate')
+
+ # Construct and send request
+ request = self._client.put(url, query_parameters, header_parameters, body_content)
+ response = self._client.send(request, stream=False, **operation_config)
+
+ if response.status_code not in [200, 201]:
+ raise models.WorkbookErrorException(self._deserialize, response)
+
+ deserialized = None
+ if response.status_code == 200:
+ deserialized = self._deserialize('WorkbookTemplate', response)
+ if response.status_code == 201:
+ deserialized = self._deserialize('WorkbookTemplate', response)
+
+ if raw:
+ client_raw_response = ClientRawResponse(deserialized, response)
+ return client_raw_response
+
+ return deserialized
+ create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroup/{resourceGroupName}/providers/microsoft.insights/workbooktemplates/{resourceName}'}
+
+ def update(
+ self, resource_group_name, resource_name, workbook_template_update_parameters=None, custom_headers=None, raw=False, **operation_config):
+ """Updates a workbook template that has already been added.
+
+ :param resource_group_name: The name of the resource group. The name
+ is case insensitive.
+ :type resource_group_name: str
+ :param resource_name: The name of the Application Insights component
+ resource.
+ :type resource_name: str
+ :param workbook_template_update_parameters: Properties that need to be
+ specified to patch a workbook template.
+ :type workbook_template_update_parameters:
+ ~azure.mgmt.applicationinsights.v2019_10_17_preview.models.WorkbookTemplateUpdateParameters
+ :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