diff --git a/.flake8 b/.flake8
index f8c74e6dcd0..03a6220dd4f 100644
--- a/.flake8
+++ b/.flake8
@@ -14,4 +14,4 @@ exclude =
scripts
doc
build_scripts
-
\ No newline at end of file
+ */grammar/
\ No newline at end of file
diff --git a/azure-cli2017.pyproj b/azure-cli2017.pyproj
index 4a0208e55e4..cd5c5e541d6 100644
--- a/azure-cli2017.pyproj
+++ b/azure-cli2017.pyproj
@@ -26,6 +26,7 @@
+
@@ -46,6 +47,7 @@
+
@@ -69,6 +71,7 @@
+
@@ -405,6 +408,14 @@
+
+
+
+
+
+
+
+
@@ -480,6 +491,11 @@
+
+
+
+
+
@@ -507,7 +523,6 @@
-
@@ -936,6 +951,13 @@
+
+
+
+
+
+
+
@@ -984,6 +1006,7 @@
+
@@ -1228,6 +1251,7 @@
+
@@ -1244,15 +1268,15 @@
+
+
+
Code
-
-
-
diff --git a/src/azure-cli-core/setup.py b/src/azure-cli-core/setup.py
index 63e728aa1f1..929fcafd4e9 100644
--- a/src/azure-cli-core/setup.py
+++ b/src/azure-cli-core/setup.py
@@ -83,6 +83,11 @@
DEPENDENCIES.append('ndg-httpsclient')
DEPENDENCIES.append('pyasn1')
+if sys.version_info < (3, 0):
+ DEPENDENCIES.append('antlr4-python2-runtime')
+else:
+ DEPENDENCIES.append('antlr4-python3-runtime')
+
with open('README.rst', 'r', encoding='utf-8') as f:
README = f.read()
with open('HISTORY.rst', 'r', encoding='utf-8') as f:
diff --git a/src/command_modules/azure-cli-monitor/HISTORY.rst b/src/command_modules/azure-cli-monitor/HISTORY.rst
index eaebe9a5ca1..70992518adb 100644
--- a/src/command_modules/azure-cli-monitor/HISTORY.rst
+++ b/src/command_modules/azure-cli-monitor/HISTORY.rst
@@ -5,7 +5,8 @@ Release History
0.2.3
+++++
-* Minor fixes
+* Added `monitor metrics alert` commands for near-realtime metric alerts.
+* Deprecated `monitor alert` commands.
0.2.2
+++++
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_client_factory.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_client_factory.py
index bec07944f00..b9875b03dd6 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_client_factory.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_client_factory.py
@@ -53,3 +53,7 @@ def cf_activity_log(cli_ctx, _):
def cf_event_categories(cli_ctx, _):
return cf_monitor(cli_ctx, _).event_categories
+
+
+def cf_metric_alerts(cli_ctx, _):
+ return cf_monitor(cli_ctx, _).metric_alerts
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_exception_handler.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_exception_handler.py
index f1a15e777cf..48036bc7620 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_exception_handler.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_exception_handler.py
@@ -12,6 +12,8 @@ def monitor_exception_handler(ex):
# work around for issue: https://github.com/Azure/azure-sdk-for-python/issues/1556
error_payload = ex.response.json()
error_payload = {k.lower(): v for k, v in error_payload.items()}
+ if 'error' in error_payload:
+ error_payload = error_payload['error']
if 'code' in error_payload and 'message' in error_payload:
message = '{}.'.format(error_payload['message']) if error_payload['message'] else 'Operation failed.'
code = '[Code: "{}"]'.format(error_payload['code']) if error_payload['code'] else ''
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py
index 3686214772e..7e74c25a994 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_help.py
@@ -194,7 +194,95 @@
short-summary: Lists the metric definitions for the resource.
"""
-# endregion
+helps['monitor metrics alert'] = """
+ type: group
+ short-summary: Manage near-realtime metric alert rules.
+"""
+
+helps['monitor metrics alert create'] = """
+ type: command
+ short-summary: Create an alert rule.
+ parameters:
+ - name: --action -a
+ short-summary: Add an action group and optional webhook properties to fire when the alert is triggered.
+ long-summary: |
+ Usage: --action ACTION_GROUP_NAME_OR_ID [KEY=VAL [KEY=VAL ...]]
+
+ Multiple action groups can be specified by using more than one `--action` argument.
+ - name: --disabled
+ short-summary: Create the rule in a disabled state.
+ - name: --condition
+ short-summary: The condition which triggers the rule.
+ long-summary: |
+ Usage: --conditon {avg,min,max,total} [NAMESPACE.]METRIC {=,!=,>,>=,<,<=} THRESHOLD
+ [where DIMENSION {includes,excludes} VALUE [or VALUE ...]
+ [and DIMENSION {includes,excludes} VALUE [or VALUE ...] ...]]
+
+ Dimensions can be queried by adding the 'where' keyword and multiple dimensions can be queried by combining them with the 'and' keyword.
+
+ Values for METRIC, DIMENSION and appropriate THRESHOLD values can be obtained from `az monitor metrics list-definition` command.
+
+ Multiple conditons can be specified by using more than one `--condition` argument.
+ examples:
+ - name: Create a high CPU usage alert on a VM with no actions.
+ text: >
+ az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} --condition "avg Percentage CPU > 90"
+ - name: Create a high CPU usage alert on a VM with email and webhook actions.
+ text: |
+ az monitor metrics alert create -n alert1 -g {ResourceGroup} --scopes {VirtualMachineID} \\
+ --condition "avg Percentage CPU > 90" --window-size 5m --evaluation-frequency 1m \\
+ --action {actionGroupId} apiKey={APIKey} type=HighCPU
+ - name: Create an alert when a storage account shows a high number of slow transactions, using multi-dimensional filters.
+ text: |
+ az monitor metrics alert create -g {ResourceGroup} -n alert1 --scopes {StorageAccountId} \\
+ --description "Storage Slow Transactions" \\
+ --condition "total transactions > 5 where ResponseType includes Success" \\
+ --condition "avg SuccessE2ELatency > 250 where ApiName includes GetBlob or PutBlob"
+"""
+
+
+helps['monitor metrics alert update'] = """
+ type: command
+ short-summary: Update an alert rule.
+ parameters:
+ - name: --add-condition
+ short-summary: Add a condition which triggers the rule.
+ long-summary: |
+ Usage: --add-conditon {avg,min,max,total} [NAMESPACE.]METRIC {=,!=,>,>=,<,<=} THRESHOLD
+ [where DIMENSION {includes,excludes} VALUE [or VALUE ...]
+ [and DIMENSION {includes,excludes} VALUE [or VALUE ...] ...]]
+
+ Dimensions can be queried by adding the 'where' keyword and multiple dimensions can be queried by combining them with the 'and' keyword.
+
+ Values for METRIC, DIMENSION and appropriate THRESHOLD values can be obtained from `az monitor metrics list-definition` command.
+
+ Multiple conditons can be specified by using more than one `--condition` argument.
+ - name: --remove-conditions
+ short-summary: Space-separated list of condition names to remove.
+ - name: --add-action
+ short-summary: Add an action group and optional webhook properties to fire when the alert is triggered.
+ long-summary: |
+ Usage: --add-action ACTION_GROUP_NAME_OR_ID [KEY=VAL [KEY=VAL ...]]
+
+ Multiple action groups can be specified by using more than one `--action` argument.
+ - name: --remove-actions
+ short-summary: Space-separated list of action group names to remove.
+"""
+
+helps['monitor metrics alert delete'] = """
+ type: command
+ short-summary: Delete an alert rule.
+ """
+
+helps['monitor metrics alert list'] = """
+ type: command
+ short-summary: List alert rules.
+ """
+
+helps['monitor metrics alert show'] = """
+ type: command
+ short-summary: Show an alert rule.
+ """
helps['monitor log-profiles'] = """
type: group
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_params.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_params.py
index 728d03fb39b..20795314e4b 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_params.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/_params.py
@@ -14,10 +14,11 @@
from azure.cli.command_modules.monitor.actions import (
AlertAddAction, AlertRemoveAction, ConditionAction, AutoscaleAddAction, AutoscaleRemoveAction,
AutoscaleScaleAction, AutoscaleConditionAction, period_type,
- timezone_offset_type, timezone_name_type)
+ timezone_offset_type, timezone_name_type, MetricAlertConditionAction, MetricAlertAddAction)
from azure.cli.command_modules.monitor.util import get_operator_map, get_aggregation_map
from azure.cli.command_modules.monitor.validators import (
- process_webhook_prop, validate_autoscale_recurrence, validate_autoscale_timegrain)
+ process_webhook_prop, validate_autoscale_recurrence, validate_autoscale_timegrain, get_action_group_validator,
+ get_action_group_id_validator)
# pylint: disable=line-too-long, too-many-statements
@@ -105,6 +106,31 @@ def load_arguments(self, _):
c.ignore('timespan', 'result_type')
# endregion
+ # region MetricAlerts
+ with self.argument_context('monitor metrics alert') as c:
+ c.argument('rule_name', name_arg_type, id_part='name', help='Name of the alert rule.')
+ c.argument('severity', type=int, help='Severity of the alert from 0 (low) to 4 (high).')
+ c.argument('window_size', type=period_type, help='Time over which to aggregate metrics in "##h##m##s" format.')
+ c.argument('evaluation_frequency', type=period_type, help='Frequency with which to evaluate the rule in "##h##m##s" format.')
+ c.argument('auto_mitigate', arg_type=get_three_state_flag(), help='Automatically resolve the alert.')
+ c.argument('condition', options_list=['--condition'], action=MetricAlertConditionAction, nargs='+')
+ c.argument('description', help='Free-text description of the rule.')
+ c.argument('scopes', nargs='+', help='Space-separated list of scopes the rule applies to.')
+ c.argument('disabled', arg_type=get_three_state_flag())
+ c.argument('enabled', arg_type=get_three_state_flag(), help='Whether the metric alert rule is enabled.')
+
+ with self.argument_context('monitor metrics alert create', arg_group=None) as c:
+ c.argument('actions', options_list=['--action', '-a'], action=MetricAlertAddAction, nargs='+', validator=get_action_group_validator('actions'))
+
+ with self.argument_context('monitor metrics alert update', arg_group='Action') as c:
+ c.argument('add_actions', options_list='--add-action', action=MetricAlertAddAction, nargs='+', validator=get_action_group_validator('add_actions'))
+ c.argument('remove_actions', nargs='+', validator=get_action_group_id_validator('remove_actions'))
+
+ with self.argument_context('monitor metrics alert update', arg_group='Condition') as c:
+ c.argument('add_conditions', options_list='--add-condition', action=MetricAlertConditionAction, nargs='+')
+ c.argument('remove_conditions', nargs='+')
+ # endregion
+
# region Autoscale
with self.argument_context('monitor autoscale') as c:
c.argument('autoscale_name', arg_type=autoscale_name_type, options_list=['--name', '-n'])
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/actions.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/actions.py
index 003a7791213..8149258c7c5 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/actions.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/actions.py
@@ -5,6 +5,8 @@
import argparse
+import antlr4
+
from azure.cli.command_modules.monitor.util import (
get_aggregation_map, get_operator_map, get_autoscale_operator_map,
get_autoscale_aggregation_map, get_autoscale_scale_direction_map)
@@ -74,6 +76,41 @@ def _get_substring(indices):
return 'P{}T{}{}{}'.format(days, minutes, hours, seconds).upper()
+# pylint: disable=protected-access, too-few-public-methods
+class MetricAlertConditionAction(argparse._AppendAction):
+
+ def __call__(self, parser, namespace, values, option_string=None):
+ from azure.cli.command_modules.monitor.grammar import (
+ MetricAlertConditionLexer, MetricAlertConditionParser, MetricAlertConditionValidator)
+
+ string_val = ' '.join(values)
+
+ lexer = MetricAlertConditionLexer(antlr4.InputStream(string_val))
+ stream = antlr4.CommonTokenStream(lexer)
+ parser = MetricAlertConditionParser(stream)
+ tree = parser.expression()
+
+ validator = MetricAlertConditionValidator()
+ walker = antlr4.ParseTreeWalker()
+ walker.walk(validator, tree)
+ metric_condition = validator.result()
+ super(MetricAlertConditionAction, self).__call__(parser, namespace, metric_condition, option_string)
+
+
+# pylint: disable=protected-access, too-few-public-methods
+class MetricAlertAddAction(argparse._AppendAction):
+
+ def __call__(self, parser, namespace, values, option_string=None):
+ from azure.mgmt.monitor.models import MetricAlertAction
+ action = MetricAlertAction(
+ action_group_id=values[0],
+ webhook_properties=dict(x.split('=', 1) for x in values[1:]) if len(values) > 1 else None
+ )
+ action.odatatype = 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.' \
+ 'DataContracts.Resources.ScheduledQueryRules.Action'
+ super(MetricAlertAddAction, self).__call__(parser, namespace, action, option_string)
+
+
# pylint: disable=too-few-public-methods
class ConditionAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
@@ -266,15 +303,26 @@ def deserialize_object(self, type_name, type_properties):
class ActionGroupReceiverParameterAction(MultiObjectsDeserializeAction):
def deserialize_object(self, type_name, type_properties):
from azure.mgmt.monitor.models import EmailReceiver, SmsReceiver, WebhookReceiver
+ from knack.util import CLIError
+
if type_name == 'email':
- return EmailReceiver(name=type_properties[0], email_address=type_properties[1])
+ try:
+ return EmailReceiver(name=type_properties[0], email_address=type_properties[1])
+ except IndexError:
+ raise CLIError('usage error: --action email NAME EMAIL_ADDRESS')
elif type_name == 'sms':
- return SmsReceiver(
- name=type_properties[0],
- country_code=type_properties[1],
- phone_number=type_properties[2]
- )
+ try:
+ return SmsReceiver(
+ name=type_properties[0],
+ country_code=type_properties[1],
+ phone_number=type_properties[2]
+ )
+ except IndexError:
+ raise CLIError('usage error: --action sms NAME COUNTRY_CODE PHONE_NUMBER')
elif type_name == 'webhook':
- return WebhookReceiver(name=type_properties[0], service_uri=type_properties[1])
+ try:
+ return WebhookReceiver(name=type_properties[0], service_uri=type_properties[1])
+ except IndexError:
+ raise CLIError('usage error: --action webhook NAME URI')
else:
raise ValueError('usage error: the type "{}" is not recognizable.'.format(type_name))
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py
index 0fe5b19c72c..b28cae5b258 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/commands.py
@@ -11,7 +11,8 @@ def load_command_table(self, _):
from ._client_factory import (
cf_alert_rules, cf_metrics, cf_metric_def, cf_alert_rule_incidents, cf_log_profiles, cf_autoscale,
- cf_diagnostics, cf_activity_log, cf_action_groups, cf_activity_log_alerts, cf_event_categories)
+ cf_diagnostics, cf_activity_log, cf_action_groups, cf_activity_log_alerts, cf_event_categories,
+ cf_metric_alerts)
from ._exception_handler import monitor_exception_handler, missing_resource_handler
from .transformers import (action_group_list_table)
from .validators import process_autoscale_create_namespace
@@ -96,6 +97,11 @@ def load_command_table(self, _):
client_factory=cf_alert_rules,
exception_handler=monitor_exception_handler)
+ metric_alert_sdk = CliCommandType(
+ operations_tmpl='azure.mgmt.monitor.operations.metric_alerts_operations#MetricAlertsOperations.{}',
+ client_factory=cf_metric_alerts,
+ exception_handler=monitor_exception_handler)
+
metric_definitions_sdk = CliCommandType(
operations_tmpl='azure.mgmt.monitor.operations.metric_definitions_operations#MetricDefinitionsOperations.{}',
client_factory=cf_metric_def,
@@ -125,7 +131,7 @@ def load_command_table(self, _):
g.custom_command('scope add', 'add_scope')
g.custom_command('scope remove', 'remove_scope')
- with self.command_group('monitor alert', alert_sdk, custom_command_type=alert_custom) as g:
+ with self.command_group('monitor alert', alert_sdk, custom_command_type=alert_custom, deprecate_info=self.deprecate(redirect='monitor metrics alert', hide='2.0.44')) as g:
g.custom_command('create', 'create_metric_rule')
g.command('delete', 'delete')
g.show_command('show', 'get')
@@ -187,3 +193,10 @@ def load_command_table(self, _):
from .transformers import metrics_table, metrics_definitions_table
g.command('list', 'list', command_type=metric_operations_sdk, table_transformer=metrics_table)
g.command('list-definitions', 'list', command_type=metric_definitions_sdk, table_transformer=metrics_definitions_table)
+
+ with self.command_group('monitor metrics alert', metric_alert_sdk, custom_command_type=alert_custom, client_factory=cf_metric_alerts) as g:
+ g.custom_command('create', 'create_metric_alert', custom_command_type=alert_custom)
+ g.command('delete', 'delete')
+ g.custom_command('list', 'list_metric_alerts', custom_command_type=alert_custom)
+ g.command('show', 'get')
+ g.generic_update_command('update', custom_func_name='update_metric_alert', custom_func_type=alert_custom)
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertCondition.g4 b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertCondition.g4
new file mode 100644
index 00000000000..45b448f064c
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertCondition.g4
@@ -0,0 +1,71 @@
+/* PARSER RULES */
+
+grammar MetricAlertCondition ;
+
+/* Main Rules */
+
+expression : aggregation (namespace '.')* (QUOTE metric QUOTE WHITESPACE | metric) operator threshold (WHITESPACE dimensions)* NEWLINE* ;
+
+aggregation : WORD WHITESPACE ;
+
+namespace : WORD ;
+
+metric : (WORD | WHITESPACE)+;
+
+operator : OPERATOR WHITESPACE ;
+
+threshold : NUMBER ;
+
+/* Dimensions */
+
+where : WHERE WHITESPACE ;
+
+dimensions : where dimension (dim_separator dimension)* ;
+
+dimension : dim_name dim_operator dim_values ;
+
+dim_separator : (AND | ',') WHITESPACE ;
+
+dim_operator : (INCLUDES | EXCLUDES) WHITESPACE ;
+
+dim_val_separator : (OR | ',') WHITESPACE ;
+
+dim_name : WORD WHITESPACE ;
+
+dim_values : dim_value (dim_val_separator dim_value)* ;
+
+dim_value : (NUMBER | WORD | WHITESPACE)+ ;
+
+/* LEXER RULES */
+
+fragment A : ('a'|'A') ;
+fragment C : ('c'|'C') ;
+fragment D : ('d'|'D') ;
+fragment E : ('e'|'E') ;
+fragment H : ('h'|'H') ;
+fragment I : ('i'|'I') ;
+fragment L : ('l'|'L') ;
+fragment N : ('n'|'N') ;
+fragment O : ('o'|'O') ;
+fragment R : ('r'|'R') ;
+fragment S : ('s'|'S') ;
+fragment U : ('u'|'U') ;
+fragment W : ('w'|'W') ;
+fragment X : ('x'|'X') ;
+
+fragment DIGIT : [0-9] ;
+fragment LOWERCASE : [a-z] ;
+fragment UPPERCASE : [A-Z] ;
+
+WHERE : W H E R E ;
+AND : A N D ;
+INCLUDES : I N C L U D E S ;
+EXCLUDES : E X C L U D E S ;
+OR : O R ;
+
+OPERATOR : ('<' | '<=' | '=' | '>=' | '>' | '!=') ;
+NUMBER : DIGIT+ ([.,] DIGIT+)? ;
+QUOTE : ('\'' | '"') ;
+WHITESPACE : (' ' | '\t')+ ;
+NEWLINE : ('\r'? '\n' | '\r')+ ;
+WORD : (LOWERCASE | UPPERCASE | DIGIT | '_')+ ;
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertCondition.tokens b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertCondition.tokens
new file mode 100644
index 00000000000..bb37544df85
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertCondition.tokens
@@ -0,0 +1,15 @@
+T__0=1
+T__1=2
+WHERE=3
+AND=4
+IN=5
+IS=6
+OR=7
+OPERATOR=8
+NUMBER=9
+QUOTE=10
+WHITESPACE=11
+NEWLINE=12
+WORD=13
+'.'=1
+','=2
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionLexer.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionLexer.py
new file mode 100644
index 00000000000..e108494ea7a
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionLexer.py
@@ -0,0 +1,141 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+# pylint: disable=all
+
+# Generated from MetricAlertCondition.g4 by ANTLR 4.7.1
+# encoding: utf-8
+from __future__ import print_function
+from antlr4 import *
+from io import StringIO
+import sys
+
+
+def serializedATN():
+ with StringIO() as buf:
+ buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2")
+ buf.write(u"\17\u00b4\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6")
+ buf.write(u"\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4")
+ buf.write(u"\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t")
+ buf.write(u"\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27")
+ buf.write(u"\4\30\t\30\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4")
+ buf.write(u"\35\t\35\4\36\t\36\4\37\t\37\3\2\3\2\3\3\3\3\3\4\3\4")
+ buf.write(u"\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3\13")
+ buf.write(u"\3\13\3\f\3\f\3\r\3\r\3\16\3\16\3\17\3\17\3\20\3\20\3")
+ buf.write(u"\21\3\21\3\22\3\22\3\23\3\23\3\24\3\24\3\25\3\25\3\25")
+ buf.write(u"\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3")
+ buf.write(u"\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30")
+ buf.write(u"\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\32\3\32\3\32\3")
+ buf.write(u"\32\3\32\3\32\3\32\3\32\3\32\5\32\u008e\n\32\3\33\6\33")
+ buf.write(u"\u0091\n\33\r\33\16\33\u0092\3\33\3\33\6\33\u0097\n\33")
+ buf.write(u"\r\33\16\33\u0098\5\33\u009b\n\33\3\34\3\34\3\35\6\35")
+ buf.write(u"\u00a0\n\35\r\35\16\35\u00a1\3\36\5\36\u00a5\n\36\3\36")
+ buf.write(u"\3\36\6\36\u00a9\n\36\r\36\16\36\u00aa\3\37\3\37\3\37")
+ buf.write(u"\3\37\6\37\u00b1\n\37\r\37\16\37\u00b2\2\2 \3\3\5\4\7")
+ buf.write(u"\2\t\2\13\2\r\2\17\2\21\2\23\2\25\2\27\2\31\2\33\2\35")
+ buf.write(u"\2\37\2!\2#\2%\2\'\2)\5+\6-\7/\b\61\t\63\n\65\13\67\f")
+ buf.write(u"9\r;\16=\17\3\2\26\4\2CCcc\4\2EEee\4\2FFff\4\2GGgg\4")
+ buf.write(u"\2JJjj\4\2KKkk\4\2NNnn\4\2PPpp\4\2QQqq\4\2TTtt\4\2UU")
+ buf.write(u"uu\4\2WWww\4\2YYyy\4\2ZZzz\3\2\62;\3\2c|\3\2C\\\4\2.")
+ buf.write(u".\60\60\4\2$$))\4\2\13\13\"\"\2\u00b2\2\3\3\2\2\2\2\5")
+ buf.write(u"\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2")
+ buf.write(u"\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2")
+ buf.write(u"\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\3?\3\2\2\2\5A\3\2\2")
+ buf.write(u"\2\7C\3\2\2\2\tE\3\2\2\2\13G\3\2\2\2\rI\3\2\2\2\17K\3")
+ buf.write(u"\2\2\2\21M\3\2\2\2\23O\3\2\2\2\25Q\3\2\2\2\27S\3\2\2")
+ buf.write(u"\2\31U\3\2\2\2\33W\3\2\2\2\35Y\3\2\2\2\37[\3\2\2\2!]")
+ buf.write(u"\3\2\2\2#_\3\2\2\2%a\3\2\2\2\'c\3\2\2\2)e\3\2\2\2+k\3")
+ buf.write(u"\2\2\2-o\3\2\2\2/x\3\2\2\2\61\u0081\3\2\2\2\63\u008d")
+ buf.write(u"\3\2\2\2\65\u0090\3\2\2\2\67\u009c\3\2\2\29\u009f\3\2")
+ buf.write(u"\2\2;\u00a8\3\2\2\2=\u00b0\3\2\2\2?@\7\60\2\2@\4\3\2")
+ buf.write(u"\2\2AB\7.\2\2B\6\3\2\2\2CD\t\2\2\2D\b\3\2\2\2EF\t\3\2")
+ buf.write(u"\2F\n\3\2\2\2GH\t\4\2\2H\f\3\2\2\2IJ\t\5\2\2J\16\3\2")
+ buf.write(u"\2\2KL\t\6\2\2L\20\3\2\2\2MN\t\7\2\2N\22\3\2\2\2OP\t")
+ buf.write(u"\b\2\2P\24\3\2\2\2QR\t\t\2\2R\26\3\2\2\2ST\t\n\2\2T\30")
+ buf.write(u"\3\2\2\2UV\t\13\2\2V\32\3\2\2\2WX\t\f\2\2X\34\3\2\2\2")
+ buf.write(u"YZ\t\r\2\2Z\36\3\2\2\2[\\\t\16\2\2\\ \3\2\2\2]^\t\17")
+ buf.write(u"\2\2^\"\3\2\2\2_`\t\20\2\2`$\3\2\2\2ab\t\21\2\2b&\3\2")
+ buf.write(u"\2\2cd\t\22\2\2d(\3\2\2\2ef\5\37\20\2fg\5\17\b\2gh\5")
+ buf.write(u"\r\7\2hi\5\31\r\2ij\5\r\7\2j*\3\2\2\2kl\5\7\4\2lm\5\25")
+ buf.write(u"\13\2mn\5\13\6\2n,\3\2\2\2op\5\21\t\2pq\5\25\13\2qr\5")
+ buf.write(u"\t\5\2rs\5\23\n\2st\5\35\17\2tu\5\13\6\2uv\5\r\7\2vw")
+ buf.write(u"\5\33\16\2w.\3\2\2\2xy\5\r\7\2yz\5!\21\2z{\5\t\5\2{|")
+ buf.write(u"\5\23\n\2|}\5\35\17\2}~\5\13\6\2~\177\5\r\7\2\177\u0080")
+ buf.write(u"\5\33\16\2\u0080\60\3\2\2\2\u0081\u0082\5\27\f\2\u0082")
+ buf.write(u"\u0083\5\31\r\2\u0083\62\3\2\2\2\u0084\u008e\7>\2\2\u0085")
+ buf.write(u"\u0086\7>\2\2\u0086\u008e\7?\2\2\u0087\u008e\7?\2\2\u0088")
+ buf.write(u"\u0089\7@\2\2\u0089\u008e\7?\2\2\u008a\u008e\7@\2\2\u008b")
+ buf.write(u"\u008c\7#\2\2\u008c\u008e\7?\2\2\u008d\u0084\3\2\2\2")
+ buf.write(u"\u008d\u0085\3\2\2\2\u008d\u0087\3\2\2\2\u008d\u0088")
+ buf.write(u"\3\2\2\2\u008d\u008a\3\2\2\2\u008d\u008b\3\2\2\2\u008e")
+ buf.write(u"\64\3\2\2\2\u008f\u0091\5#\22\2\u0090\u008f\3\2\2\2\u0091")
+ buf.write(u"\u0092\3\2\2\2\u0092\u0090\3\2\2\2\u0092\u0093\3\2\2")
+ buf.write(u"\2\u0093\u009a\3\2\2\2\u0094\u0096\t\23\2\2\u0095\u0097")
+ buf.write(u"\5#\22\2\u0096\u0095\3\2\2\2\u0097\u0098\3\2\2\2\u0098")
+ buf.write(u"\u0096\3\2\2\2\u0098\u0099\3\2\2\2\u0099\u009b\3\2\2")
+ buf.write(u"\2\u009a\u0094\3\2\2\2\u009a\u009b\3\2\2\2\u009b\66\3")
+ buf.write(u"\2\2\2\u009c\u009d\t\24\2\2\u009d8\3\2\2\2\u009e\u00a0")
+ buf.write(u"\t\25\2\2\u009f\u009e\3\2\2\2\u00a0\u00a1\3\2\2\2\u00a1")
+ buf.write(u"\u009f\3\2\2\2\u00a1\u00a2\3\2\2\2\u00a2:\3\2\2\2\u00a3")
+ buf.write(u"\u00a5\7\17\2\2\u00a4\u00a3\3\2\2\2\u00a4\u00a5\3\2\2")
+ buf.write(u"\2\u00a5\u00a6\3\2\2\2\u00a6\u00a9\7\f\2\2\u00a7\u00a9")
+ buf.write(u"\7\17\2\2\u00a8\u00a4\3\2\2\2\u00a8\u00a7\3\2\2\2\u00a9")
+ buf.write(u"\u00aa\3\2\2\2\u00aa\u00a8\3\2\2\2\u00aa\u00ab\3\2\2")
+ buf.write(u"\2\u00ab<\3\2\2\2\u00ac\u00b1\5%\23\2\u00ad\u00b1\5\'")
+ buf.write(u"\24\2\u00ae\u00b1\5#\22\2\u00af\u00b1\7a\2\2\u00b0\u00ac")
+ buf.write(u"\3\2\2\2\u00b0\u00ad\3\2\2\2\u00b0\u00ae\3\2\2\2\u00b0")
+ buf.write(u"\u00af\3\2\2\2\u00b1\u00b2\3\2\2\2\u00b2\u00b0\3\2\2")
+ buf.write(u"\2\u00b2\u00b3\3\2\2\2\u00b3>\3\2\2\2\r\2\u008d\u0092")
+ buf.write(u"\u0098\u009a\u00a1\u00a4\u00a8\u00aa\u00b0\u00b2\2")
+ return buf.getvalue()
+
+
+class MetricAlertConditionLexer(Lexer):
+
+ atn = ATNDeserializer().deserialize(serializedATN())
+
+ decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
+
+ T__0 = 1
+ T__1 = 2
+ WHERE = 3
+ AND = 4
+ INCLUDES = 5
+ EXCLUDES = 6
+ OR = 7
+ OPERATOR = 8
+ NUMBER = 9
+ QUOTE = 10
+ WHITESPACE = 11
+ NEWLINE = 12
+ WORD = 13
+
+ channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ]
+
+ modeNames = [ u"DEFAULT_MODE" ]
+
+ literalNames = [ u"",
+ u"'.'", u"','" ]
+
+ symbolicNames = [ u"",
+ u"WHERE", u"AND", u"INCLUDES", u"EXCLUDES", u"OR", u"OPERATOR",
+ u"NUMBER", u"QUOTE", u"WHITESPACE", u"NEWLINE", u"WORD" ]
+
+ ruleNames = [ u"T__0", u"T__1", u"A", u"C", u"D", u"E", u"H", u"I",
+ u"L", u"N", u"O", u"R", u"S", u"U", u"W", u"X", u"DIGIT",
+ u"LOWERCASE", u"UPPERCASE", u"WHERE", u"AND", u"INCLUDES",
+ u"EXCLUDES", u"OR", u"OPERATOR", u"NUMBER", u"QUOTE",
+ u"WHITESPACE", u"NEWLINE", u"WORD" ]
+
+ grammarFileName = u"MetricAlertCondition.g4"
+
+ def __init__(self, input=None, output=sys.stdout):
+ super(MetricAlertConditionLexer, self).__init__(input, output=output)
+ self.checkVersion("4.7.1")
+ self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache())
+ self._actions = None
+ self._predicates = None
+
+
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionListener.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionListener.py
new file mode 100644
index 00000000000..286303a62d1
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionListener.py
@@ -0,0 +1,148 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+# pylint: disable=all
+
+# Generated from MetricAlertCondition.g4 by ANTLR 4.7.1
+from antlr4 import *
+
+# This class defines a complete listener for a parse tree produced by MetricAlertConditionParser.
+class MetricAlertConditionListener(ParseTreeListener):
+
+ # Enter a parse tree produced by MetricAlertConditionParser#expression.
+ def enterExpression(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#expression.
+ def exitExpression(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#aggregation.
+ def enterAggregation(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#aggregation.
+ def exitAggregation(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#namespace.
+ def enterNamespace(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#namespace.
+ def exitNamespace(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#metric.
+ def enterMetric(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#metric.
+ def exitMetric(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#operator.
+ def enterOperator(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#operator.
+ def exitOperator(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#threshold.
+ def enterThreshold(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#threshold.
+ def exitThreshold(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#where.
+ def enterWhere(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#where.
+ def exitWhere(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dimensions.
+ def enterDimensions(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dimensions.
+ def exitDimensions(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dimension.
+ def enterDimension(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dimension.
+ def exitDimension(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dim_separator.
+ def enterDim_separator(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dim_separator.
+ def exitDim_separator(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dim_operator.
+ def enterDim_operator(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dim_operator.
+ def exitDim_operator(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dim_val_separator.
+ def enterDim_val_separator(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dim_val_separator.
+ def exitDim_val_separator(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dim_name.
+ def enterDim_name(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dim_name.
+ def exitDim_name(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dim_values.
+ def enterDim_values(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dim_values.
+ def exitDim_values(self, ctx):
+ pass
+
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dim_value.
+ def enterDim_value(self, ctx):
+ pass
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dim_value.
+ def exitDim_value(self, ctx):
+ pass
+
+
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionParser.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionParser.py
new file mode 100644
index 00000000000..33a2037ffd3
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionParser.py
@@ -0,0 +1,992 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+# pylint: disable=all
+
+# Generated from MetricAlertCondition.g4 by ANTLR 4.7.1
+# encoding: utf-8
+from __future__ import print_function
+from antlr4 import *
+from io import StringIO
+import sys
+
+def serializedATN():
+ with StringIO() as buf:
+ buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3")
+ buf.write(u"\17{\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
+ buf.write(u"\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4")
+ buf.write(u"\16\t\16\4\17\t\17\4\20\t\20\3\2\3\2\3\2\3\2\7\2%\n\2")
+ buf.write(u"\f\2\16\2(\13\2\3\2\3\2\3\2\3\2\3\2\3\2\5\2\60\n\2\3")
+ buf.write(u"\2\3\2\3\2\3\2\7\2\66\n\2\f\2\16\29\13\2\3\2\7\2<\n\2")
+ buf.write(u"\f\2\16\2?\13\2\3\3\3\3\3\3\3\4\3\4\3\5\6\5G\n\5\r\5")
+ buf.write(u"\16\5H\3\6\3\6\3\6\3\7\3\7\3\b\3\b\3\b\3\t\3\t\3\t\3")
+ buf.write(u"\t\3\t\7\tX\n\t\f\t\16\t[\13\t\3\n\3\n\3\n\3\n\3\13\3")
+ buf.write(u"\13\3\13\3\f\3\f\3\f\3\r\3\r\3\r\3\16\3\16\3\16\3\17")
+ buf.write(u"\3\17\3\17\3\17\7\17q\n\17\f\17\16\17t\13\17\3\20\6\20")
+ buf.write(u"w\n\20\r\20\16\20x\3\20\2\2\21\2\4\6\b\n\f\16\20\22\24")
+ buf.write(u"\26\30\32\34\36\2\7\4\2\r\r\17\17\4\2\4\4\6\6\3\2\7\b")
+ buf.write(u"\4\2\4\4\t\t\5\2\13\13\r\r\17\17\2s\2 \3\2\2\2\4@\3\2")
+ buf.write(u"\2\2\6C\3\2\2\2\bF\3\2\2\2\nJ\3\2\2\2\fM\3\2\2\2\16O")
+ buf.write(u"\3\2\2\2\20R\3\2\2\2\22\\\3\2\2\2\24`\3\2\2\2\26c\3\2")
+ buf.write(u"\2\2\30f\3\2\2\2\32i\3\2\2\2\34l\3\2\2\2\36v\3\2\2\2")
+ buf.write(u" &\5\4\3\2!\"\5\6\4\2\"#\7\3\2\2#%\3\2\2\2$!\3\2\2\2")
+ buf.write(u"%(\3\2\2\2&$\3\2\2\2&\'\3\2\2\2\'/\3\2\2\2(&\3\2\2\2")
+ buf.write(u")*\7\f\2\2*+\5\b\5\2+,\7\f\2\2,-\7\r\2\2-\60\3\2\2\2")
+ buf.write(u".\60\5\b\5\2/)\3\2\2\2/.\3\2\2\2\60\61\3\2\2\2\61\62")
+ buf.write(u"\5\n\6\2\62\67\5\f\7\2\63\64\7\r\2\2\64\66\5\20\t\2\65")
+ buf.write(u"\63\3\2\2\2\669\3\2\2\2\67\65\3\2\2\2\678\3\2\2\28=\3")
+ buf.write(u"\2\2\29\67\3\2\2\2:<\7\16\2\2;:\3\2\2\2\3\2\2\2=;\3")
+ buf.write(u"\2\2\2=>\3\2\2\2>\3\3\2\2\2?=\3\2\2\2@A\7\17\2\2AB\7")
+ buf.write(u"\r\2\2B\5\3\2\2\2CD\7\17\2\2D\7\3\2\2\2EG\t\2\2\2FE\3")
+ buf.write(u"\2\2\2GH\3\2\2\2HF\3\2\2\2HI\3\2\2\2I\t\3\2\2\2JK\7\n")
+ buf.write(u"\2\2KL\7\r\2\2L\13\3\2\2\2MN\7\13\2\2N\r\3\2\2\2OP\7")
+ buf.write(u"\5\2\2PQ\7\r\2\2Q\17\3\2\2\2RS\5\16\b\2SY\5\22\n\2TU")
+ buf.write(u"\5\24\13\2UV\5\22\n\2VX\3\2\2\2WT\3\2\2\2X[\3\2\2\2Y")
+ buf.write(u"W\3\2\2\2YZ\3\2\2\2Z\21\3\2\2\2[Y\3\2\2\2\\]\5\32\16")
+ buf.write(u"\2]^\5\26\f\2^_\5\34\17\2_\23\3\2\2\2`a\t\3\2\2ab\7\r")
+ buf.write(u"\2\2b\25\3\2\2\2cd\t\4\2\2de\7\r\2\2e\27\3\2\2\2fg\t")
+ buf.write(u"\5\2\2gh\7\r\2\2h\31\3\2\2\2ij\7\17\2\2jk\7\r\2\2k\33")
+ buf.write(u"\3\2\2\2lr\5\36\20\2mn\5\30\r\2no\5\36\20\2oq\3\2\2\2")
+ buf.write(u"pm\3\2\2\2qt\3\2\2\2rp\3\2\2\2rs\3\2\2\2s\35\3\2\2\2")
+ buf.write(u"tr\3\2\2\2uw\t\6\2\2vu\3\2\2\2wx\3\2\2\2xv\3\2\2\2xy")
+ buf.write(u"\3\2\2\2y\37\3\2\2\2\n&/\67=HYrx")
+ return buf.getvalue()
+
+
+class MetricAlertConditionParser ( Parser ):
+
+ grammarFileName = "MetricAlertCondition.g4"
+
+ atn = ATNDeserializer().deserialize(serializedATN())
+
+ decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]
+
+ sharedContextCache = PredictionContextCache()
+
+ literalNames = [ u"", u"'.'", u"','" ]
+
+ symbolicNames = [ u"", u"", u"", u"WHERE",
+ u"AND", u"INCLUDES", u"EXCLUDES", u"OR", u"OPERATOR",
+ u"NUMBER", u"QUOTE", u"WHITESPACE", u"NEWLINE", u"WORD" ]
+
+ RULE_expression = 0
+ RULE_aggregation = 1
+ RULE_namespace = 2
+ RULE_metric = 3
+ RULE_operator = 4
+ RULE_threshold = 5
+ RULE_where = 6
+ RULE_dimensions = 7
+ RULE_dimension = 8
+ RULE_dim_separator = 9
+ RULE_dim_operator = 10
+ RULE_dim_val_separator = 11
+ RULE_dim_name = 12
+ RULE_dim_values = 13
+ RULE_dim_value = 14
+
+ ruleNames = [ u"expression", u"aggregation", u"namespace", u"metric",
+ u"operator", u"threshold", u"where", u"dimensions", u"dimension",
+ u"dim_separator", u"dim_operator", u"dim_val_separator",
+ u"dim_name", u"dim_values", u"dim_value" ]
+
+ EOF = Token.EOF
+ T__0=1
+ T__1=2
+ WHERE=3
+ AND=4
+ INCLUDES=5
+ EXCLUDES=6
+ OR=7
+ OPERATOR=8
+ NUMBER=9
+ QUOTE=10
+ WHITESPACE=11
+ NEWLINE=12
+ WORD=13
+
+ def __init__(self, input, output=sys.stdout):
+ super(MetricAlertConditionParser, self).__init__(input, output=output)
+ self.checkVersion("4.7.1")
+ self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
+ self._predicates = None
+
+
+
+ class ExpressionContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.ExpressionContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def aggregation(self):
+ return self.getTypedRuleContext(MetricAlertConditionParser.AggregationContext,0)
+
+
+ def operator(self):
+ return self.getTypedRuleContext(MetricAlertConditionParser.OperatorContext,0)
+
+
+ def threshold(self):
+ return self.getTypedRuleContext(MetricAlertConditionParser.ThresholdContext,0)
+
+
+ def QUOTE(self, i=None):
+ if i is None:
+ return self.getTokens(MetricAlertConditionParser.QUOTE)
+ else:
+ return self.getToken(MetricAlertConditionParser.QUOTE, i)
+
+ def metric(self):
+ return self.getTypedRuleContext(MetricAlertConditionParser.MetricContext,0)
+
+
+ def WHITESPACE(self, i=None):
+ if i is None:
+ return self.getTokens(MetricAlertConditionParser.WHITESPACE)
+ else:
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, i)
+
+ def namespace(self, i=None):
+ if i is None:
+ return self.getTypedRuleContexts(MetricAlertConditionParser.NamespaceContext)
+ else:
+ return self.getTypedRuleContext(MetricAlertConditionParser.NamespaceContext,i)
+
+
+ def dimensions(self, i=None):
+ if i is None:
+ return self.getTypedRuleContexts(MetricAlertConditionParser.DimensionsContext)
+ else:
+ return self.getTypedRuleContext(MetricAlertConditionParser.DimensionsContext,i)
+
+
+ def NEWLINE(self, i=None):
+ if i is None:
+ return self.getTokens(MetricAlertConditionParser.NEWLINE)
+ else:
+ return self.getToken(MetricAlertConditionParser.NEWLINE, i)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_expression
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterExpression"):
+ listener.enterExpression(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitExpression"):
+ listener.exitExpression(self)
+
+
+
+
+ def expression(self):
+
+ localctx = MetricAlertConditionParser.ExpressionContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 0, self.RULE_expression)
+ self._la = 0 # Token type
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 30
+ self.aggregation()
+ self.state = 36
+ self._errHandler.sync(self)
+ _alt = self._interp.adaptivePredict(self._input,0,self._ctx)
+ while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
+ if _alt==1:
+ self.state = 31
+ self.namespace()
+ self.state = 32
+ self.match(MetricAlertConditionParser.T__0)
+ self.state = 38
+ self._errHandler.sync(self)
+ _alt = self._interp.adaptivePredict(self._input,0,self._ctx)
+
+ self.state = 45
+ self._errHandler.sync(self)
+ token = self._input.LA(1)
+ if token in [MetricAlertConditionParser.QUOTE]:
+ self.state = 39
+ self.match(MetricAlertConditionParser.QUOTE)
+ self.state = 40
+ self.metric()
+ self.state = 41
+ self.match(MetricAlertConditionParser.QUOTE)
+ self.state = 42
+ self.match(MetricAlertConditionParser.WHITESPACE)
+ pass
+ elif token in [MetricAlertConditionParser.WHITESPACE, MetricAlertConditionParser.WORD]:
+ self.state = 44
+ self.metric()
+ pass
+ else:
+ raise NoViableAltException(self)
+
+ self.state = 47
+ self.operator()
+ self.state = 48
+ self.threshold()
+ self.state = 53
+ self._errHandler.sync(self)
+ _la = self._input.LA(1)
+ while _la==MetricAlertConditionParser.WHITESPACE:
+ self.state = 49
+ self.match(MetricAlertConditionParser.WHITESPACE)
+ self.state = 50
+ self.dimensions()
+ self.state = 55
+ self._errHandler.sync(self)
+ _la = self._input.LA(1)
+
+ self.state = 59
+ self._errHandler.sync(self)
+ _la = self._input.LA(1)
+ while _la==MetricAlertConditionParser.NEWLINE:
+ self.state = 56
+ self.match(MetricAlertConditionParser.NEWLINE)
+ self.state = 61
+ self._errHandler.sync(self)
+ _la = self._input.LA(1)
+
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class AggregationContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.AggregationContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def WORD(self):
+ return self.getToken(MetricAlertConditionParser.WORD, 0)
+
+ def WHITESPACE(self):
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, 0)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_aggregation
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterAggregation"):
+ listener.enterAggregation(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitAggregation"):
+ listener.exitAggregation(self)
+
+
+
+
+ def aggregation(self):
+
+ localctx = MetricAlertConditionParser.AggregationContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 2, self.RULE_aggregation)
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 62
+ self.match(MetricAlertConditionParser.WORD)
+ self.state = 63
+ self.match(MetricAlertConditionParser.WHITESPACE)
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class NamespaceContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.NamespaceContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def WORD(self):
+ return self.getToken(MetricAlertConditionParser.WORD, 0)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_namespace
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterNamespace"):
+ listener.enterNamespace(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitNamespace"):
+ listener.exitNamespace(self)
+
+
+
+
+ def namespace(self):
+
+ localctx = MetricAlertConditionParser.NamespaceContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 4, self.RULE_namespace)
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 65
+ self.match(MetricAlertConditionParser.WORD)
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class MetricContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.MetricContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def WORD(self, i=None):
+ if i is None:
+ return self.getTokens(MetricAlertConditionParser.WORD)
+ else:
+ return self.getToken(MetricAlertConditionParser.WORD, i)
+
+ def WHITESPACE(self, i=None):
+ if i is None:
+ return self.getTokens(MetricAlertConditionParser.WHITESPACE)
+ else:
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, i)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_metric
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterMetric"):
+ listener.enterMetric(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitMetric"):
+ listener.exitMetric(self)
+
+
+
+
+ def metric(self):
+
+ localctx = MetricAlertConditionParser.MetricContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 6, self.RULE_metric)
+ self._la = 0 # Token type
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 68
+ self._errHandler.sync(self)
+ _la = self._input.LA(1)
+ while True:
+ self.state = 67
+ _la = self._input.LA(1)
+ if not(_la==MetricAlertConditionParser.WHITESPACE or _la==MetricAlertConditionParser.WORD):
+ self._errHandler.recoverInline(self)
+ else:
+ self._errHandler.reportMatch(self)
+ self.consume()
+ self.state = 70
+ self._errHandler.sync(self)
+ _la = self._input.LA(1)
+ if not (_la==MetricAlertConditionParser.WHITESPACE or _la==MetricAlertConditionParser.WORD):
+ break
+
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class OperatorContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.OperatorContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def OPERATOR(self):
+ return self.getToken(MetricAlertConditionParser.OPERATOR, 0)
+
+ def WHITESPACE(self):
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, 0)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_operator
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterOperator"):
+ listener.enterOperator(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitOperator"):
+ listener.exitOperator(self)
+
+
+
+
+ def operator(self):
+
+ localctx = MetricAlertConditionParser.OperatorContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 8, self.RULE_operator)
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 72
+ self.match(MetricAlertConditionParser.OPERATOR)
+ self.state = 73
+ self.match(MetricAlertConditionParser.WHITESPACE)
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class ThresholdContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.ThresholdContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def NUMBER(self):
+ return self.getToken(MetricAlertConditionParser.NUMBER, 0)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_threshold
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterThreshold"):
+ listener.enterThreshold(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitThreshold"):
+ listener.exitThreshold(self)
+
+
+
+
+ def threshold(self):
+
+ localctx = MetricAlertConditionParser.ThresholdContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 10, self.RULE_threshold)
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 75
+ self.match(MetricAlertConditionParser.NUMBER)
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class WhereContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.WhereContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def WHERE(self):
+ return self.getToken(MetricAlertConditionParser.WHERE, 0)
+
+ def WHITESPACE(self):
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, 0)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_where
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterWhere"):
+ listener.enterWhere(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitWhere"):
+ listener.exitWhere(self)
+
+
+
+
+ def where(self):
+
+ localctx = MetricAlertConditionParser.WhereContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 12, self.RULE_where)
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 77
+ self.match(MetricAlertConditionParser.WHERE)
+ self.state = 78
+ self.match(MetricAlertConditionParser.WHITESPACE)
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class DimensionsContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.DimensionsContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def where(self):
+ return self.getTypedRuleContext(MetricAlertConditionParser.WhereContext,0)
+
+
+ def dimension(self, i=None):
+ if i is None:
+ return self.getTypedRuleContexts(MetricAlertConditionParser.DimensionContext)
+ else:
+ return self.getTypedRuleContext(MetricAlertConditionParser.DimensionContext,i)
+
+
+ def dim_separator(self, i=None):
+ if i is None:
+ return self.getTypedRuleContexts(MetricAlertConditionParser.Dim_separatorContext)
+ else:
+ return self.getTypedRuleContext(MetricAlertConditionParser.Dim_separatorContext,i)
+
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_dimensions
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterDimensions"):
+ listener.enterDimensions(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitDimensions"):
+ listener.exitDimensions(self)
+
+
+
+
+ def dimensions(self):
+
+ localctx = MetricAlertConditionParser.DimensionsContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 14, self.RULE_dimensions)
+ self._la = 0 # Token type
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 80
+ self.where()
+ self.state = 81
+ self.dimension()
+ self.state = 87
+ self._errHandler.sync(self)
+ _la = self._input.LA(1)
+ while _la==MetricAlertConditionParser.T__1 or _la==MetricAlertConditionParser.AND:
+ self.state = 82
+ self.dim_separator()
+ self.state = 83
+ self.dimension()
+ self.state = 89
+ self._errHandler.sync(self)
+ _la = self._input.LA(1)
+
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class DimensionContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.DimensionContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def dim_name(self):
+ return self.getTypedRuleContext(MetricAlertConditionParser.Dim_nameContext,0)
+
+
+ def dim_operator(self):
+ return self.getTypedRuleContext(MetricAlertConditionParser.Dim_operatorContext,0)
+
+
+ def dim_values(self):
+ return self.getTypedRuleContext(MetricAlertConditionParser.Dim_valuesContext,0)
+
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_dimension
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterDimension"):
+ listener.enterDimension(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitDimension"):
+ listener.exitDimension(self)
+
+
+
+
+ def dimension(self):
+
+ localctx = MetricAlertConditionParser.DimensionContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 16, self.RULE_dimension)
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 90
+ self.dim_name()
+ self.state = 91
+ self.dim_operator()
+ self.state = 92
+ self.dim_values()
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class Dim_separatorContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.Dim_separatorContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def WHITESPACE(self):
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, 0)
+
+ def AND(self):
+ return self.getToken(MetricAlertConditionParser.AND, 0)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_dim_separator
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterDim_separator"):
+ listener.enterDim_separator(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitDim_separator"):
+ listener.exitDim_separator(self)
+
+
+
+
+ def dim_separator(self):
+
+ localctx = MetricAlertConditionParser.Dim_separatorContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 18, self.RULE_dim_separator)
+ self._la = 0 # Token type
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 94
+ _la = self._input.LA(1)
+ if not(_la==MetricAlertConditionParser.T__1 or _la==MetricAlertConditionParser.AND):
+ self._errHandler.recoverInline(self)
+ else:
+ self._errHandler.reportMatch(self)
+ self.consume()
+ self.state = 95
+ self.match(MetricAlertConditionParser.WHITESPACE)
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class Dim_operatorContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.Dim_operatorContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def WHITESPACE(self):
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, 0)
+
+ def INCLUDES(self):
+ return self.getToken(MetricAlertConditionParser.INCLUDES, 0)
+
+ def EXCLUDES(self):
+ return self.getToken(MetricAlertConditionParser.EXCLUDES, 0)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_dim_operator
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterDim_operator"):
+ listener.enterDim_operator(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitDim_operator"):
+ listener.exitDim_operator(self)
+
+
+
+
+ def dim_operator(self):
+
+ localctx = MetricAlertConditionParser.Dim_operatorContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 20, self.RULE_dim_operator)
+ self._la = 0 # Token type
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 97
+ _la = self._input.LA(1)
+ if not(_la==MetricAlertConditionParser.INCLUDES or _la==MetricAlertConditionParser.EXCLUDES):
+ self._errHandler.recoverInline(self)
+ else:
+ self._errHandler.reportMatch(self)
+ self.consume()
+ self.state = 98
+ self.match(MetricAlertConditionParser.WHITESPACE)
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class Dim_val_separatorContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.Dim_val_separatorContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def WHITESPACE(self):
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, 0)
+
+ def OR(self):
+ return self.getToken(MetricAlertConditionParser.OR, 0)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_dim_val_separator
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterDim_val_separator"):
+ listener.enterDim_val_separator(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitDim_val_separator"):
+ listener.exitDim_val_separator(self)
+
+
+
+
+ def dim_val_separator(self):
+
+ localctx = MetricAlertConditionParser.Dim_val_separatorContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 22, self.RULE_dim_val_separator)
+ self._la = 0 # Token type
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 100
+ _la = self._input.LA(1)
+ if not(_la==MetricAlertConditionParser.T__1 or _la==MetricAlertConditionParser.OR):
+ self._errHandler.recoverInline(self)
+ else:
+ self._errHandler.reportMatch(self)
+ self.consume()
+ self.state = 101
+ self.match(MetricAlertConditionParser.WHITESPACE)
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class Dim_nameContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.Dim_nameContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def WORD(self):
+ return self.getToken(MetricAlertConditionParser.WORD, 0)
+
+ def WHITESPACE(self):
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, 0)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_dim_name
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterDim_name"):
+ listener.enterDim_name(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitDim_name"):
+ listener.exitDim_name(self)
+
+
+
+
+ def dim_name(self):
+
+ localctx = MetricAlertConditionParser.Dim_nameContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 24, self.RULE_dim_name)
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 103
+ self.match(MetricAlertConditionParser.WORD)
+ self.state = 104
+ self.match(MetricAlertConditionParser.WHITESPACE)
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class Dim_valuesContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.Dim_valuesContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def dim_value(self, i=None):
+ if i is None:
+ return self.getTypedRuleContexts(MetricAlertConditionParser.Dim_valueContext)
+ else:
+ return self.getTypedRuleContext(MetricAlertConditionParser.Dim_valueContext,i)
+
+
+ def dim_val_separator(self, i=None):
+ if i is None:
+ return self.getTypedRuleContexts(MetricAlertConditionParser.Dim_val_separatorContext)
+ else:
+ return self.getTypedRuleContext(MetricAlertConditionParser.Dim_val_separatorContext,i)
+
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_dim_values
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterDim_values"):
+ listener.enterDim_values(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitDim_values"):
+ listener.exitDim_values(self)
+
+
+
+
+ def dim_values(self):
+
+ localctx = MetricAlertConditionParser.Dim_valuesContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 26, self.RULE_dim_values)
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 106
+ self.dim_value()
+ self.state = 112
+ self._errHandler.sync(self)
+ _alt = self._interp.adaptivePredict(self._input,6,self._ctx)
+ while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
+ if _alt==1:
+ self.state = 107
+ self.dim_val_separator()
+ self.state = 108
+ self.dim_value()
+ self.state = 114
+ self._errHandler.sync(self)
+ _alt = self._interp.adaptivePredict(self._input,6,self._ctx)
+
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+ class Dim_valueContext(ParserRuleContext):
+
+ def __init__(self, parser, parent=None, invokingState=-1):
+ super(MetricAlertConditionParser.Dim_valueContext, self).__init__(parent, invokingState)
+ self.parser = parser
+
+ def NUMBER(self, i=None):
+ if i is None:
+ return self.getTokens(MetricAlertConditionParser.NUMBER)
+ else:
+ return self.getToken(MetricAlertConditionParser.NUMBER, i)
+
+ def WORD(self, i=None):
+ if i is None:
+ return self.getTokens(MetricAlertConditionParser.WORD)
+ else:
+ return self.getToken(MetricAlertConditionParser.WORD, i)
+
+ def WHITESPACE(self, i=None):
+ if i is None:
+ return self.getTokens(MetricAlertConditionParser.WHITESPACE)
+ else:
+ return self.getToken(MetricAlertConditionParser.WHITESPACE, i)
+
+ def getRuleIndex(self):
+ return MetricAlertConditionParser.RULE_dim_value
+
+ def enterRule(self, listener):
+ if hasattr(listener, "enterDim_value"):
+ listener.enterDim_value(self)
+
+ def exitRule(self, listener):
+ if hasattr(listener, "exitDim_value"):
+ listener.exitDim_value(self)
+
+
+
+
+ def dim_value(self):
+
+ localctx = MetricAlertConditionParser.Dim_valueContext(self, self._ctx, self.state)
+ self.enterRule(localctx, 28, self.RULE_dim_value)
+ self._la = 0 # Token type
+ try:
+ self.enterOuterAlt(localctx, 1)
+ self.state = 116
+ self._errHandler.sync(self)
+ _alt = 1
+ while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
+ if _alt == 1:
+ self.state = 115
+ _la = self._input.LA(1)
+ if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << MetricAlertConditionParser.NUMBER) | (1 << MetricAlertConditionParser.WHITESPACE) | (1 << MetricAlertConditionParser.WORD))) != 0)):
+ self._errHandler.recoverInline(self)
+ else:
+ self._errHandler.reportMatch(self)
+ self.consume()
+
+ else:
+ raise NoViableAltException(self)
+ self.state = 118
+ self._errHandler.sync(self)
+ _alt = self._interp.adaptivePredict(self._input,7,self._ctx)
+
+ except RecognitionException as re:
+ localctx.exception = re
+ self._errHandler.reportError(self, re)
+ self._errHandler.recover(self, re)
+ finally:
+ self.exitRule()
+ return localctx
+
+
+
+
+
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionValidator.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionValidator.py
new file mode 100644
index 00000000000..f0c621c34d1
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/MetricAlertConditionValidator.py
@@ -0,0 +1,90 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+# Generated from MetricAlertCondition.g4 by ANTLR 4.7.1
+from .MetricAlertConditionListener import MetricAlertConditionListener
+
+
+op_conversion = {
+ '=': 'Equals',
+ '!=': 'NotEquals',
+ '>': 'GreaterThan',
+ '>=': 'GreaterThanOrEqual',
+ '<': 'LessThan',
+ '<=': 'LessThanOrEqual'
+}
+
+agg_conversion = {
+ 'avg': 'Average',
+ 'min': 'Minimum',
+ 'max': 'Maximum',
+ 'total': 'Total'
+}
+
+# This class defines a complete listener for a parse tree produced by MetricAlertConditionParser.
+class MetricAlertConditionValidator(MetricAlertConditionListener):
+
+ def __init__(self):
+ super(MetricAlertConditionValidator, self).__init__()
+ self.parameters = {}
+ self._dimension_index = 0
+
+ # Exit a parse tree produced by MetricAlertConditionParser#aggregation.
+ def exitAggregation(self, ctx):
+ aggregation = agg_conversion[ctx.getText().strip()]
+ self.parameters['time_aggregation'] = aggregation
+
+ # Exit a parse tree produced by MetricAlertConditionParser#namespace.
+ def exitNamespace(self, ctx):
+ self.parameters['metric_namespace'] = ctx.getText().strip()
+
+ # Exit a parse tree produced by MetricAlertConditionParser#metric.
+ def exitMetric(self, ctx):
+ self.parameters['metric_name'] = ctx.getText().strip()
+
+ # Exit a parse tree produced by MetricAlertConditionParser#operator.
+ def exitOperator(self, ctx):
+ operator = op_conversion[ctx.getText().strip()]
+ self.parameters['operator'] = operator
+
+ # Exit a parse tree produced by MetricAlertConditionParser#threshold.
+ def exitThreshold(self, ctx):
+ self.parameters['threshold'] = ctx.getText().strip()
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dimensions.
+ def enterDimensions(self, ctx):
+ self.parameters['dimensions'] = []
+
+ # Enter a parse tree produced by MetricAlertConditionParser#dimension.
+ def enterDimension(self, ctx):
+ self.parameters['dimensions'].append({})
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dimension.
+ def exitDimension(self, ctx):
+ self._dimension_index = self._dimension_index + 1
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dname.
+ def exitDim_name(self, ctx):
+ self.parameters['dimensions'][self._dimension_index]['name'] = ctx.getText().strip()
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dop.
+ def exitDim_operator(self, ctx):
+ op_text = ctx.getText().strip()
+ self.parameters['dimensions'][self._dimension_index]['operator'] = op_text.lower()
+
+ # Exit a parse tree produced by MetricAlertConditionParser#dvalues.
+ def exitDim_values(self, ctx):
+ dvalues = ctx.getText().strip().split(' ')
+ self.parameters['dimensions'][self._dimension_index]['values'] = [x for x in dvalues if x not in ['', 'or']]
+
+ def result(self):
+ from azure.mgmt.monitor.models import MetricCriteria, MetricDimension
+ dim_params = self.parameters.get('dimensions', [])
+ dimensions = []
+ for dim in dim_params:
+ dimensions.append(MetricDimension(**dim))
+ self.parameters['dimensions'] = dimensions
+ self.parameters['name'] = '' # will be auto-populated later
+ return MetricCriteria(**self.parameters)
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/__init__.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/__init__.py
new file mode 100644
index 00000000000..47b76d0b0cf
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/__init__.py
@@ -0,0 +1,10 @@
+# --------------------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for license information.
+# --------------------------------------------------------------------------------------------
+
+# pylint: disable=unused-import
+from .MetricAlertConditionLexer import MetricAlertConditionLexer
+from .MetricAlertConditionParser import MetricAlertConditionParser
+from .MetricAlertConditionListener import MetricAlertConditionListener
+from .MetricAlertConditionValidator import MetricAlertConditionValidator
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/build_python.bat b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/build_python.bat
new file mode 100644
index 00000000000..a0c68702d18
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/build_python.bat
@@ -0,0 +1,3 @@
+echo off
+echo Building MetricAlertCondition
+call antlr -Dlanguage=Python2 MetricAlertCondition.g4
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/run_test.bat b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/run_test.bat
new file mode 100644
index 00000000000..3b0dfe244ae
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/grammar/run_test.bat
@@ -0,0 +1,5 @@
+echo off
+echo Testing MetricAlertCondition
+call antlr MetricAlertCondition.g4
+call javac Metric*.java
+call grun MetricAlertCondition expression test.txt -gui
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/operations/metric_alert.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/operations/metric_alert.py
index e343ef8e187..b959dade47b 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/operations/metric_alert.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/operations/metric_alert.py
@@ -3,9 +3,97 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
+from knack.log import get_logger
from azure.cli.command_modules.monitor.util import get_operator_map, get_aggregation_map
+logger = get_logger(__name__)
+
+
+def create_metric_alert(client, resource_group_name, rule_name, scopes, description, condition, disabled=False,
+ tags=None, actions=None, severity=2, window_size='5m', evaluation_frequency='1m',
+ auto_mitigate=None):
+ from azure.mgmt.monitor.models import MetricAlertResource, MetricAlertSingleResourceMultipleMetricCriteria
+ # generate names for the conditions
+ for i, cond in enumerate(condition):
+ cond.name = 'cond{}'.format(i)
+ kwargs = {
+ 'description': description,
+ 'severity': severity,
+ 'enabled': not disabled,
+ 'scopes': scopes,
+ 'evaluation_frequency': evaluation_frequency,
+ 'window_size': window_size,
+ 'criteria': MetricAlertSingleResourceMultipleMetricCriteria(all_of=condition),
+ 'actions': actions,
+ 'tags': tags,
+ 'location': 'global',
+ 'auto_mitigate': auto_mitigate
+ }
+ return client.create_or_update(resource_group_name, rule_name, MetricAlertResource(**kwargs))
+
+
+def update_metric_alert(instance, scopes=None, description=None, enabled=None, tags=None,
+ severity=None, window_size=None, evaluation_frequency=None, auto_mitigate=None,
+ add_actions=None, remove_actions=None, add_conditions=None, remove_conditions=None):
+ if scopes is not None:
+ instance.scopes = scopes
+ if description is not None:
+ instance.description = description
+ if enabled is not None:
+ instance.enabled = enabled
+ if tags is not None:
+ instance.tags = tags
+ if severity is not None:
+ instance.severity = severity
+ if window_size is not None:
+ instance.window_size = window_size
+ if evaluation_frequency is not None:
+ instance.evaluation_frequency = evaluation_frequency
+ if auto_mitigate is not None:
+ instance.auto_mitigate = auto_mitigate
+
+ # process action removals
+ if remove_actions is not None:
+ instance.actions = [x for x in instance.actions if x.action_group_id not in remove_actions]
+
+ # process action additions
+ if add_actions is not None:
+ for action in add_actions:
+ match = next((x for x in instance.actions if action.action_group_id == x.action_group_id), None)
+ if match:
+ match.webhook_properties = action.webhook_properties
+ else:
+ instance.actions.append(action)
+
+ # process condition removals
+ if remove_conditions is not None:
+ instance.criteria.all_of = [x for x in instance.criteria.all_of if x.name not in remove_conditions]
+
+ def _get_next_name():
+ i = 0
+ while True:
+ possible_name = 'cond{}'.format(i)
+ match = next((x for x in instance.criteria.all_of if x.name == possible_name), None)
+ if match:
+ i = i + 1
+ continue
+ return possible_name
+
+ # process condition additions
+ if add_conditions is not None:
+ for condition in add_conditions:
+ condition.name = _get_next_name()
+ instance.criteria.all_of.append(condition)
+
+ return instance
+
+
+def list_metric_alerts(client, resource_group_name=None):
+ if resource_group_name:
+ return client.list_by_resource_group(resource_group_name)
+ return client.list_by_subscription()
+
def create_metric_rule(client, resource_group_name, rule_name, target, condition, description=None, disabled=False,
location=None, tags=None, email_service_owners=False, actions=None):
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_v2_scenario.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_v2_scenario.yaml
new file mode 100644
index 00000000000..5dc9d8384c4
--- /dev/null
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_metric_alert_v2_scenario.yaml
@@ -0,0 +1,553 @@
+interactions:
+- request:
+ body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation",
+ "date": "2018-08-13T23:24:35Z"}}'
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [group create]
+ Connection: [keep-alive]
+ Content-Length: ['110']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_metric_alert_v2000001?api-version=2018-05-01
+ response:
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001","name":"cli_test_metric_alert_v2000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-13T23:24:35Z"},"properties":{"provisioningState":"Succeeded"}}'}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['384']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:24:37 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ x-content-type-options: [nosniff]
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ status: {code: 201, message: Created}
+- request:
+ body: '{"sku": {"name": "Standard_LRS"}, "kind": "Storage", "location": "westus",
+ "properties": {"supportsHttpsTrafficOnly": false, "isHnsEnabled": false}}'
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [storage account create]
+ Connection: [keep-alive]
+ Content-Length: ['148']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-storage/2.0.0rc4 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002?api-version=2018-03-01-preview
+ response:
+ body: {string: ''}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['0']
+ content-type: [text/plain; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:24:40 GMT']
+ expires: ['-1']
+ location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/a6f57ad7-8cb0-4ac7-a520-1e16f6239531?monitor=true&api-version=2018-03-01-preview']
+ pragma: [no-cache]
+ server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0']
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ x-content-type-options: [nosniff]
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
+ status: {code: 202, message: Accepted}
+- request:
+ body: null
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [storage account create]
+ Connection: [keep-alive]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-storage/2.0.0rc4 Azure-SDK-For-Python AZURECLI/2.0.44]
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/a6f57ad7-8cb0-4ac7-a520-1e16f6239531?monitor=true&api-version=2018-03-01-preview
+ response:
+ body: {string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002","name":"clitest000002","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"isHnsEnabled":false,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"trustedDirectories":["72f988bf-86f1-41af-91ab-2d7cd011db47"],"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-08-13T23:24:39.9662638Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-08-13T23:24:39.9662638Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-08-13T23:24:39.8412539Z","primaryEndpoints":{"blob":"https://clitest000002.blob.core.windows.net/","queue":"https://clitest000002.queue.core.windows.net/","table":"https://clitest000002.table.core.windows.net/","file":"https://clitest000002.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available"}}'}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['1252']
+ content-type: [application/json]
+ date: ['Mon, 13 Aug 2018 23:24:56 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.0']
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ transfer-encoding: [chunked]
+ vary: [Accept-Encoding]
+ x-content-type-options: [nosniff]
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [storage account keys list]
+ Connection: [keep-alive]
+ Content-Length: ['0']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-storage/2.0.0rc4 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: POST
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002/listKeys?api-version=2018-03-01-preview
+ response:
+ body: {string: '{"keys":[{"keyName":"key1","value":"LwGSD1u4Aot4/e+bFn0SZqDg9S/CVrc2KKPA08nrHT/3x8aW6u84Eq7Fpb3I23Nggpg6sV+a38gnYT5yiwYzKA==","permissions":"FULL"},{"keyName":"key2","value":"arxAGN/ojPcAmdPcmvTrS+TWS1208Z3vNN3cXXUvbJ8w7r7sX+trJeCVA85kFLyHZ0liqsxQq5xrLZs2utT7Lg==","permissions":"FULL"}]}'}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['288']
+ content-type: [application/json]
+ date: ['Mon, 13 Aug 2018 23:24:57 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0
+ Microsoft-HTTPAPI/2.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: '{"location": "global", "properties": {"groupShortName": "ag1", "enabled":
+ true, "emailReceivers": [], "smsReceivers": [], "webhookReceivers": []}}'
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [monitor action-group create]
+ Connection: [keep-alive]
+ Content-Length: ['146']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag1?api-version=2018-03-01
+ response:
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag1","type":"Microsoft.Insights/ActionGroups","name":"ag1","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"ag1","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['573']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:24:59 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: [Microsoft-IIS/8.5]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ x-content-type-options: [nosniff]
+ x-ms-ratelimit-remaining-subscription-writes: ['1196']
+ status: {code: 201, message: Created}
+- request:
+ body: '{"location": "global", "properties": {"groupShortName": "ag2", "enabled":
+ true, "emailReceivers": [], "smsReceivers": [], "webhookReceivers": []}}'
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [monitor action-group create]
+ Connection: [keep-alive]
+ Content-Length: ['146']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag2?api-version=2018-03-01
+ response:
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag2","type":"Microsoft.Insights/ActionGroups","name":"ag2","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"ag2","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['573']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:25:01 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: [Microsoft-IIS/8.5]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ x-content-type-options: [nosniff]
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ status: {code: 201, message: Created}
+- request:
+ body: 'b''b\''{"location": "global", "properties": {"description": "Test", "severity":
+ 2, "enabled": true, "scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002"],
+ "evaluationFrequency": "PT1M", "windowSize": "PT5M", "criteria": {"odata.type":
+ "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", "allOf": [{"name":
+ "cond0", "metricName": "transactions", "operator": "GreaterThan", "timeAggregation":
+ "Total", "threshold": 5.0, "dimensions": [{"name": "ResponseType", "operator":
+ "includes", "values": ["Success"]}, {"name": "ApiName", "operator": "includes",
+ "values": ["GetBlob"]}]}, {"name": "cond1", "metricName": "SuccessE2ELatency",
+ "operator": "GreaterThan", "timeAggregation": "Average", "threshold": 250.0,
+ "dimensions": [{"name": "ApiName", "operator": "includes", "values": ["GetBlob",
+ "PutBlob"]}]}]}, "actions": [{"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag1"}]}}\'''''
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [monitor metrics alert create]
+ Connection: [keep-alive]
+ Content-Length: ['1205']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1?api-version=2018-03-01
+ response:
+ body: {string: "{\r\n \"location\": \"global\",\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n
+ \ \"name\": \"alert1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1\",\r\n
+ \ \"properties\": {\r\n \"description\": \"Test\",\r\n \"severity\":
+ 2,\r\n \"enabled\": true,\r\n \"scopes\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n
+ \ ],\r\n \"evaluationFrequency\": \"PT1M\",\r\n \"windowSize\": \"PT5M\",\r\n
+ \ \"templateType\": 8,\r\n \"criteria\": {\r\n \"allOf\": [\r\n
+ \ {\r\n \"name\": \"cond0\",\r\n \"metricNamespace\":
+ \"microsoft.storage/storageaccounts\",\r\n \"metricName\": \"transactions\",\r\n
+ \ \"dimensions\": [\r\n {\r\n \"name\": \"ResponseType\",\r\n
+ \ \"operator\": \"includes\",\r\n \"values\": [\r\n
+ \ \"Success\"\r\n ]\r\n },\r\n {\r\n
+ \ \"name\": \"ApiName\",\r\n \"operator\": \"includes\",\r\n
+ \ \"values\": [\r\n \"GetBlob\"\r\n ]\r\n
+ \ }\r\n ],\r\n \"operator\": \"GreaterThan\",\r\n
+ \ \"threshold\": 5.0,\r\n \"timeAggregation\": \"Total\"\r\n
+ \ },\r\n {\r\n \"name\": \"cond1\",\r\n \"metricNamespace\":
+ \"microsoft.storage/storageaccounts\",\r\n \"metricName\": \"SuccessE2ELatency\",\r\n
+ \ \"dimensions\": [\r\n {\r\n \"name\": \"ApiName\",\r\n
+ \ \"operator\": \"includes\",\r\n \"values\": [\r\n
+ \ \"GetBlob\",\r\n \"PutBlob\"\r\n ]\r\n
+ \ }\r\n ],\r\n \"operator\": \"GreaterThan\",\r\n
+ \ \"threshold\": 250.0,\r\n \"timeAggregation\": \"Average\"\r\n
+ \ }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n
+ \ },\r\n \"actions\": [\r\n {\r\n \"actionGroupId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag1\"\r\n
+ \ }\r\n ]\r\n }\r\n}"}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['2300']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:25:05 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: [Microsoft-IIS/10.0]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ transfer-encoding: [chunked]
+ vary: [Accept-Encoding]
+ x-aspnet-version: [4.0.30319]
+ 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 metrics alert update]
+ Connection: [keep-alive]
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1?api-version=2018-03-01
+ response:
+ body: {string: "{\r\n \"location\": \"global\",\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n
+ \ \"name\": \"alert1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1\",\r\n
+ \ \"properties\": {\r\n \"description\": \"Test\",\r\n \"severity\":
+ 2,\r\n \"enabled\": true,\r\n \"scopes\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n
+ \ ],\r\n \"evaluationFrequency\": \"PT1M\",\r\n \"windowSize\": \"PT5M\",\r\n
+ \ \"templateType\": 8,\r\n \"criteria\": {\r\n \"allOf\": [\r\n
+ \ {\r\n \"name\": \"cond0\",\r\n \"metricNamespace\":
+ \"microsoft.storage/storageaccounts\",\r\n \"metricName\": \"transactions\",\r\n
+ \ \"dimensions\": [\r\n {\r\n \"name\": \"ResponseType\",\r\n
+ \ \"operator\": \"includes\",\r\n \"values\": [\r\n
+ \ \"Success\"\r\n ]\r\n },\r\n {\r\n
+ \ \"name\": \"ApiName\",\r\n \"operator\": \"includes\",\r\n
+ \ \"values\": [\r\n \"GetBlob\"\r\n ]\r\n
+ \ }\r\n ],\r\n \"operator\": \"GreaterThan\",\r\n
+ \ \"threshold\": 5.0,\r\n \"timeAggregation\": \"Total\"\r\n
+ \ },\r\n {\r\n \"name\": \"cond1\",\r\n \"metricNamespace\":
+ \"microsoft.storage/storageaccounts\",\r\n \"metricName\": \"SuccessE2ELatency\",\r\n
+ \ \"dimensions\": [\r\n {\r\n \"name\": \"ApiName\",\r\n
+ \ \"operator\": \"includes\",\r\n \"values\": [\r\n
+ \ \"GetBlob\",\r\n \"PutBlob\"\r\n ]\r\n
+ \ }\r\n ],\r\n \"operator\": \"GreaterThan\",\r\n
+ \ \"threshold\": 250.0,\r\n \"timeAggregation\": \"Average\"\r\n
+ \ }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n
+ \ },\r\n \"actions\": [\r\n {\r\n \"actionGroupId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag1\"\r\n
+ \ }\r\n ]\r\n }\r\n}"}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['2300']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:25:06 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: [Microsoft-IIS/10.0]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ transfer-encoding: [chunked]
+ vary: [Accept-Encoding]
+ x-aspnet-version: [4.0.30319]
+ x-content-type-options: [nosniff]
+ x-powered-by: [ASP.NET]
+ status: {code: 200, message: OK}
+- request:
+ body: 'b''b\''{"location": "global", "tags": {"foo": "boo"}, "properties": {"description":
+ "alt desc", "severity": 3, "enabled": true, "scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002"],
+ "evaluationFrequency": "PT5M", "windowSize": "PT15M", "criteria": {"odata.type":
+ "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", "allOf": [{"name":
+ "cond1", "metricName": "SuccessE2ELatency", "metricNamespace": "microsoft.storage/storageaccounts",
+ "operator": "GreaterThan", "timeAggregation": "Average", "threshold": 250.0,
+ "dimensions": [{"name": "ApiName", "operator": "includes", "values": ["GetBlob",
+ "PutBlob"]}]}, {"name": "cond0", "metricName": "transactions", "operator": "LessThan",
+ "timeAggregation": "Total", "threshold": 100.0, "dimensions": []}]}, "autoMitigate":
+ true, "actions": [{"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag2",
+ "webhookProperties": {"test": "best"}}]}}\'''''
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [monitor metrics alert update]
+ Connection: [keep-alive]
+ Content-Length: ['1211']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: PUT
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1?api-version=2018-03-01
+ response:
+ body: {string: "{\r\n \"location\": \"global\",\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n
+ \ \"name\": \"alert1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1\",\r\n
+ \ \"tags\": {\r\n \"foo\": \"boo\"\r\n },\r\n \"properties\": {\r\n \"description\":
+ \"alt desc\",\r\n \"severity\": 3,\r\n \"enabled\": true,\r\n \"scopes\":
+ [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n
+ \ ],\r\n \"evaluationFrequency\": \"PT5M\",\r\n \"windowSize\": \"PT15M\",\r\n
+ \ \"templateType\": 8,\r\n \"criteria\": {\r\n \"allOf\": [\r\n
+ \ {\r\n \"name\": \"cond1\",\r\n \"metricNamespace\":
+ \"microsoft.storage/storageaccounts\",\r\n \"metricName\": \"SuccessE2ELatency\",\r\n
+ \ \"dimensions\": [\r\n {\r\n \"name\": \"ApiName\",\r\n
+ \ \"operator\": \"includes\",\r\n \"values\": [\r\n
+ \ \"GetBlob\",\r\n \"PutBlob\"\r\n ]\r\n
+ \ }\r\n ],\r\n \"operator\": \"GreaterThan\",\r\n
+ \ \"threshold\": 250.0,\r\n \"timeAggregation\": \"Average\"\r\n
+ \ },\r\n {\r\n \"name\": \"cond0\",\r\n \"metricNamespace\":
+ \"microsoft.storage/storageaccounts\",\r\n \"metricName\": \"transactions\",\r\n
+ \ \"dimensions\": [],\r\n \"operator\": \"LessThan\",\r\n
+ \ \"threshold\": 100.0,\r\n \"timeAggregation\": \"Total\"\r\n
+ \ }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n
+ \ },\r\n \"autoMitigate\": true,\r\n \"actions\": [\r\n {\r\n
+ \ \"actionGroupId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag2\",\r\n
+ \ \"webHookProperties\": {\r\n \"test\": \"best\"\r\n }\r\n
+ \ }\r\n ]\r\n }\r\n}"}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['2072']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:25:15 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: [Microsoft-IIS/10.0]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ transfer-encoding: [chunked]
+ vary: [Accept-Encoding]
+ x-aspnet-version: [4.0.30319]
+ 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 metrics alert list]
+ Connection: [keep-alive]
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts?api-version=2018-03-01
+ response:
+ body: {string: "{\r\n \"value\": [\r\n {\r\n \"location\": \"global\",\r\n
+ \ \"type\": \"Microsoft.Insights/metricAlerts\",\r\n \"name\": \"alert1\",\r\n
+ \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1\",\r\n
+ \ \"tags\": {\r\n \"foo\": \"boo\"\r\n },\r\n \"properties\":
+ {\r\n \"description\": \"alt desc\",\r\n \"severity\": 3,\r\n
+ \ \"enabled\": true,\r\n \"scopes\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n
+ \ ],\r\n \"evaluationFrequency\": \"PT5M\",\r\n \"windowSize\":
+ \"PT15M\",\r\n \"templateType\": 8,\r\n \"criteria\": {\r\n
+ \ \"allOf\": [\r\n {\r\n \"name\": \"cond1\",\r\n
+ \ \"metricNamespace\": \"microsoft.storage/storageaccounts\",\r\n
+ \ \"metricName\": \"SuccessE2ELatency\",\r\n \"dimensions\":
+ [\r\n {\r\n \"name\": \"ApiName\",\r\n \"operator\":
+ \"includes\",\r\n \"values\": [\r\n \"GetBlob\",\r\n
+ \ \"PutBlob\"\r\n ]\r\n }\r\n
+ \ ],\r\n \"operator\": \"GreaterThan\",\r\n \"threshold\":
+ 250.0,\r\n \"timeAggregation\": \"Average\"\r\n },\r\n
+ \ {\r\n \"name\": \"cond0\",\r\n \"metricNamespace\":
+ \"microsoft.storage/storageaccounts\",\r\n \"metricName\": \"transactions\",\r\n
+ \ \"dimensions\": [],\r\n \"operator\": \"LessThan\",\r\n
+ \ \"threshold\": 100.0,\r\n \"timeAggregation\":
+ \"Total\"\r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n
+ \ },\r\n \"autoMitigate\": true,\r\n \"actions\": [\r\n
+ \ {\r\n \"actionGroupId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag2\",\r\n
+ \ \"webHookProperties\": {\r\n \"test\": \"best\"\r\n
+ \ }\r\n }\r\n ]\r\n }\r\n }\r\n ]\r\n}"}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['2341']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:25:15 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: [Microsoft-IIS/10.0]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ transfer-encoding: [chunked]
+ vary: [Accept-Encoding]
+ x-aspnet-version: [4.0.30319]
+ x-content-type-options: [nosniff]
+ x-powered-by: [ASP.NET]
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [monitor metrics alert show]
+ Connection: [keep-alive]
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1?api-version=2018-03-01
+ response:
+ body: {string: "{\r\n \"location\": \"global\",\r\n \"type\": \"Microsoft.Insights/metricAlerts\",\r\n
+ \ \"name\": \"alert1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1\",\r\n
+ \ \"tags\": {\r\n \"foo\": \"boo\"\r\n },\r\n \"properties\": {\r\n \"description\":
+ \"alt desc\",\r\n \"severity\": 3,\r\n \"enabled\": true,\r\n \"scopes\":
+ [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Storage/storageAccounts/clitest000002\"\r\n
+ \ ],\r\n \"evaluationFrequency\": \"PT5M\",\r\n \"windowSize\": \"PT15M\",\r\n
+ \ \"templateType\": 8,\r\n \"criteria\": {\r\n \"allOf\": [\r\n
+ \ {\r\n \"name\": \"cond1\",\r\n \"metricNamespace\":
+ \"microsoft.storage/storageaccounts\",\r\n \"metricName\": \"SuccessE2ELatency\",\r\n
+ \ \"dimensions\": [\r\n {\r\n \"name\": \"ApiName\",\r\n
+ \ \"operator\": \"includes\",\r\n \"values\": [\r\n
+ \ \"GetBlob\",\r\n \"PutBlob\"\r\n ]\r\n
+ \ }\r\n ],\r\n \"operator\": \"GreaterThan\",\r\n
+ \ \"threshold\": 250.0,\r\n \"timeAggregation\": \"Average\"\r\n
+ \ },\r\n {\r\n \"name\": \"cond0\",\r\n \"metricNamespace\":
+ \"microsoft.storage/storageaccounts\",\r\n \"metricName\": \"transactions\",\r\n
+ \ \"dimensions\": [],\r\n \"operator\": \"LessThan\",\r\n
+ \ \"threshold\": 100.0,\r\n \"timeAggregation\": \"Total\"\r\n
+ \ }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria\"\r\n
+ \ },\r\n \"autoMitigate\": true,\r\n \"actions\": [\r\n {\r\n
+ \ \"actionGroupId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/microsoft.insights/actionGroups/ag2\",\r\n
+ \ \"webHookProperties\": {\r\n \"test\": \"best\"\r\n }\r\n
+ \ }\r\n ]\r\n }\r\n}"}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['2072']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:25:16 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: [Microsoft-IIS/10.0]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ transfer-encoding: [chunked]
+ vary: [Accept-Encoding]
+ x-aspnet-version: [4.0.30319]
+ x-content-type-options: [nosniff]
+ x-powered-by: [ASP.NET]
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [monitor metrics alert delete]
+ Connection: [keep-alive]
+ Content-Length: ['0']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts/alert1?api-version=2018-03-01
+ response:
+ body: {string: ''}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['0']
+ date: ['Mon, 13 Aug 2018 23:25:22 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: [Microsoft-IIS/10.0]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ x-aspnet-version: [4.0.30319]
+ 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 metrics alert list]
+ Connection: [keep-alive]
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: GET
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_metric_alert_v2000001/providers/Microsoft.Insights/metricAlerts?api-version=2018-03-01
+ response:
+ body: {string: "{\r\n \"value\": []\r\n}"}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['19']
+ content-type: [application/json; charset=utf-8]
+ date: ['Mon, 13 Aug 2018 23:25:22 GMT']
+ expires: ['-1']
+ pragma: [no-cache]
+ server: [Microsoft-IIS/10.0]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ transfer-encoding: [chunked]
+ vary: [Accept-Encoding]
+ x-aspnet-version: [4.0.30319]
+ x-content-type-options: [nosniff]
+ x-powered-by: [ASP.NET]
+ status: {code: 200, message: OK}
+- request:
+ body: null
+ headers:
+ Accept: [application/json]
+ Accept-Encoding: ['gzip, deflate']
+ CommandName: [group delete]
+ Connection: [keep-alive]
+ Content-Length: ['0']
+ Content-Type: [application/json; charset=utf-8]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.44]
+ accept-language: [en-US]
+ method: DELETE
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_metric_alert_v2000001?api-version=2018-05-01
+ response:
+ body: {string: ''}
+ headers:
+ cache-control: [no-cache]
+ content-length: ['0']
+ date: ['Mon, 13 Aug 2018 23:25:23 GMT']
+ expires: ['-1']
+ location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUOjVGTUVUUklDOjVGQUxFUlQ6NUZWMk9GRElXN0dLSEc3TlNXV3xGNjM2NTc5QzQyQ0IzOTY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01']
+ pragma: [no-cache]
+ strict-transport-security: [max-age=31536000; includeSubDomains]
+ x-content-type-options: [nosniff]
+ x-ms-ratelimit-remaining-subscription-deletes: ['14999']
+ status: {code: 202, message: Accepted}
+version: 1
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_action_group_basic_scenario.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_action_group_basic_scenario.yaml
index df8c18d6059..70d6fed6ef2 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_action_group_basic_scenario.yaml
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_action_group_basic_scenario.yaml
@@ -1,26 +1,26 @@
interactions:
- request:
- body: '{"location": "southcentralus", "tags": {"use": "az-test"}}'
+ body: '{"location": "southcentralus", "tags": {"product": "azurecli", "cause":
+ "automation", "date": "2018-08-14T20:56:42Z"}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [group create]
Connection: [keep-alive]
- Content-Length: ['58']
+ Content-Length: ['118']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-14T20:56:42Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:31 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:46 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -38,24 +38,24 @@ interactions:
Connection: [keep-alive]
Content-Length: ['155']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2018-03-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002","type":"Microsoft.Insights/ActionGroups","name":"cliactiongrouptest000002","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactiongro","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['640']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:34 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:48 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1197']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 201, message: Created}
- request:
body: null
@@ -65,18 +65,18 @@ interactions:
CommandName: [monitor action-group list]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups?api-version=2018-03-01
response:
body: {string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002","type":"Microsoft.Insights/ActionGroups","name":"cliactiongrouptest000002","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactiongro","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}]}'}
headers:
cache-control: [no-cache]
content-length: ['652']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:34 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:48 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -93,18 +93,18 @@ interactions:
CommandName: [monitor action-group update]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2018-03-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002","type":"Microsoft.Insights/ActionGroups","name":"cliactiongrouptest000002","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactiongro","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['640']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:35 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:49 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -117,26 +117,27 @@ interactions:
body: '{"location": "Global", "tags": {"owner": "alice"}, "properties": {"groupShortName":
"new_name", "enabled": true, "emailReceivers": [], "smsReceivers": [], "webhookReceivers":
[], "itsmReceivers": [], "azureAppPushReceivers": [], "automationRunbookReceivers":
+ [], "voiceReceivers": [], "logicAppReceivers": [], "azureFunctionReceivers":
[]}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [monitor action-group update]
Connection: [keep-alive]
- Content-Length: ['263']
+ Content-Length: ['340']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2018-03-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002","type":"Microsoft.Insights/ActionGroups","name":"cliactiongrouptest000002","location":"Global","kind":null,"tags":{"owner":"alice"},"properties":{"groupShortName":"new_name","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['649']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:36 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:50 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -144,7 +145,7 @@ interactions:
transfer-encoding: [chunked]
vary: [Accept-Encoding]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 200, message: OK}
- request:
body: null
@@ -154,18 +155,18 @@ interactions:
CommandName: [monitor action-group update]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2018-03-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002","type":"Microsoft.Insights/ActionGroups","name":"cliactiongrouptest000002","location":"Global","kind":null,"tags":{"owner":"alice"},"properties":{"groupShortName":"new_name","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['649']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:37 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:51 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -180,26 +181,27 @@ interactions:
"alice@example.com"}], "smsReceivers": [{"name": "alice_sms", "countryCode":
"1", "phoneNumber": "5551234567"}], "webhookReceivers": [{"name": "alice_web",
"serviceUri": "https://www.example.com/alert?name=alice"}], "itsmReceivers":
- [], "azureAppPushReceivers": [], "automationRunbookReceivers": []}}'
+ [], "azureAppPushReceivers": [], "automationRunbookReceivers": [], "voiceReceivers":
+ [], "logicAppReceivers": [], "azureFunctionReceivers": []}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [monitor action-group update]
Connection: [keep-alive]
- Content-Length: ['466']
+ Content-Length: ['543']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2018-03-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002","type":"Microsoft.Insights/ActionGroups","name":"cliactiongrouptest000002","location":"Global","kind":null,"tags":{"owner":"alice"},"properties":{"groupShortName":"new_name","enabled":true,"emailReceivers":[{"name":"alice","emailAddress":"alice@example.com","status":"Enabled"}],"smsReceivers":[{"name":"alice_sms","countryCode":"1","phoneNumber":"5551234567","status":"Enabled"}],"webhookReceivers":[{"name":"alice_web","serviceUri":"https://www.example.com/alert?name=alice"}],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['879']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:38 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:52 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -217,18 +219,18 @@ interactions:
CommandName: [monitor action-group update]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2018-03-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002","type":"Microsoft.Insights/ActionGroups","name":"cliactiongrouptest000002","location":"Global","kind":null,"tags":{"owner":"alice"},"properties":{"groupShortName":"new_name","enabled":true,"emailReceivers":[{"name":"alice","emailAddress":"alice@example.com","status":"Enabled"}],"smsReceivers":[{"name":"alice_sms","countryCode":"1","phoneNumber":"5551234567","status":"Enabled"}],"webhookReceivers":[{"name":"alice_web","serviceUri":"https://www.example.com/alert?name=alice"}],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['879']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:39 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:53 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -242,26 +244,27 @@ interactions:
"new_name", "enabled": true, "emailReceivers": [{"name": "alice", "emailAddress":
"alice@example.com"}], "smsReceivers": [{"name": "alice_sms", "countryCode":
"1", "phoneNumber": "5551234567"}], "webhookReceivers": [], "itsmReceivers":
- [], "azureAppPushReceivers": [], "automationRunbookReceivers": []}}'
+ [], "azureAppPushReceivers": [], "automationRunbookReceivers": [], "voiceReceivers":
+ [], "logicAppReceivers": [], "azureFunctionReceivers": []}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [monitor action-group update]
Connection: [keep-alive]
- Content-Length: ['387']
+ Content-Length: ['464']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2018-03-01
response:
body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002","type":"Microsoft.Insights/ActionGroups","name":"cliactiongrouptest000002","location":"Global","kind":null,"tags":{"owner":"alice"},"properties":{"groupShortName":"new_name","enabled":true,"emailReceivers":[{"name":"alice","emailAddress":"alice@example.com","status":"Enabled"}],"smsReceivers":[{"name":"alice_sms","countryCode":"1","phoneNumber":"5551234567","status":"Enabled"}],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['803']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:40 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:54 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -280,18 +283,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['28']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: POST
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002/subscribe?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002/subscribe?api-version=2018-03-01
response:
body: {string: '{"Code":"ReceiverNotFound","Message":null}'}
headers:
cache-control: [no-cache]
content-length: ['42']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:41 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:54 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -308,24 +311,24 @@ interactions:
Connection: [keep-alive]
Content-Length: ['25']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: POST
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002/subscribe?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002/subscribe?api-version=2018-03-01
response:
body: {string: '{"Code":"ReceiverAlreadyEnabled","Message":null}'}
headers:
cache-control: [no-cache]
content-length: ['48']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:41 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:55 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1189']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 409, message: Conflict}
- request:
body: null
@@ -336,23 +339,23 @@ interactions:
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: DELETE
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliactiongrouptest000002?api-version=2018-03-01
response:
body: {string: ''}
headers:
cache-control: [no-cache]
content-length: ['0']
- date: ['Thu, 15 Mar 2018 16:42:43 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:57 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-deletes: ['14999']
status: {code: 200, message: OK}
- request:
body: null
@@ -362,18 +365,18 @@ interactions:
CommandName: [monitor action-group list]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups?api-version=2018-03-01
response:
body: {string: '{"value":[]}'}
headers:
cache-control: [no-cache]
content-length: ['12']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:43 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:58 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -391,9 +394,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
@@ -402,12 +404,12 @@ interactions:
headers:
cache-control: [no-cache]
content-length: ['0']
- date: ['Thu, 15 Mar 2018 16:42:45 GMT']
+ date: ['Tue, 14 Aug 2018 20:56:58 GMT']
expires: ['-1']
- location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdRTzVUWUFSQkdGVlJUVlBISlFNN1dFNzZEU0hRNk9TNTNXNHw2MDUzNEUyNjVDNURDOEZGLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
+ location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdXVUEyUzc3Uk5WMlZXRTZETDZaVDVIVVRNVVFDVTY2WTJPR3xCQ0IwNjc2RTE1RThFOTlBLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-deletes: ['14999']
status: {code: 202, message: Accepted}
version: 1
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_action.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_action.yaml
index b380ed0e575..8b50e53c03b 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_action.yaml
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_action.yaml
@@ -1,34 +1,34 @@
interactions:
- request:
- body: '{"location": "southcentralus", "tags": {"use": "az-test"}}'
+ body: '{"location": "southcentralus", "tags": {"product": "azurecli", "cause":
+ "automation", "date": "2018-08-15T00:25:38Z"}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [group create]
Connection: [keep-alive]
- Content-Length: ['58']
+ Content-Length: ['118']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:25:38Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:33 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:42 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1198']
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 201, message: Created}
- request:
- body: '{"location": "global", "properties": {"groupShortName": "cliacty73xnv",
+ body: '{"location": "global", "properties": {"groupShortName": "cliactb6id3w",
"enabled": true, "emailReceivers": [], "smsReceivers": [], "webhookReceivers":
[]}}'
headers:
@@ -38,27 +38,27 @@ interactions:
Connection: [keep-alive]
Content-Length: ['155']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002?api-version=2018-03-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","type":"Microsoft.Insights/ActionGroups","name":"cliact000002","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliacty73xnv","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","type":"Microsoft.Insights/ActionGroups","name":"cliact000002","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactb6id3w","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['640']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:35 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:45 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1195']
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 201, message: Created}
- request:
- body: '{"location": "global", "properties": {"groupShortName": "cliactpgrqvw",
+ body: '{"location": "global", "properties": {"groupShortName": "cliactzl4gpp",
"enabled": true, "emailReceivers": [], "smsReceivers": [], "webhookReceivers":
[]}}'
headers:
@@ -68,18 +68,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['155']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003?api-version=2018-03-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","type":"Microsoft.Insights/ActionGroups","name":"cliact000003","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactpgrqvw","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","type":"Microsoft.Insights/ActionGroups","name":"cliact000003","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactzl4gpp","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['640']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:37 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:46 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -88,7 +88,7 @@ interactions:
x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 201, message: Created}
- request:
- body: '{"location": "global", "properties": {"groupShortName": "cliactwsh2n4",
+ body: '{"location": "global", "properties": {"groupShortName": "cliactygdoa7",
"enabled": true, "emailReceivers": [], "smsReceivers": [], "webhookReceivers":
[]}}'
headers:
@@ -98,18 +98,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['155']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004?api-version=2018-03-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","type":"Microsoft.Insights/ActionGroups","name":"cliact000004","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactwsh2n4","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","type":"Microsoft.Insights/ActionGroups","name":"cliact000004","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactygdoa7","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['640']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:39 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:48 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -125,19 +125,18 @@ interactions:
CommandName: [group show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:25:38Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:39 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:48 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -152,8 +151,8 @@ interactions:
CommandName: [monitor activity-log alert create]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -164,7 +163,7 @@ interactions:
cache-control: [no-cache]
content-length: ['248']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:40 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:49 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -182,8 +181,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['322']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -193,13 +192,13 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:42 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:50 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 201, message: Created}
- request:
body: null
@@ -209,8 +208,8 @@ interactions:
CommandName: [monitor activity-log alert show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -220,7 +219,7 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:48 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:57 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -237,8 +236,8 @@ interactions:
CommandName: [monitor activity-log alert action-group add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -248,7 +247,7 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:50 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:57 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -268,8 +267,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['572']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -279,7 +278,7 @@ interactions:
cache-control: [no-cache]
content-length: ['963']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:50 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:58 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -287,7 +286,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1198']
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 200, message: OK}
- request:
body: null
@@ -297,8 +296,8 @@ interactions:
CommandName: [monitor activity-log alert action-group add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -308,7 +307,7 @@ interactions:
cache-control: [no-cache]
content-length: ['963']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:51 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:59 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -328,8 +327,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['572']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -339,7 +338,7 @@ interactions:
cache-control: [no-cache]
content-length: ['963']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:51 GMT']
+ date: ['Wed, 15 Aug 2018 00:25:59 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -357,8 +356,8 @@ interactions:
CommandName: [monitor activity-log alert action-group add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -368,7 +367,7 @@ interactions:
cache-control: [no-cache]
content-length: ['963']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:52 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:00 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -382,8 +381,8 @@ interactions:
{"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],
"enabled": true, "condition": {"allOf": [{"field": "category", "equals": "ServiceHealth"}]},
"actions": {"actionGroups": [{"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003"},
- {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002"},
- {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004"}]}}}\\\\\\\''\\\''\'''''
+ {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004"},
+ {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002"}]}}}\\\\\\\''\\\''\'''''
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
@@ -391,18 +390,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['1052']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['1489']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:52 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:00 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -420,18 +419,18 @@ interactions:
CommandName: [monitor activity-log alert action-group add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['1489']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:54 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:01 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -445,8 +444,8 @@ interactions:
{"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],
"enabled": true, "condition": {"allOf": [{"field": "category", "equals": "ServiceHealth"}]},
"actions": {"actionGroups": [{"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003"},
- {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002"},
- {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004"}]}}}\\\\\\\''\\\''\'''''
+ {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004"},
+ {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002"}]}}}\\\\\\\''\\\''\'''''
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
@@ -454,18 +453,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['1052']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['1489']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:54 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:02 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -473,7 +472,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1197']
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 200, message: OK}
- request:
body: null
@@ -483,18 +482,18 @@ interactions:
CommandName: [monitor activity-log alert show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['1489']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:55 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:03 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -511,18 +510,18 @@ interactions:
CommandName: [monitor activity-log alert action-group add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['1489']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:55 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:03 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -536,8 +535,9 @@ interactions:
{"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],
"enabled": true, "condition": {"allOf": [{"field": "category", "equals": "ServiceHealth"}]},
"actions": {"actionGroups": [{"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003"},
+ {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004"},
{"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002",
- "webhookProperties": {"purpose": "test"}}, {"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004"}]}}}\\\\\\\''\\\''\'''''
+ "webhookProperties": {"purpose": "test"}}]}}}\\\\\\\''\\\''\'''''
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
@@ -545,18 +545,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['1094']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":{"purpose":"test"}},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":{"purpose":"test"}}]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['1503']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:56 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:03 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -564,7 +564,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1198']
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 200, message: OK}
- request:
body: null
@@ -574,18 +574,18 @@ interactions:
CommandName: [monitor activity-log alert action-group add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":{"purpose":"test"}},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":{"purpose":"test"}}]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['1503']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:56 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:04 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -602,18 +602,18 @@ interactions:
CommandName: [monitor activity-log alert action-group remove]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":{"purpose":"test"}},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null}]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000005","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000003","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000004","webhookProperties":null},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","webhookProperties":{"purpose":"test"}}]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['1503']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:57 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:04 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -635,8 +635,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['812']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -646,7 +646,7 @@ interactions:
cache-control: [no-cache]
content-length: ['1226']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:57 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:05 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -664,8 +664,8 @@ interactions:
CommandName: [monitor activity-log alert action-group remove]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -675,7 +675,7 @@ interactions:
cache-control: [no-cache]
content-length: ['1226']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:58 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:06 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -697,8 +697,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['812']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -708,7 +708,7 @@ interactions:
cache-control: [no-cache]
content-length: ['1226']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:58 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:06 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -716,7 +716,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-writes: ['1197']
status: {code: 200, message: OK}
- request:
body: null
@@ -726,8 +726,8 @@ interactions:
CommandName: [monitor activity-log alert action-group remove]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -737,7 +737,7 @@ interactions:
cache-control: [no-cache]
content-length: ['1226']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:58 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:06 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -757,8 +757,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['334']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -768,7 +768,7 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:42:59 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:06 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -776,7 +776,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 200, message: OK}
- request:
body: null
@@ -787,8 +787,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -797,13 +797,13 @@ interactions:
headers:
cache-control: [no-cache]
content-length: ['0']
- date: ['Thu, 15 Mar 2018 16:43:01 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:09 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-deletes: ['14999']
status: {code: 200, message: OK}
- request:
body: null
@@ -813,8 +813,8 @@ interactions:
CommandName: [monitor activity-log alert show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000005?api-version=2017-04-01
@@ -825,7 +825,7 @@ interactions:
cache-control: [no-cache]
content-length: ['248']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:01 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:09 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -841,9 +841,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
@@ -852,12 +851,12 @@ interactions:
headers:
cache-control: [no-cache]
content-length: ['0']
- date: ['Thu, 15 Mar 2018 16:43:02 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:10 GMT']
expires: ['-1']
- location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdQVFdDN1lGS0NNWVE0QVZHWERYNUczRlcySlM2R0NXVkJITXxDN0Y2NDI4Nzk2RTA2NzYzLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
+ location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdLWFdINVVMRjNER09URldHVk5GRlNBWUNIQzZUUjNNUzdFTHw0RDE1NENGM0EyRUM5MDUwLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-deletes: ['14999']
status: {code: 202, message: Accepted}
version: 1
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_condition.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_condition.yaml
index 2ed847bb140..c44d4b6072d 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_condition.yaml
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_condition.yaml
@@ -1,31 +1,31 @@
interactions:
- request:
- body: '{"location": "southcentralus", "tags": {"use": "az-test"}}'
+ body: '{"location": "southcentralus", "tags": {"product": "azurecli", "cause":
+ "automation", "date": "2018-08-15T00:26:11Z"}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [group create]
Connection: [keep-alive]
- Content-Length: ['58']
+ Content-Length: ['118']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:26:11Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:05 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:12 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 201, message: Created}
- request:
body: null
@@ -35,19 +35,18 @@ interactions:
CommandName: [group show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:26:11Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:04 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:13 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -62,8 +61,8 @@ interactions:
CommandName: [monitor activity-log alert create]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -74,7 +73,7 @@ interactions:
cache-control: [no-cache]
content-length: ['248']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:06 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:13 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -92,8 +91,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['322']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -103,13 +102,13 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:07 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:15 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1197']
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 201, message: Created}
- request:
body: null
@@ -119,8 +118,8 @@ interactions:
CommandName: [monitor activity-log alert show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -130,7 +129,7 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:13 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:22 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -147,8 +146,8 @@ interactions:
CommandName: [monitor activity-log alert update]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -158,7 +157,7 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:14 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:22 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -179,8 +178,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['376']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -190,7 +189,7 @@ interactions:
cache-control: [no-cache]
content-length: ['758']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:15 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:23 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -208,8 +207,8 @@ interactions:
CommandName: [monitor activity-log alert update]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -219,7 +218,7 @@ interactions:
cache-control: [no-cache]
content-length: ['758']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:14 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:24 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -240,8 +239,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['485']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -251,7 +250,7 @@ interactions:
cache-control: [no-cache]
content-length: ['882']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:16 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:24 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -259,7 +258,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1197']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 200, message: OK}
- request:
body: null
@@ -270,9 +269,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
@@ -281,12 +279,12 @@ interactions:
headers:
cache-control: [no-cache]
content-length: ['0']
- date: ['Thu, 15 Mar 2018 16:43:17 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:26 GMT']
expires: ['-1']
- location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdQNFkyWlBSQkFKUDNQNEtXVkdLWkZEREtVWDJRUFRSS1REMnxDMDM3OUE5QjUyNzdCMDc2LVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
+ location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdVVUhCWEVONkhZNzVETjNSSk9UUlVKT1REV0xLU0JFNVZRMnxBOUYzMjk1OEZDMDk5NTNBLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-deletes: ['14999']
status: {code: 202, message: Accepted}
version: 1
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_scope.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_scope.yaml
index 09dfd92e5d9..5fb1523e452 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_scope.yaml
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_activity_log_alert_update_scope.yaml
@@ -1,26 +1,26 @@
interactions:
- request:
- body: '{"location": "southcentralus", "tags": {"use": "az-test"}}'
+ body: '{"location": "southcentralus", "tags": {"product": "azurecli", "cause":
+ "automation", "date": "2018-08-15T00:26:26Z"}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [group create]
Connection: [keep-alive]
- Content-Length: ['58']
+ Content-Length: ['118']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:26:26Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:19 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:28 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -35,19 +35,18 @@ interactions:
CommandName: [group show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:26:26Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:19 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:28 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -62,8 +61,8 @@ interactions:
CommandName: [monitor activity-log alert create]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -74,7 +73,7 @@ interactions:
cache-control: [no-cache]
content-length: ['248']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:19 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:28 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -92,8 +91,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['322']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -103,13 +102,13 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:20 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:30 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1198']
+ x-ms-ratelimit-remaining-subscription-writes: ['1197']
status: {code: 201, message: Created}
- request:
body: null
@@ -119,8 +118,8 @@ interactions:
CommandName: [monitor activity-log alert show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -130,7 +129,7 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:27 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:36 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -147,8 +146,8 @@ interactions:
CommandName: [monitor activity-log alert scope add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -158,7 +157,7 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:27 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:37 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -168,8 +167,8 @@ interactions:
x-content-type-options: [nosniff]
status: {code: 200, message: OK}
- request:
- body: 'b''{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001",
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo"],
+ body: 'b''{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv",
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],
"enabled": true, "condition": {"allOf": [{"field": "category", "equals": "ServiceHealth"}]},
"actions": {"actionGroups": []}}}'''
headers:
@@ -179,18 +178,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['479']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['845']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:29 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:37 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -208,18 +207,18 @@ interactions:
CommandName: [monitor activity-log alert scope add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['845']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:29 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:37 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -229,9 +228,9 @@ interactions:
x-content-type-options: [nosniff]
status: {code: 200, message: OK}
- request:
- body: 'b''{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001",
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo",
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],
+ body: 'b''{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv",
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001",
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],
"enabled": true, "condition": {"allOf": [{"field": "category", "equals": "ServiceHealth"}]},
"actions": {"actionGroups": []}}}'''
headers:
@@ -241,18 +240,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['623']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['988']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:29 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:37 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -260,7 +259,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-writes: ['1197']
status: {code: 200, message: OK}
- request:
body: null
@@ -270,18 +269,18 @@ interactions:
CommandName: [monitor activity-log alert scope add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['988']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:29 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:38 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -291,7 +290,7 @@ interactions:
x-content-type-options: [nosniff]
status: {code: 200, message: OK}
- request:
- body: '{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],
+ body: '{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],
"enabled": true, "condition": {"allOf": [{"field": "category", "equals": "ServiceHealth"}]},
"actions": {"actionGroups": []}}}'
headers:
@@ -301,18 +300,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['332']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['699']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:29 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:39 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -320,7 +319,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1197']
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 200, message: OK}
- request:
body: null
@@ -330,18 +329,18 @@ interactions:
CommandName: [monitor activity-log alert scope add]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['699']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:30 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:39 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -351,9 +350,9 @@ interactions:
x-content-type-options: [nosniff]
status: {code: 200, message: OK}
- request:
- body: 'b''{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001",
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo",
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],
+ body: 'b''{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv",
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001",
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],
"enabled": true, "condition": {"allOf": [{"field": "category", "equals": "ServiceHealth"}]},
"actions": {"actionGroups": []}}}'''
headers:
@@ -363,18 +362,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['623']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['988']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:32 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:39 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -382,7 +381,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-writes: ['1196']
status: {code: 200, message: OK}
- request:
body: null
@@ -392,18 +391,18 @@ interactions:
CommandName: [monitor activity-log alert scope remove]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['988']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:32 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:40 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -413,8 +412,8 @@ interactions:
x-content-type-options: [nosniff]
status: {code: 200, message: OK}
- request:
- body: '{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo",
- "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],
+ body: '{"location": "Global", "tags": {}, "properties": {"scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv",
+ "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],
"enabled": true, "condition": {"allOf": [{"field": "category", "equals": "ServiceHealth"}]},
"actions": {"actionGroups": []}}}'
headers:
@@ -424,18 +423,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['477']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdlo","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggxz5k7km4noy7ul4grh55eqr4ypja3rzenavcg6d65g6mjm5bbp2vmjr6ashmdl"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002","type":"Microsoft.Insights/ActivityLogAlerts","name":"clialert000002","location":"Global","kind":null,"tags":{},"properties":{"scopes":["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpnv","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfvt7isgkbrf6gqvjl6mor7z4agev5lxtcso6736oivotpqnwf6ziuuhdvp4dlpn"],"condition":{"allOf":[{"field":"category","equals":"ServiceHealth","containsAny":null}]},"actions":{"actionGroups":[]},"enabled":true,"description":null},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['843']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:33 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:40 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -443,7 +442,7 @@ interactions:
transfer-encoding: [chunked]
vary: ['Accept-Encoding,Accept-Encoding']
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 200, message: OK}
- request:
body: null
@@ -454,9 +453,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
@@ -465,12 +463,12 @@ interactions:
headers:
cache-control: [no-cache]
content-length: ['0']
- date: ['Thu, 15 Mar 2018 16:43:33 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:41 GMT']
expires: ['-1']
- location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdHWFo1SzdLTTROT1k3VUw0R1JINTVFUVI0WVBKQTNSWkVOQXw1NkEwMTJDNTNGRjQ3M0FFLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
+ location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdGVlQ3SVNHS0JSRjZHUVZKTDZNT1I3WjRBR0VWNUxYVENTT3xBRjQ1Q0VDMERCQzhFNzI5LVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1198']
+ x-ms-ratelimit-remaining-subscription-deletes: ['14999']
status: {code: 202, message: Accepted}
version: 1
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_default_activity_log_alert.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_default_activity_log_alert.yaml
index cdaf7354bea..b0a2a33090b 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_default_activity_log_alert.yaml
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_default_activity_log_alert.yaml
@@ -1,26 +1,26 @@
interactions:
- request:
- body: '{"location": "southcentralus", "tags": {"use": "az-test"}}'
+ body: '{"location": "southcentralus", "tags": {"product": "azurecli", "cause":
+ "automation", "date": "2018-08-15T00:26:42Z"}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [group create]
Connection: [keep-alive]
- Content-Length: ['58']
+ Content-Length: ['118']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:26:42Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:35 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:43 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -35,19 +35,18 @@ interactions:
CommandName: [group show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:26:42Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:35 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:44 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -62,8 +61,8 @@ interactions:
CommandName: [monitor activity-log alert create]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -74,7 +73,7 @@ interactions:
cache-control: [no-cache]
content-length: ['248']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:36 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:44 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -92,8 +91,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['322']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -103,13 +102,13 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:38 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:46 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1179']
+ x-ms-ratelimit-remaining-subscription-writes: ['1198']
status: {code: 201, message: Created}
- request:
body: null
@@ -119,8 +118,8 @@ interactions:
CommandName: [monitor activity-log alert show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -130,7 +129,7 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:43 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:53 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -147,8 +146,8 @@ interactions:
CommandName: [monitor activity-log alert create]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -158,7 +157,7 @@ interactions:
cache-control: [no-cache]
content-length: ['701']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:44 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:53 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -176,9 +175,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
@@ -187,12 +185,12 @@ interactions:
headers:
cache-control: [no-cache]
content-length: ['0']
- date: ['Thu, 15 Mar 2018 16:43:45 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:53 GMT']
expires: ['-1']
- location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdGM01TQlRZT0VCVFlIQTZWRkpBSURLREhGTFRTVENRRjNSRHxCOTUwNzEzMTBBMUI1QTJCLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
+ location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdVQTRZUVA2Rkc3TVpFNVBSSERQT09GNExLV1pVUk9RVEJCNXwwNjBGQTRERjc5Rjk0QkVCLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1197']
+ x-ms-ratelimit-remaining-subscription-deletes: ['14998']
status: {code: 202, message: Accepted}
version: 1
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_disabled_activity_log_alert.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_disabled_activity_log_alert.yaml
index dd29a5182f0..ebcd7fb9bbb 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_disabled_activity_log_alert.yaml
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_disabled_activity_log_alert.yaml
@@ -1,26 +1,26 @@
interactions:
- request:
- body: '{"location": "southcentralus", "tags": {"use": "az-test"}}'
+ body: '{"location": "southcentralus", "tags": {"product": "azurecli", "cause":
+ "automation", "date": "2018-08-15T00:26:54Z"}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [group create]
Connection: [keep-alive]
- Content-Length: ['58']
+ Content-Length: ['118']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:26:54Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:47 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:55 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -35,8 +35,8 @@ interactions:
CommandName: [monitor activity-log alert create]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -47,7 +47,7 @@ interactions:
cache-control: [no-cache]
content-length: ['248']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:47 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:56 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -65,8 +65,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['323']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000002?api-version=2017-04-01
@@ -76,13 +76,13 @@ interactions:
cache-control: [no-cache]
content-length: ['702']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:50 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:57 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1198']
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 201, message: Created}
- request:
body: null
@@ -93,9 +93,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
@@ -104,12 +103,12 @@ interactions:
headers:
cache-control: [no-cache]
content-length: ['0']
- date: ['Thu, 15 Mar 2018 16:43:51 GMT']
+ date: ['Wed, 15 Aug 2018 00:26:59 GMT']
expires: ['-1']
- location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdLTzRIR1FCMzVLWlVaSkhQSlJPNlVHVTZJNkpHNFRNVkpDTXxFRUExN0YxQzc4MkMwNUE5LVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
+ location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdPNVJRUDZSVFRQUVhVV0tWR1VPN0pPRjQ3WFVQSU9CM0tWV3w4OUM3REQwRENFRTY1OTk3LVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1199']
+ x-ms-ratelimit-remaining-subscription-deletes: ['14998']
status: {code: 202, message: Accepted}
version: 1
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_full_fledged_activity_log_alert.yaml b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_full_fledged_activity_log_alert.yaml
index 6d59f1251dd..e0c4fe754c8 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_full_fledged_activity_log_alert.yaml
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_create_full_fledged_activity_log_alert.yaml
@@ -1,31 +1,31 @@
interactions:
- request:
- body: '{"location": "southcentralus", "tags": {"use": "az-test"}}'
+ body: '{"location": "southcentralus", "tags": {"product": "azurecli", "cause":
+ "automation", "date": "2018-08-15T00:26:59Z"}}'
headers:
Accept: [application/json]
Accept-Encoding: ['gzip, deflate']
CommandName: [group create]
Connection: [keep-alive]
- Content-Length: ['58']
+ Content-Length: ['118']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:26:59Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:53 GMT']
+ date: ['Wed, 15 Aug 2018 00:27:01 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1189']
+ x-ms-ratelimit-remaining-subscription-writes: ['1199']
status: {code: 201, message: Created}
- request:
body: null
@@ -35,19 +35,18 @@ interactions:
CommandName: [group show]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"use":"az-test"},"properties":{"provisioningState":"Succeeded"}}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"southcentralus","tags":{"product":"azurecli","cause":"automation","date":"2018-08-15T00:26:59Z"},"properties":{"provisioningState":"Succeeded"}}'}
headers:
cache-control: [no-cache]
- content-length: ['336']
+ content-length: ['392']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:54 GMT']
+ date: ['Wed, 15 Aug 2018 00:27:01 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -55,7 +54,7 @@ interactions:
x-content-type-options: [nosniff]
status: {code: 200, message: OK}
- request:
- body: '{"location": "global", "properties": {"groupShortName": "cliactnviawe",
+ body: '{"location": "global", "properties": {"groupShortName": "cliactgssprq",
"enabled": true, "emailReceivers": [], "smsReceivers": [], "webhookReceivers":
[]}}'
headers:
@@ -65,18 +64,18 @@ interactions:
Connection: [keep-alive]
Content-Length: ['155']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002?api-version=2017-04-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002?api-version=2018-03-01
response:
- body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","type":"Microsoft.Insights/ActionGroups","name":"cliact000002","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactnviawe","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
+ body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/actionGroups/cliact000002","type":"Microsoft.Insights/ActionGroups","name":"cliact000002","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"cliactgssprq","enabled":true,"emailReceivers":[],"smsReceivers":[],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[]},"identity":null}'}
headers:
cache-control: [no-cache]
content-length: ['640']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:55 GMT']
+ date: ['Wed, 15 Aug 2018 00:27:03 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
@@ -92,8 +91,8 @@ interactions:
CommandName: [monitor activity-log alert create]
Connection: [keep-alive]
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000003?api-version=2017-04-01
@@ -104,7 +103,7 @@ interactions:
cache-control: [no-cache]
content-length: ['248']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:56 GMT']
+ date: ['Wed, 15 Aug 2018 00:27:03 GMT']
expires: ['-1']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
@@ -123,8 +122,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['595']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 azure-mgmt-monitor/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 azure-mgmt-monitor/0.5.2 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/microsoft.insights/activityLogAlerts/clialert000003?api-version=2017-04-01
@@ -134,13 +133,13 @@ interactions:
cache-control: [no-cache]
content-length: ['1013']
content-type: [application/json; charset=utf-8]
- date: ['Thu, 15 Mar 2018 16:43:57 GMT']
+ date: ['Wed, 15 Aug 2018 00:27:04 GMT']
expires: ['-1']
pragma: [no-cache]
server: [Microsoft-IIS/8.5]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1198']
+ x-ms-ratelimit-remaining-subscription-writes: ['1197']
status: {code: 201, message: Created}
- request:
body: null
@@ -151,9 +150,8 @@ interactions:
Connection: [keep-alive]
Content-Length: ['0']
Content-Type: [application/json; charset=utf-8]
- User-Agent: [python/3.6.1 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.4.27
- msrest_azure/0.4.22 resourcemanagementclient/1.2.1 Azure-SDK-For-Python
- AZURECLI/2.0.30]
+ User-Agent: [python/3.6.1 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.4
+ msrest_azure/0.5.0 resourcemanagementclient/2.0.0 Azure-SDK-For-Python AZURECLI/2.0.45]
accept-language: [en-US]
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01
@@ -162,12 +160,12 @@ interactions:
headers:
cache-control: [no-cache]
content-length: ['0']
- date: ['Thu, 15 Mar 2018 16:43:59 GMT']
+ date: ['Wed, 15 Aug 2018 00:27:05 GMT']
expires: ['-1']
- location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdUV1hESVpYU0s1VjVJWEgyM1pPNFo2TzVSTjNPVTJGUUk1SHxDRDBBMDQyMjlBMjBENDExLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
+ location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdITFVXM0dNSVJKUVdMM1VDQTNWN0ZNNjJIQkNKMzJZWUhMRnxDNTI3MDVGOUE2MDUwREMwLVNPVVRIQ0VOVFJBTFVTIiwiam9iTG9jYXRpb24iOiJzb3V0aGNlbnRyYWx1cyJ9?api-version=2018-05-01']
pragma: [no-cache]
strict-transport-security: [max-age=31536000; includeSubDomains]
x-content-type-options: [nosniff]
- x-ms-ratelimit-remaining-subscription-writes: ['1196']
+ x-ms-ratelimit-remaining-subscription-deletes: ['14999']
status: {code: 202, message: Accepted}
version: 1
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/test_monitor_metric_alert_scenarios.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/test_monitor_metric_alert_scenarios.py
index 49ddcc369ab..877c95e2144 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/test_monitor_metric_alert_scenarios.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/tests/latest/test_monitor_metric_alert_scenarios.py
@@ -3,10 +3,59 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
-from azure.cli.testsdk import ScenarioTest, JMESPathCheck, ResourceGroupPreparer
+from azure.cli.testsdk import ScenarioTest, JMESPathCheck, ResourceGroupPreparer, StorageAccountPreparer
class MonitorTests(ScenarioTest):
+
+ @ResourceGroupPreparer(name_prefix='cli_test_metric_alert_v2')
+ @StorageAccountPreparer()
+ def test_metric_alert_v2_scenario(self, resource_group, storage_account):
+
+ from msrestazure.tools import resource_id
+ self.kwargs.update({
+ 'alert': 'alert1',
+ 'sa': storage_account,
+ 'ag1': 'ag1',
+ 'ag2': 'ag2',
+ 'webhooks': '{{test=banoodle}}',
+ 'sub': self.get_subscription_id(),
+ 'sa_id': resource_id(
+ resource_group=resource_group,
+ subscription=self.get_subscription_id(),
+ name=storage_account,
+ namespace='Microsoft.Storage',
+ type='storageAccounts')
+ })
+ self.cmd('monitor action-group create -g {rg} -n {ag1}')
+ self.cmd('monitor action-group create -g {rg} -n {ag2}')
+ self.cmd('monitor metrics alert create -g {rg} -n {alert} --scopes {sa_id} --action {ag1} --description "Test" --condition "total transactions > 5 where ResponseType includes Success and ApiName includes GetBlob" --condition "avg SuccessE2ELatency > 250 where ApiName includes GetBlob or PutBlob"', checks=[
+ self.check('description', 'Test'),
+ self.check('severity', 2),
+ self.check('autoMitigate', None),
+ self.check('windowSize', '0:05:00'),
+ self.check('evaluationFrequency', '0:01:00'),
+ self.check('length(criteria.allOf)', 2),
+ self.check('length(criteria.allOf[0].dimensions)', 2),
+ self.check('length(criteria.allOf[1].dimensions)', 1)
+ ])
+ self.cmd('monitor metrics alert update -g {rg} -n {alert} --severity 3 --description "alt desc" --add-action ag2 test=best --remove-action ag1 --remove-condition cond0 --add-condition "total transactions < 100" --evaluation-frequency 5m --window-size 15m --tags foo=boo --auto-mitigate', checks=[
+ self.check('description', 'alt desc'),
+ self.check('severity', 3),
+ self.check('autoMitigate', True),
+ self.check('windowSize', '0:15:00'),
+ self.check('evaluationFrequency', '0:05:00'),
+ self.check('length(criteria.allOf)', 2),
+ self.check('length(criteria.allOf[0].dimensions)', 1),
+ self.check('length(criteria.allOf[1].dimensions)', 0)
+ ])
+ self.cmd('monitor metrics alert list -g {rg}',
+ checks=self.check('length(@)', 1))
+ self.cmd('monitor metrics alert show -g {rg} -n {alert}')
+ self.cmd('monitor metrics alert delete -g {rg} -n {alert}')
+ self.cmd('monitor metrics alert list -g {rg}',
+ checks=self.check('length(@)', 0))
+
@ResourceGroupPreparer(name_prefix='cli_test_monitor')
def test_metric_alert_basic_scenarios(self, resource_group):
vm = 'vm1'
diff --git a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/validators.py b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/validators.py
index b1d5f0994ea..91db662d074 100644
--- a/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/validators.py
+++ b/src/command_modules/azure-cli-monitor/azure/cli/command_modules/monitor/validators.py
@@ -273,3 +273,54 @@ def process_webhook_prop(namespace):
result[key] = value
namespace.webhook_properties = result
+
+
+def get_action_group_validator(dest):
+ def validate_action_groups(cmd, namespace):
+ action_groups = getattr(namespace, dest, None)
+
+ if not action_groups:
+ return
+
+ from msrestazure.tools import is_valid_resource_id, resource_id
+ from azure.cli.core.commands.client_factory import get_subscription_id
+
+ subscription = get_subscription_id(cmd.cli_ctx)
+ resource_group = namespace.resource_group_name
+ for group in action_groups:
+ if not is_valid_resource_id(group.action_group_id):
+ group.action_group_id = resource_id(
+ subscription=subscription,
+ resource_group=resource_group,
+ namespace='microsoft.insights',
+ type='actionGroups',
+ name=group.action_group_id
+ )
+ return validate_action_groups
+
+
+def get_action_group_id_validator(dest):
+ def validate_action_group_ids(cmd, namespace):
+ action_groups = getattr(namespace, dest, None)
+
+ if not action_groups:
+ return
+
+ from msrestazure.tools import is_valid_resource_id, resource_id
+ from azure.cli.core.commands.client_factory import get_subscription_id
+
+ action_group_ids = []
+ subscription = get_subscription_id(cmd.cli_ctx)
+ resource_group = namespace.resource_group_name
+ for group in action_groups:
+ if not is_valid_resource_id(group):
+ group = resource_id(
+ subscription=subscription,
+ resource_group=resource_group,
+ namespace='microsoft.insights',
+ type='actionGroups',
+ name=group
+ )
+ action_group_ids.append(group)
+ setattr(namespace, dest, action_group_ids)
+ return validate_action_group_ids
diff --git a/src/command_modules/azure-cli-monitor/setup.py b/src/command_modules/azure-cli-monitor/setup.py
index e518dcce9d6..40169a5e5e7 100644
--- a/src/command_modules/azure-cli-monitor/setup.py
+++ b/src/command_modules/azure-cli-monitor/setup.py
@@ -29,7 +29,7 @@
DEPENDENCIES = [
'azure-cli-core',
- 'azure-mgmt-monitor==0.5.0'
+ 'azure-mgmt-monitor==0.5.2'
]
with open('README.rst', 'r', encoding='utf-8') as f:
@@ -52,7 +52,8 @@
'azure.cli',
'azure.cli.command_modules',
'azure.cli.command_modules.monitor',
- 'azure.cli.command_modules.monitor.operations'
+ 'azure.cli.command_modules.monitor.operations',
+ 'azure.cli.command_modules.monitor.grammar'
],
package_data={'azure.cli.command_modules.monitor.operations': ['autoscale-parameters-template.json']},
install_requires=DEPENDENCIES,
diff --git a/src/command_modules/azure-cli-role/HISTORY.rst b/src/command_modules/azure-cli-role/HISTORY.rst
index 9282697139c..cb2434184bb 100644
--- a/src/command_modules/azure-cli-role/HISTORY.rst
+++ b/src/command_modules/azure-cli-role/HISTORY.rst
@@ -2,6 +2,11 @@
Release History
===============
+2.1.4
+++++++
+* Minor fixes.
+
+
2.1.3
++++++
* role assignment: fix a recent regression that principalName is missing
diff --git a/src/command_modules/azure-cli-role/setup.py b/src/command_modules/azure-cli-role/setup.py
index 27f0e2dbab4..d8d4908e1f4 100644
--- a/src/command_modules/azure-cli-role/setup.py
+++ b/src/command_modules/azure-cli-role/setup.py
@@ -14,7 +14,7 @@
logger.warn("Wheel is not available, disabling bdist_wheel hook")
cmdclass = {}
-VERSION = "2.1.3"
+VERSION = "2.1.4"
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
@@ -33,7 +33,7 @@
DEPENDENCIES = [
'azure-cli-core',
'azure-mgmt-authorization==0.50.0',
- 'azure-mgmt-monitor==0.5.0',
+ 'azure-mgmt-monitor==0.5.2',
'azure-graphrbac==0.40.0',
'azure-keyvault==1.1.0',
'pytz'
diff --git a/tools/setup.py b/tools/setup.py
index 9bf3d1b364f..307d5b935c9 100644
--- a/tools/setup.py
+++ b/tools/setup.py
@@ -24,7 +24,7 @@
# Until https://gitlab.com/pycqa/flake8/issues/415 is resolved, pin version of pycodestyle
DEPENDENCIES = [
'autopep8>=1.2.4',
- 'pylint>=1.7.1',
+ 'pylint==1.9.2',
'coverage>=4.2',
'flake8==3.5.0',
'pycodestyle==2.3.1',