From 708f1bb28cfdc670dbf3f8bd1953ae07fcdce7bd Mon Sep 17 00:00:00 2001 From: AllyWang Date: Tue, 16 Jan 2024 15:29:40 +0800 Subject: [PATCH 1/5] add metric list aaz --- .../monitor/aaz/latest/monitor/__cmd_group.py | 2 +- .../aaz/latest/monitor/metrics/__init__.py | 3 + .../monitor/metrics/_list_by_subscription.py | 329 +++++++++++++++++ .../metrics/_list_by_subscription_post.py | 334 ++++++++++++++++++ .../_list_definition_by_subscription.py | 234 ++++++++++++ 5 files changed, 901 insertions(+), 1 deletion(-) create mode 100644 src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription.py create mode 100644 src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription_post.py create mode 100644 src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_definition_by_subscription.py diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/__cmd_group.py index b7be6b843b5..84ca1041466 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/__cmd_group.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/__cmd_group.py @@ -15,7 +15,7 @@ "monitor", ) class __CMDGroup(AAZCommandGroup): - """Manage the Azure Monitor Service. + """Monitor. """ pass diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/__init__.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/__init__.py index 89698f82aa8..f78a051f3a4 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/__init__.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/__init__.py @@ -10,5 +10,8 @@ from .__cmd_group import * from ._list import * +from ._list_by_subscription import * +from ._list_by_subscription_post import * +from ._list_definition_by_subscription import * from ._list_definitions import * from ._list_namespaces import * diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription.py new file mode 100644 index 00000000000..b63b9d113df --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription.py @@ -0,0 +1,329 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "monitor metrics list-by-subscription", +) +class ListBySubscription(AAZCommand): + """List the metric data for a subscription. + """ + + _aaz_info = { + "version": "2023-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.insights/metrics", "2023-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.auto_adjust_timegrain = AAZBoolArg( + options=["--auto-adjust-timegrain"], + help="When set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults to false.", + ) + _args_schema.validate_dimensions = AAZBoolArg( + options=["--validate-dimensions"], + help="When set to false, invalid filter parameter values will be ignored. When set to true, an error is returned for invalid filter parameters. Defaults to true.", + ) + _args_schema.aggregation = AAZStrArg( + options=["--aggregation"], + help="The list of aggregation types (comma separated) to retrieve. *Examples: average, minimum, maximum*", + ) + _args_schema.filter = AAZStrArg( + options=["--filter"], + help="The **$filter** is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.", + ) + _args_schema.interval = AAZStrArg( + options=["--interval"], + help="The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for 'FULL' value that returns single datapoint for entire time span requested. *Examples: PT15M, PT1H, P1D, FULL*", + ) + _args_schema.metricnames = AAZStrArg( + options=["--metricnames"], + help="The names of the metrics (comma separated) to retrieve.", + ) + _args_schema.metricnamespace = AAZStrArg( + options=["--metricnamespace"], + help="Metric namespace where the metrics you want reside.", + ) + _args_schema.orderby = AAZStrArg( + options=["--orderby"], + help="The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. *Examples: sum asc*", + ) + _args_schema.region = AAZStrArg( + options=["--region"], + help="The region where the metrics you want reside.", + required=True, + ) + _args_schema.result_type = AAZStrArg( + options=["--result-type"], + help="Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.", + enum={"Data": "Data", "Metadata": "Metadata"}, + ) + _args_schema.rollupby = AAZStrArg( + options=["--rollupby"], + help="Dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.", + ) + _args_schema.timespan = AAZStrArg( + options=["--timespan"], + help="The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.", + ) + _args_schema.top = AAZIntArg( + options=["--top"], + help="The maximum number of records to retrieve per resource ID in the request. Valid only if filter is specified. Defaults to 10.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.MetricsListAtSubscriptionScope(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class MetricsListAtSubscriptionScope(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metrics", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "$filter", self.ctx.args.filter, + ), + **self.serialize_query_param( + "AutoAdjustTimegrain", self.ctx.args.auto_adjust_timegrain, + ), + **self.serialize_query_param( + "ValidateDimensions", self.ctx.args.validate_dimensions, + ), + **self.serialize_query_param( + "aggregation", self.ctx.args.aggregation, + ), + **self.serialize_query_param( + "interval", self.ctx.args.interval, + ), + **self.serialize_query_param( + "metricnames", self.ctx.args.metricnames, + ), + **self.serialize_query_param( + "metricnamespace", self.ctx.args.metricnamespace, + ), + **self.serialize_query_param( + "orderby", self.ctx.args.orderby, + ), + **self.serialize_query_param( + "region", self.ctx.args.region, + required=True, + ), + **self.serialize_query_param( + "resultType", self.ctx.args.result_type, + ), + **self.serialize_query_param( + "rollupby", self.ctx.args.rollupby, + ), + **self.serialize_query_param( + "timespan", self.ctx.args.timespan, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2023-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.cost = AAZIntType() + _schema_on_200.interval = AAZStrType() + _schema_on_200.namespace = AAZStrType() + _schema_on_200.resourceregion = AAZStrType() + _schema_on_200.timespan = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.display_description = AAZStrType( + serialized_name="displayDescription", + ) + _element.error_code = AAZStrType( + serialized_name="errorCode", + ) + _element.error_message = AAZStrType( + serialized_name="errorMessage", + ) + _element.id = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZObjectType( + flags={"required": True}, + ) + _ListBySubscriptionHelper._build_schema_localizable_string_read(_element.name) + _element.timeseries = AAZListType( + flags={"required": True}, + ) + _element.type = AAZStrType( + flags={"required": True}, + ) + _element.unit = AAZStrType( + flags={"required": True}, + ) + + timeseries = cls._schema_on_200.value.Element.timeseries + timeseries.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.timeseries.Element + _element.data = AAZListType() + _element.metadatavalues = AAZListType() + + data = cls._schema_on_200.value.Element.timeseries.Element.data + data.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.timeseries.Element.data.Element + _element.average = AAZFloatType() + _element.count = AAZFloatType() + _element.maximum = AAZFloatType() + _element.minimum = AAZFloatType() + _element.time_stamp = AAZStrType( + serialized_name="timeStamp", + flags={"required": True}, + ) + _element.total = AAZFloatType() + + metadatavalues = cls._schema_on_200.value.Element.timeseries.Element.metadatavalues + metadatavalues.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.timeseries.Element.metadatavalues.Element + _element.name = AAZObjectType() + _ListBySubscriptionHelper._build_schema_localizable_string_read(_element.name) + _element.value = AAZStrType() + + return cls._schema_on_200 + + +class _ListBySubscriptionHelper: + """Helper class for ListBySubscription""" + + _schema_localizable_string_read = None + + @classmethod + def _build_schema_localizable_string_read(cls, _schema): + if cls._schema_localizable_string_read is not None: + _schema.localized_value = cls._schema_localizable_string_read.localized_value + _schema.value = cls._schema_localizable_string_read.value + return + + cls._schema_localizable_string_read = _schema_localizable_string_read = AAZObjectType() + + localizable_string_read = _schema_localizable_string_read + localizable_string_read.localized_value = AAZStrType( + serialized_name="localizedValue", + ) + localizable_string_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.localized_value = cls._schema_localizable_string_read.localized_value + _schema.value = cls._schema_localizable_string_read.value + + +__all__ = ["ListBySubscription"] diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription_post.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription_post.py new file mode 100644 index 00000000000..489a018ce73 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription_post.py @@ -0,0 +1,334 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "monitor metrics list-by-subscription-post", +) +class ListBySubscriptionPost(AAZCommand): + """Lists the metric data for a subscription. Parameters can be specified on the body. + """ + + _aaz_info = { + "version": "2023-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.insights/metrics", "2023-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.region = AAZStrArg( + options=["--region"], + help="The region where the metrics you want reside.", + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.aggregation = AAZStrArg( + options=["--aggregation"], + arg_group="Body", + help="The list of aggregation types (comma separated) to retrieve.", + ) + _args_schema.auto_adjust_timegrain = AAZBoolArg( + options=["--auto-adjust-timegrain"], + arg_group="Body", + help="When set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults to false.", + ) + _args_schema.filter = AAZStrArg( + options=["--filter"], + arg_group="Body", + help="The **$filter** is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.", + ) + _args_schema.interval = AAZStrArg( + options=["--interval"], + arg_group="Body", + help="The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for 'FULL' value that returns single datapoint for entire time span requested. *Examples: PT15M, PT1H, P1D, FULL*", + ) + _args_schema.metric_names = AAZStrArg( + options=["--metric-names"], + arg_group="Body", + help="The names of the metrics (comma separated) to retrieve.", + ) + _args_schema.metric_namespace = AAZStrArg( + options=["--metric-namespace"], + arg_group="Body", + help="Metric namespace where the metrics you want reside.", + ) + _args_schema.order_by = AAZStrArg( + options=["--order-by"], + arg_group="Body", + help="The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. Examples: sum asc.", + ) + _args_schema.result_type = AAZStrArg( + options=["--result-type"], + arg_group="Body", + help="Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.", + enum={"Data": "Data", "Metadata": "Metadata"}, + ) + _args_schema.roll_up_by = AAZStrArg( + options=["--roll-up-by"], + arg_group="Body", + help="Dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.", + ) + _args_schema.timespan = AAZStrArg( + options=["--timespan"], + arg_group="Body", + help="The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.", + ) + _args_schema.top = AAZIntArg( + options=["--top"], + arg_group="Body", + help="The maximum number of records to retrieve. Valid only if $filter is specified. Defaults to 10.", + ) + _args_schema.validate_dimensions = AAZBoolArg( + options=["--validate-dimensions"], + arg_group="Body", + help="When set to false, invalid filter parameter values will be ignored. When set to true, an error is returned for invalid filter parameters. Defaults to true.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.MetricsListAtSubscriptionScopePost(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class MetricsListAtSubscriptionScopePost(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metrics", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "region", self.ctx.args.region, + required=True, + ), + **self.serialize_query_param( + "api-version", "2023-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"client_flatten": True}} + ) + _builder.set_prop("aggregation", AAZStrType, ".aggregation") + _builder.set_prop("autoAdjustTimegrain", AAZBoolType, ".auto_adjust_timegrain") + _builder.set_prop("filter", AAZStrType, ".filter") + _builder.set_prop("interval", AAZStrType, ".interval") + _builder.set_prop("metricNames", AAZStrType, ".metric_names") + _builder.set_prop("metricNamespace", AAZStrType, ".metric_namespace") + _builder.set_prop("orderBy", AAZStrType, ".order_by") + _builder.set_prop("resultType", AAZStrType, ".result_type") + _builder.set_prop("rollUpBy", AAZStrType, ".roll_up_by") + _builder.set_prop("timespan", AAZStrType, ".timespan") + _builder.set_prop("top", AAZIntType, ".top") + _builder.set_prop("validateDimensions", AAZBoolType, ".validate_dimensions") + + return self.serialize_content(_content_value) + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.cost = AAZIntType() + _schema_on_200.interval = AAZStrType() + _schema_on_200.namespace = AAZStrType() + _schema_on_200.resourceregion = AAZStrType() + _schema_on_200.timespan = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.display_description = AAZStrType( + serialized_name="displayDescription", + ) + _element.error_code = AAZStrType( + serialized_name="errorCode", + ) + _element.error_message = AAZStrType( + serialized_name="errorMessage", + ) + _element.id = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZObjectType( + flags={"required": True}, + ) + _ListBySubscriptionPostHelper._build_schema_localizable_string_read(_element.name) + _element.timeseries = AAZListType( + flags={"required": True}, + ) + _element.type = AAZStrType( + flags={"required": True}, + ) + _element.unit = AAZStrType( + flags={"required": True}, + ) + + timeseries = cls._schema_on_200.value.Element.timeseries + timeseries.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.timeseries.Element + _element.data = AAZListType() + _element.metadatavalues = AAZListType() + + data = cls._schema_on_200.value.Element.timeseries.Element.data + data.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.timeseries.Element.data.Element + _element.average = AAZFloatType() + _element.count = AAZFloatType() + _element.maximum = AAZFloatType() + _element.minimum = AAZFloatType() + _element.time_stamp = AAZStrType( + serialized_name="timeStamp", + flags={"required": True}, + ) + _element.total = AAZFloatType() + + metadatavalues = cls._schema_on_200.value.Element.timeseries.Element.metadatavalues + metadatavalues.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.timeseries.Element.metadatavalues.Element + _element.name = AAZObjectType() + _ListBySubscriptionPostHelper._build_schema_localizable_string_read(_element.name) + _element.value = AAZStrType() + + return cls._schema_on_200 + + +class _ListBySubscriptionPostHelper: + """Helper class for ListBySubscriptionPost""" + + _schema_localizable_string_read = None + + @classmethod + def _build_schema_localizable_string_read(cls, _schema): + if cls._schema_localizable_string_read is not None: + _schema.localized_value = cls._schema_localizable_string_read.localized_value + _schema.value = cls._schema_localizable_string_read.value + return + + cls._schema_localizable_string_read = _schema_localizable_string_read = AAZObjectType() + + localizable_string_read = _schema_localizable_string_read + localizable_string_read.localized_value = AAZStrType( + serialized_name="localizedValue", + ) + localizable_string_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.localized_value = cls._schema_localizable_string_read.localized_value + _schema.value = cls._schema_localizable_string_read.value + + +__all__ = ["ListBySubscriptionPost"] diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_definition_by_subscription.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_definition_by_subscription.py new file mode 100644 index 00000000000..e3bed6366a6 --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_definition_by_subscription.py @@ -0,0 +1,234 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "monitor metrics list-definition-by-subscription", +) +class ListDefinitionBySubscription(AAZCommand): + """List the metric definitions for the subscription. + """ + + _aaz_info = { + "version": "2023-10-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/microsoft.insights/metricdefinitions", "2023-10-01"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.metricnamespace = AAZStrArg( + options=["--metricnamespace"], + help="Metric namespace where the metrics you want reside.", + ) + _args_schema.region = AAZStrArg( + options=["--region"], + help="The region where the metrics you want reside.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.MetricDefinitionsListAtSubscriptionScope(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + return result + + class MetricDefinitionsListAtSubscriptionScope(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricDefinitions", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "metricnamespace", self.ctx.args.metricnamespace, + ), + **self.serialize_query_param( + "region", self.ctx.args.region, + required=True, + ), + **self.serialize_query_param( + "api-version", "2023-10-01", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.category = AAZStrType() + _element.dimensions = AAZListType() + _element.display_description = AAZStrType( + serialized_name="displayDescription", + ) + _element.id = AAZStrType() + _element.is_dimension_required = AAZBoolType( + serialized_name="isDimensionRequired", + ) + _element.metric_availabilities = AAZListType( + serialized_name="metricAvailabilities", + ) + _element.metric_class = AAZStrType( + serialized_name="metricClass", + ) + _element.name = AAZObjectType() + _ListDefinitionBySubscriptionHelper._build_schema_localizable_string_read(_element.name) + _element.namespace = AAZStrType() + _element.primary_aggregation_type = AAZStrType( + serialized_name="primaryAggregationType", + ) + _element.resource_id = AAZStrType( + serialized_name="resourceId", + ) + _element.supported_aggregation_types = AAZListType( + serialized_name="supportedAggregationTypes", + ) + _element.unit = AAZStrType() + + dimensions = cls._schema_on_200.value.Element.dimensions + dimensions.Element = AAZObjectType() + _ListDefinitionBySubscriptionHelper._build_schema_localizable_string_read(dimensions.Element) + + metric_availabilities = cls._schema_on_200.value.Element.metric_availabilities + metric_availabilities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.metric_availabilities.Element + _element.retention = AAZStrType() + _element.time_grain = AAZStrType( + serialized_name="timeGrain", + ) + + supported_aggregation_types = cls._schema_on_200.value.Element.supported_aggregation_types + supported_aggregation_types.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListDefinitionBySubscriptionHelper: + """Helper class for ListDefinitionBySubscription""" + + _schema_localizable_string_read = None + + @classmethod + def _build_schema_localizable_string_read(cls, _schema): + if cls._schema_localizable_string_read is not None: + _schema.localized_value = cls._schema_localizable_string_read.localized_value + _schema.value = cls._schema_localizable_string_read.value + return + + cls._schema_localizable_string_read = _schema_localizable_string_read = AAZObjectType() + + localizable_string_read = _schema_localizable_string_read + localizable_string_read.localized_value = AAZStrType( + serialized_name="localizedValue", + ) + localizable_string_read.value = AAZStrType( + flags={"required": True}, + ) + + _schema.localized_value = cls._schema_localizable_string_read.localized_value + _schema.value = cls._schema_localizable_string_read.value + + +__all__ = ["ListDefinitionBySubscription"] From 9a708ed72aca0397d9ced13da6a82ea58cd169a1 Mon Sep 17 00:00:00 2001 From: AllyWang Date: Tue, 16 Jan 2024 16:08:51 +0800 Subject: [PATCH 2/5] adjust name --- .../aaz/latest/monitor/metrics/__init__.py | 5 +- .../monitor/metrics/_list_by_subscription.py | 329 ------------------ ...t_by_subscription_post.py => _list_sub.py} | 14 +- ...bscription.py => _list_sub_definitions.py} | 14 +- 4 files changed, 16 insertions(+), 346 deletions(-) delete mode 100644 src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription.py rename src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/{_list_by_subscription_post.py => _list_sub.py} (97%) rename src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/{_list_definition_by_subscription.py => _list_sub_definitions.py} (94%) diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/__init__.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/__init__.py index f78a051f3a4..92c07af8d7c 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/__init__.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/__init__.py @@ -10,8 +10,7 @@ from .__cmd_group import * from ._list import * -from ._list_by_subscription import * -from ._list_by_subscription_post import * -from ._list_definition_by_subscription import * from ._list_definitions import * from ._list_namespaces import * +from ._list_sub import * +from ._list_sub_definitions import * diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription.py deleted file mode 100644 index b63b9d113df..00000000000 --- a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription.py +++ /dev/null @@ -1,329 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "monitor metrics list-by-subscription", -) -class ListBySubscription(AAZCommand): - """List the metric data for a subscription. - """ - - _aaz_info = { - "version": "2023-10-01", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/microsoft.insights/metrics", "2023-10-01"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.auto_adjust_timegrain = AAZBoolArg( - options=["--auto-adjust-timegrain"], - help="When set to true, if the timespan passed in is not supported by this metric, the API will return the result using the closest supported timespan. When set to false, an error is returned for invalid timespan parameters. Defaults to false.", - ) - _args_schema.validate_dimensions = AAZBoolArg( - options=["--validate-dimensions"], - help="When set to false, invalid filter parameter values will be ignored. When set to true, an error is returned for invalid filter parameters. Defaults to true.", - ) - _args_schema.aggregation = AAZStrArg( - options=["--aggregation"], - help="The list of aggregation types (comma separated) to retrieve. *Examples: average, minimum, maximum*", - ) - _args_schema.filter = AAZStrArg( - options=["--filter"], - help="The **$filter** is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.", - ) - _args_schema.interval = AAZStrArg( - options=["--interval"], - help="The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for 'FULL' value that returns single datapoint for entire time span requested. *Examples: PT15M, PT1H, P1D, FULL*", - ) - _args_schema.metricnames = AAZStrArg( - options=["--metricnames"], - help="The names of the metrics (comma separated) to retrieve.", - ) - _args_schema.metricnamespace = AAZStrArg( - options=["--metricnamespace"], - help="Metric namespace where the metrics you want reside.", - ) - _args_schema.orderby = AAZStrArg( - options=["--orderby"], - help="The aggregation to use for sorting results and the direction of the sort. Only one order can be specified. *Examples: sum asc*", - ) - _args_schema.region = AAZStrArg( - options=["--region"], - help="The region where the metrics you want reside.", - required=True, - ) - _args_schema.result_type = AAZStrArg( - options=["--result-type"], - help="Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details.", - enum={"Data": "Data", "Metadata": "Metadata"}, - ) - _args_schema.rollupby = AAZStrArg( - options=["--rollupby"], - help="Dimension name(s) to rollup results by. For example if you only want to see metric values with a filter like 'City eq Seattle or City eq Tacoma' but don't want to see separate values for each city, you can specify 'RollUpBy=City' to see the results for Seattle and Tacoma rolled up into one timeseries.", - ) - _args_schema.timespan = AAZStrArg( - options=["--timespan"], - help="The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.", - ) - _args_schema.top = AAZIntArg( - options=["--top"], - help="The maximum number of records to retrieve per resource ID in the request. Valid only if filter is specified. Defaults to 10.", - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.MetricsListAtSubscriptionScope(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class MetricsListAtSubscriptionScope(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metrics", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "$filter", self.ctx.args.filter, - ), - **self.serialize_query_param( - "AutoAdjustTimegrain", self.ctx.args.auto_adjust_timegrain, - ), - **self.serialize_query_param( - "ValidateDimensions", self.ctx.args.validate_dimensions, - ), - **self.serialize_query_param( - "aggregation", self.ctx.args.aggregation, - ), - **self.serialize_query_param( - "interval", self.ctx.args.interval, - ), - **self.serialize_query_param( - "metricnames", self.ctx.args.metricnames, - ), - **self.serialize_query_param( - "metricnamespace", self.ctx.args.metricnamespace, - ), - **self.serialize_query_param( - "orderby", self.ctx.args.orderby, - ), - **self.serialize_query_param( - "region", self.ctx.args.region, - required=True, - ), - **self.serialize_query_param( - "resultType", self.ctx.args.result_type, - ), - **self.serialize_query_param( - "rollupby", self.ctx.args.rollupby, - ), - **self.serialize_query_param( - "timespan", self.ctx.args.timespan, - ), - **self.serialize_query_param( - "top", self.ctx.args.top, - ), - **self.serialize_query_param( - "api-version", "2023-10-01", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.cost = AAZIntType() - _schema_on_200.interval = AAZStrType() - _schema_on_200.namespace = AAZStrType() - _schema_on_200.resourceregion = AAZStrType() - _schema_on_200.timespan = AAZStrType( - flags={"required": True}, - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.display_description = AAZStrType( - serialized_name="displayDescription", - ) - _element.error_code = AAZStrType( - serialized_name="errorCode", - ) - _element.error_message = AAZStrType( - serialized_name="errorMessage", - ) - _element.id = AAZStrType( - flags={"required": True}, - ) - _element.name = AAZObjectType( - flags={"required": True}, - ) - _ListBySubscriptionHelper._build_schema_localizable_string_read(_element.name) - _element.timeseries = AAZListType( - flags={"required": True}, - ) - _element.type = AAZStrType( - flags={"required": True}, - ) - _element.unit = AAZStrType( - flags={"required": True}, - ) - - timeseries = cls._schema_on_200.value.Element.timeseries - timeseries.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.timeseries.Element - _element.data = AAZListType() - _element.metadatavalues = AAZListType() - - data = cls._schema_on_200.value.Element.timeseries.Element.data - data.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.timeseries.Element.data.Element - _element.average = AAZFloatType() - _element.count = AAZFloatType() - _element.maximum = AAZFloatType() - _element.minimum = AAZFloatType() - _element.time_stamp = AAZStrType( - serialized_name="timeStamp", - flags={"required": True}, - ) - _element.total = AAZFloatType() - - metadatavalues = cls._schema_on_200.value.Element.timeseries.Element.metadatavalues - metadatavalues.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.timeseries.Element.metadatavalues.Element - _element.name = AAZObjectType() - _ListBySubscriptionHelper._build_schema_localizable_string_read(_element.name) - _element.value = AAZStrType() - - return cls._schema_on_200 - - -class _ListBySubscriptionHelper: - """Helper class for ListBySubscription""" - - _schema_localizable_string_read = None - - @classmethod - def _build_schema_localizable_string_read(cls, _schema): - if cls._schema_localizable_string_read is not None: - _schema.localized_value = cls._schema_localizable_string_read.localized_value - _schema.value = cls._schema_localizable_string_read.value - return - - cls._schema_localizable_string_read = _schema_localizable_string_read = AAZObjectType() - - localizable_string_read = _schema_localizable_string_read - localizable_string_read.localized_value = AAZStrType( - serialized_name="localizedValue", - ) - localizable_string_read.value = AAZStrType( - flags={"required": True}, - ) - - _schema.localized_value = cls._schema_localizable_string_read.localized_value - _schema.value = cls._schema_localizable_string_read.value - - -__all__ = ["ListBySubscription"] diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription_post.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub.py similarity index 97% rename from src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription_post.py rename to src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub.py index 489a018ce73..f1d14137111 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_by_subscription_post.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub.py @@ -12,9 +12,9 @@ @register_command( - "monitor metrics list-by-subscription-post", + "monitor metrics list-sub", ) -class ListBySubscriptionPost(AAZCommand): +class ListSub(AAZCommand): """Lists the metric data for a subscription. Parameters can be specified on the body. """ @@ -262,7 +262,7 @@ def _build_schema_on_200(cls): _element.name = AAZObjectType( flags={"required": True}, ) - _ListBySubscriptionPostHelper._build_schema_localizable_string_read(_element.name) + _ListSubHelper._build_schema_localizable_string_read(_element.name) _element.timeseries = AAZListType( flags={"required": True}, ) @@ -299,14 +299,14 @@ def _build_schema_on_200(cls): _element = cls._schema_on_200.value.Element.timeseries.Element.metadatavalues.Element _element.name = AAZObjectType() - _ListBySubscriptionPostHelper._build_schema_localizable_string_read(_element.name) + _ListSubHelper._build_schema_localizable_string_read(_element.name) _element.value = AAZStrType() return cls._schema_on_200 -class _ListBySubscriptionPostHelper: - """Helper class for ListBySubscriptionPost""" +class _ListSubHelper: + """Helper class for ListSub""" _schema_localizable_string_read = None @@ -331,4 +331,4 @@ def _build_schema_localizable_string_read(cls, _schema): _schema.value = cls._schema_localizable_string_read.value -__all__ = ["ListBySubscriptionPost"] +__all__ = ["ListSub"] diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_definition_by_subscription.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub_definitions.py similarity index 94% rename from src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_definition_by_subscription.py rename to src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub_definitions.py index e3bed6366a6..a234360bcbc 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_definition_by_subscription.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub_definitions.py @@ -12,9 +12,9 @@ @register_command( - "monitor metrics list-definition-by-subscription", + "monitor metrics list-sub-definitions", ) -class ListDefinitionBySubscription(AAZCommand): +class ListSubDefinitions(AAZCommand): """List the metric definitions for the subscription. """ @@ -173,7 +173,7 @@ def _build_schema_on_200(cls): serialized_name="metricClass", ) _element.name = AAZObjectType() - _ListDefinitionBySubscriptionHelper._build_schema_localizable_string_read(_element.name) + _ListSubDefinitionsHelper._build_schema_localizable_string_read(_element.name) _element.namespace = AAZStrType() _element.primary_aggregation_type = AAZStrType( serialized_name="primaryAggregationType", @@ -188,7 +188,7 @@ def _build_schema_on_200(cls): dimensions = cls._schema_on_200.value.Element.dimensions dimensions.Element = AAZObjectType() - _ListDefinitionBySubscriptionHelper._build_schema_localizable_string_read(dimensions.Element) + _ListSubDefinitionsHelper._build_schema_localizable_string_read(dimensions.Element) metric_availabilities = cls._schema_on_200.value.Element.metric_availabilities metric_availabilities.Element = AAZObjectType() @@ -205,8 +205,8 @@ def _build_schema_on_200(cls): return cls._schema_on_200 -class _ListDefinitionBySubscriptionHelper: - """Helper class for ListDefinitionBySubscription""" +class _ListSubDefinitionsHelper: + """Helper class for ListSubDefinitions""" _schema_localizable_string_read = None @@ -231,4 +231,4 @@ def _build_schema_localizable_string_read(cls, _schema): _schema.value = cls._schema_localizable_string_read.value -__all__ = ["ListDefinitionBySubscription"] +__all__ = ["ListSubDefinitions"] From 6b31bc8e0467609b27e787ca34858dfb7fa5d2bd Mon Sep 17 00:00:00 2001 From: AllyWang Date: Wed, 17 Jan 2024 15:19:47 +0800 Subject: [PATCH 3/5] add test --- .../aaz/latest/monitor/metrics/_list_sub.py | 12 +- .../test_monitor_metrics_list_by_sub.yaml | 1253 +++++++++++++++++ .../tests/latest/test_monitor_metrics.py | 19 +- 3 files changed, 1277 insertions(+), 7 deletions(-) create mode 100644 src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_metrics_list_by_sub.yaml diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub.py index f1d14137111..cf01cb540f9 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/metrics/_list_sub.py @@ -70,13 +70,13 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Body", help="The interval (i.e. timegrain) of the query in ISO 8601 duration format. Defaults to PT1M. Special case for 'FULL' value that returns single datapoint for entire time span requested. *Examples: PT15M, PT1H, P1D, FULL*", ) - _args_schema.metric_names = AAZStrArg( - options=["--metric-names"], + _args_schema.metricnames = AAZStrArg( + options=["--metricnames"], arg_group="Body", help="The names of the metrics (comma separated) to retrieve.", ) - _args_schema.metric_namespace = AAZStrArg( - options=["--metric-namespace"], + _args_schema.metricnamespace = AAZStrArg( + options=["--metricnamespace"], arg_group="Body", help="Metric namespace where the metrics you want reside.", ) @@ -203,8 +203,8 @@ def content(self): _builder.set_prop("autoAdjustTimegrain", AAZBoolType, ".auto_adjust_timegrain") _builder.set_prop("filter", AAZStrType, ".filter") _builder.set_prop("interval", AAZStrType, ".interval") - _builder.set_prop("metricNames", AAZStrType, ".metric_names") - _builder.set_prop("metricNamespace", AAZStrType, ".metric_namespace") + _builder.set_prop("metricNames", AAZStrType, ".metricnames") + _builder.set_prop("metricNamespace", AAZStrType, ".metricnamespace") _builder.set_prop("orderBy", AAZStrType, ".order_by") _builder.set_prop("resultType", AAZStrType, ".result_type") _builder.set_prop("rollUpBy", AAZStrType, ".roll_up_by") diff --git a/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_metrics_list_by_sub.yaml b/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_metrics_list_by_sub.yaml new file mode 100644 index 00000000000..f50aef4e98a --- /dev/null +++ b/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_metrics_list_by_sub.yaml @@ -0,0 +1,1253 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_monitor_metrics_list_by_sub","date":"2024-01-17T07:08:21Z","module":"monitor"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '371' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:23 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-jammy/skus/22_04-lts-gen2/versions?$top=1&$orderby=name%20desc&api-version=2023-09-01 + response: + body: + string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"22.04.202312060\"\ + ,\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-jammy/Skus/22_04-lts-gen2/Versions/22.04.202312060\"\ + \r\n }\r\n]" + headers: + cache-control: + - no-cache + content-length: + - '307' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:24 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - 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-resource: + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15995,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43986 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-jammy/skus/22_04-lts-gen2/versions/22.04.202312060?api-version=2023-09-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V2\",\r\n \ + \ \"architecture\": \"x64\",\r\n \"replicaType\": \"Managed\",\r\n \ + \ \"replicaCount\": 10,\r\n \"disallowed\": {\r\n \"vmDiskType\"\ + : \"Unmanaged\"\r\n },\r\n \"automaticOSUpgradeProperties\": {\r\n \ + \ \"automaticOSUpgradeSupported\": false\r\n },\r\n \"imageDeprecationStatus\"\ + : {\r\n \"imageState\": \"Active\"\r\n },\r\n \"features\": [\r\ + \n {\r\n \"name\": \"SecurityType\",\r\n \"value\": \"\ + TrustedLaunchSupported\"\r\n },\r\n {\r\n \"name\": \"IsAcceleratedNetworkSupported\"\ + ,\r\n \"value\": \"True\"\r\n },\r\n {\r\n \"name\"\ + : \"DiskControllerTypes\",\r\n \"value\": \"SCSI, NVMe\"\r\n },\r\ + \n {\r\n \"name\": \"IsHibernateSupported\",\r\n \"value\"\ + : \"True\"\r\n }\r\n ],\r\n \"osDiskImage\": {\r\n \"operatingSystem\"\ + : \"Linux\",\r\n \"sizeInGb\": 30\r\n },\r\n \"dataDiskImages\"\ + : []\r\n },\r\n \"location\": \"westus\",\r\n \"name\": \"22.04.202312060\"\ + ,\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-jammy/Skus/22_04-lts-gen2/Versions/22.04.202312060\"\ + \r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1158' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:25 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - 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-resource: + - Microsoft.Compute/GetVMImageFromLocation3Min;12995,Microsoft.Compute/GetVMImageFromLocation30Min;73988 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.28.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks?api-version=2022-01-01 + response: + body: + string: '{"value":[]}' + headers: + cache-control: + - no-cache + content-length: + - '12' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:26 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-jammy/skus/22_04-lts-gen2/versions?$top=1&$orderby=name%20desc&api-version=2023-09-01 + response: + body: + string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"22.04.202312060\"\ + ,\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-jammy/Skus/22_04-lts-gen2/Versions/22.04.202312060\"\ + \r\n }\r\n]" + headers: + cache-control: + - no-cache + content-length: + - '307' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:26 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - 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-resource: + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15994,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43985 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-jammy/skus/22_04-lts-gen2/versions/22.04.202312060?api-version=2023-09-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V2\",\r\n \ + \ \"architecture\": \"x64\",\r\n \"replicaType\": \"Managed\",\r\n \ + \ \"replicaCount\": 10,\r\n \"disallowed\": {\r\n \"vmDiskType\"\ + : \"Unmanaged\"\r\n },\r\n \"automaticOSUpgradeProperties\": {\r\n \ + \ \"automaticOSUpgradeSupported\": false\r\n },\r\n \"imageDeprecationStatus\"\ + : {\r\n \"imageState\": \"Active\"\r\n },\r\n \"features\": [\r\ + \n {\r\n \"name\": \"SecurityType\",\r\n \"value\": \"\ + TrustedLaunchSupported\"\r\n },\r\n {\r\n \"name\": \"IsAcceleratedNetworkSupported\"\ + ,\r\n \"value\": \"True\"\r\n },\r\n {\r\n \"name\"\ + : \"DiskControllerTypes\",\r\n \"value\": \"SCSI, NVMe\"\r\n },\r\ + \n {\r\n \"name\": \"IsHibernateSupported\",\r\n \"value\"\ + : \"True\"\r\n }\r\n ],\r\n \"osDiskImage\": {\r\n \"operatingSystem\"\ + : \"Linux\",\r\n \"sizeInGb\": 30\r\n },\r\n \"dataDiskImages\"\ + : []\r\n },\r\n \"location\": \"westus\",\r\n \"name\": \"22.04.202312060\"\ + ,\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-jammy/Skus/22_04-lts-gen2/Versions/22.04.202312060\"\ + \r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1158' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:27 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - 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-resource: + - Microsoft.Compute/GetVMImageFromLocation3Min;12994,Microsoft.Compute/GetVMImageFromLocation30Min;73987 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-jammy/skus/22_04-lts-gen2/versions?$top=1&$orderby=name%20desc&api-version=2023-09-01 + response: + body: + string: "[\r\n {\r\n \"location\": \"westus\",\r\n \"name\": \"22.04.202312060\"\ + ,\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-jammy/Skus/22_04-lts-gen2/Versions/22.04.202312060\"\ + \r\n }\r\n]" + headers: + cache-control: + - no-cache + content-length: + - '307' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:28 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - 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-resource: + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15993,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43984 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/westus/publishers/Canonical/artifacttypes/vmimage/offers/0001-com-ubuntu-server-jammy/skus/22_04-lts-gen2/versions/22.04.202312060?api-version=2023-09-01 + response: + body: + string: "{\r\n \"properties\": {\r\n \"hyperVGeneration\": \"V2\",\r\n \ + \ \"architecture\": \"x64\",\r\n \"replicaType\": \"Managed\",\r\n \ + \ \"replicaCount\": 10,\r\n \"disallowed\": {\r\n \"vmDiskType\"\ + : \"Unmanaged\"\r\n },\r\n \"automaticOSUpgradeProperties\": {\r\n \ + \ \"automaticOSUpgradeSupported\": false\r\n },\r\n \"imageDeprecationStatus\"\ + : {\r\n \"imageState\": \"Active\"\r\n },\r\n \"features\": [\r\ + \n {\r\n \"name\": \"SecurityType\",\r\n \"value\": \"\ + TrustedLaunchSupported\"\r\n },\r\n {\r\n \"name\": \"IsAcceleratedNetworkSupported\"\ + ,\r\n \"value\": \"True\"\r\n },\r\n {\r\n \"name\"\ + : \"DiskControllerTypes\",\r\n \"value\": \"SCSI, NVMe\"\r\n },\r\ + \n {\r\n \"name\": \"IsHibernateSupported\",\r\n \"value\"\ + : \"True\"\r\n }\r\n ],\r\n \"osDiskImage\": {\r\n \"operatingSystem\"\ + : \"Linux\",\r\n \"sizeInGb\": 30\r\n },\r\n \"dataDiskImages\"\ + : []\r\n },\r\n \"location\": \"westus\",\r\n \"name\": \"22.04.202312060\"\ + ,\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/westus/Publishers/Canonical/ArtifactTypes/VMImage/Offers/0001-com-ubuntu-server-jammy/Skus/22_04-lts-gen2/Versions/22.04.202312060\"\ + \r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1158' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:29 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - 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-resource: + - Microsoft.Compute/GetVMImageFromLocation3Min;12993,Microsoft.Compute/GetVMImageFromLocation30Min;73986 + status: + code: 200 + message: OK +- request: + body: '{"properties": {"template": {"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", "parameters": {"adminPassword": {"type": "securestring", + "metadata": {"description": "Secure adminPassword"}}}, "variables": {}, "resources": + [{"name": "vm1VNET", "type": "Microsoft.Network/virtualNetworks", "location": + "westus", "apiVersion": "2015-06-15", "dependsOn": [], "tags": {}, "properties": + {"addressSpace": {"addressPrefixes": ["10.0.0.0/16"]}, "subnets": [{"name": + "vm1Subnet", "properties": {"addressPrefix": "10.0.0.0/24"}}]}}, {"type": "Microsoft.Network/networkSecurityGroups", + "name": "vm1NSG", "apiVersion": "2015-06-15", "location": "westus", "tags": + {}, "dependsOn": [], "properties": {"securityRules": [{"name": "default-allow-ssh", + "properties": {"protocol": "Tcp", "sourcePortRange": "*", "destinationPortRange": + "22", "sourceAddressPrefix": "*", "destinationAddressPrefix": "*", "access": + "Allow", "priority": 1000, "direction": "Inbound"}}]}}, {"apiVersion": "2022-01-01", + "type": "Microsoft.Network/publicIPAddresses", "name": "vm1PublicIP", "location": + "westus", "tags": {}, "dependsOn": [], "properties": {"publicIPAllocationMethod": + "Static"}, "sku": {"name": "Standard"}}, {"apiVersion": "2015-06-15", "type": + "Microsoft.Network/networkInterfaces", "name": "vm1VMNic", "location": "westus", + "tags": {}, "dependsOn": ["Microsoft.Network/virtualNetworks/vm1VNET", "Microsoft.Network/networkSecurityGroups/vm1NSG", + "Microsoft.Network/publicIpAddresses/vm1PublicIP"], "properties": {"ipConfigurations": + [{"name": "ipconfigvm1", "properties": {"privateIPAllocationMethod": "Dynamic", + "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet"}, + "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"}}}], + "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"}}}, + {"apiVersion": "2023-09-01", "type": "Microsoft.Compute/virtualMachines", "name": + "vm1", "location": "westus", "tags": {}, "dependsOn": ["Microsoft.Network/networkInterfaces/vm1VMNic"], + "properties": {"hardwareProfile": {"vmSize": "Standard_DS1_v2"}, "networkProfile": + {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic", + "properties": {"deleteOption": null}}]}, "storageProfile": {"osDisk": {"createOption": + "fromImage", "name": null, "caching": "ReadWrite", "managedDisk": {"storageAccountType": + null}}, "imageReference": {"publisher": "Canonical", "offer": "0001-com-ubuntu-server-jammy", + "sku": "22_04-lts-gen2", "version": "latest"}}, "osProfile": {"computerName": + "vm1", "adminUsername": "testadmin", "adminPassword": "[parameters(''adminPassword'')]"}, + "securityProfile": {"securityType": "TrustedLaunch", "uefiSettings": {"secureBootEnabled": + true, "vTpmEnabled": true}}}}], "outputs": {}}, "parameters": {"adminPassword": + {"value": "TestPassword11!!"}}, "mode": "incremental"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + Content-Length: + - '3292' + Content-Type: + - application/json + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI","name":"vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI","type":"Microsoft.Resources/deployments","properties":{"templateHash":"16090802831674420015","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2024-01-17T07:08:34.4890638Z","duration":"PT0.0005682S","correlationId":"459ddea5-bd48-4f31-a612-6872043c32ce","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}' + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI/operationStatuses/08584961315735826499?api-version=2022-09-01 + cache-control: + - no-cache + content-length: + - '2369' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:35 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' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584961315735826499?api-version=2022-09-01 + response: + body: + string: '{"status":"Accepted"}' + headers: + cache-control: + - no-cache + content-length: + - '21' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:08:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584961315735826499?api-version=2022-09-01 + response: + body: + string: '{"status":"Running"}' + headers: + cache-control: + - no-cache + content-length: + - '20' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:09:05 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584961315735826499?api-version=2022-09-01 + response: + body: + string: '{"status":"Succeeded"}' + headers: + cache-control: + - no-cache + content-length: + - '22' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:09:35 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI","name":"vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI","type":"Microsoft.Resources/deployments","properties":{"templateHash":"16090802831674420015","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2024-01-17T07:09:08.5843399Z","duration":"PT34.0958443S","correlationId":"459ddea5-bd48-4f31-a612-6872043c32ce","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET"}]}}' + headers: + cache-control: + - no-cache + content-length: + - '3139' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:09:36 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 azsdk-python-azure-mgmt-compute/30.4.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1?$expand=instanceView&api-version=2023-09-01 + response: + body: + string: "{\r\n \"name\": \"vm1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1\"\ + ,\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\"\ + : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hardwareProfile\"\ + : {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n \"provisioningState\"\ + : \"Succeeded\",\r\n \"vmId\": \"67c37e29-f5f5-4b1f-a6bc-555f03d1f7cb\"\ + ,\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"\ + publisher\": \"Canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-jammy\"\ + ,\r\n \"sku\": \"22_04-lts-gen2\",\r\n \"version\": \"latest\"\ + ,\r\n \"exactVersion\": \"22.04.202312060\"\r\n },\r\n \"\ + osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm1_disk1_3c00f89bb0b640bf8f8af1f9e6ee3537\"\ + ,\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\ + ,\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Premium_LRS\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/disks/vm1_disk1_3c00f89bb0b640bf8f8af1f9e6ee3537\"\ + \r\n },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\"\ + : 30\r\n },\r\n \"dataDisks\": [],\r\n \"diskControllerType\"\ + : \"SCSI\"\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"\ + vm1\",\r\n \"adminUsername\": \"testadmin\",\r\n \"linuxConfiguration\"\ + : {\r\n \"disablePasswordAuthentication\": false,\r\n \"provisionVMAgent\"\ + : true,\r\n \"patchSettings\": {\r\n \"patchMode\": \"ImageDefault\"\ + ,\r\n \"assessmentMode\": \"ImageDefault\"\r\n },\r\n \ + \ \"enableVMAgentPlatformUpdates\": false\r\n },\r\n \"secrets\"\ + : [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\"\ + : true\r\n },\r\n \"securityProfile\": {\r\n \"uefiSettings\":\ + \ {\r\n \"secureBootEnabled\": true,\r\n \"vTpmEnabled\": true\r\ + \n },\r\n \"securityType\": \"TrustedLaunch\"\r\n },\r\n \"\ + networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + }]},\r\n \"instanceView\": {\r\n \"computerName\": \"vm1\",\r\n \ + \ \"osName\": \"ubuntu\",\r\n \"osVersion\": \"22.04\",\r\n \"\ + vmAgent\": {\r\n \"vmAgentVersion\": \"2.9.1.1\",\r\n \"statuses\"\ + : [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ + Ready\",\r\n \"message\": \"Guest Agent is running\",\r\n \ + \ \"time\": \"2024-01-17T07:09:18+00:00\"\r\n }\r\n \ + \ ],\r\n \"extensionHandlers\": []\r\n },\r\n \"disks\":\ + \ [\r\n {\r\n \"name\": \"vm1_disk1_3c00f89bb0b640bf8f8af1f9e6ee3537\"\ + ,\r\n \"statuses\": [\r\n {\r\n \"code\"\ + : \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\ + \n \"displayStatus\": \"Provisioning succeeded\",\r\n \ + \ \"time\": \"2024-01-17T07:08:52.5301698+00:00\"\r\n }\r\ + \n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": \"V2\"\ + ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning\ + \ succeeded\",\r\n \"time\": \"2024-01-17T07:09:04.9209937+00:00\"\ + \r\n },\r\n {\r\n \"code\": \"PowerState/running\"\ + ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\ + \r\n }\r\n ]\r\n },\r\n \"timeCreated\": \"2024-01-17T07:08:50.5770193+00:00\"\ + \r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '3491' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:09:37 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - 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-resource: + - Microsoft.Compute/LowCostGetSubscriptionMaximum;23999,Microsoft.Compute/LowCostGetResource;32 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.28.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ + ,\r\n \"etag\": \"W/\\\"077fbddb-4381-4a26-b5b6-7d8176b40314\\\"\",\r\n \ + \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"resourceGuid\": \"684b3dcf-3db5-400d-831b-d78efe652453\",\r\n \ + \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ + ,\r\n \"etag\": \"W/\\\"077fbddb-4381-4a26-b5b6-7d8176b40314\\\"\"\ + ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ + ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ + ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ + : \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\":\ + \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ + \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET/subnets/vm1Subnet\"\ + \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ + : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ + \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ + internalDomainNameSuffix\": \"dh3rl52onktenizdcpiq5wuluf.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"60-45-BD-08-ED-EB\",\r\n \"vnetEncryptionSupported\"\ + : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ + : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ + \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1\"\ + \r\n },\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\ + \n \"nicType\": \"Standard\",\r\n \"allowPort25Out\": true,\r\n \"\ + auxiliaryMode\": \"None\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\ + ,\r\n \"location\": \"westus\",\r\n \"kind\": \"Regular\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2377' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:09:38 GMT + etag: + - W/"077fbddb-4381-4a26-b5b6-7d8176b40314" + expires: + - '-1' + pragma: + - no-cache + server: + - 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-arm-service-request-id: + - cd63592d-aeee-407f-9977-b1b6ced1499e + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - vm create + Connection: + - keep-alive + ParameterSetName: + - -g -n --image --admin-password --admin-username --authentication-type + User-Agent: + - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.28.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ + ,\r\n \"etag\": \"W/\\\"6c379240-c579-4adc-969d-adbf1ef0bc2e\\\"\",\r\n \ + \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"73f9c032-7727-4d88-b3cc-506c83bbb15c\"\ + ,\r\n \"ipAddress\": \"40.112.248.248\",\r\n \"publicIPAddressVersion\"\ + : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\"\ + : 4,\r\n \"ipTags\": [],\r\n \"ipConfiguration\": {\r\n \"id\"\ + : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ + \r\n }\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\ + \n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ + \r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '907' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:09:39 GMT + etag: + - W/"6c379240-c579-4adc-969d-adbf1ef0bc2e" + expires: + - '-1' + pragma: + - no-cache + server: + - 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-arm-service-request-id: + - 63b0d0be-44f6-433e-9925-bb1f7646a830 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor metrics list-namespaces + Connection: + - keep-alive + ParameterSetName: + - --resource + User-Agent: + - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.28.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricNamespaces?api-version=2017-12-01-preview + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1/providers/microsoft.insights/metricNamespaces/microsoft.compute-virtualmachines","name":"microsoft.compute-virtualmachines","type":"Microsoft.Insights/metricNamespaces","classification":"Platform","properties":{"metricNamespaceName":"microsoft.compute/virtualmachines"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '421' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:09:43 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822 + 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: + - monitor metrics list-sub-definitions + Connection: + - keep-alive + ParameterSetName: + - --region --metricnamespace + User-Agent: + - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.28.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Insights/metricDefinitions?metricnamespace=microsoft.compute%2Fvirtualmachines®ion=westus&api-version=2023-10-01 + response: + body: + string: '{"value":[{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Percentage + CPU","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Percentage + CPU","localizedValue":"Percentage CPU"},"displayDescription":"The percentage + of allocated compute units that are currently in use by the Virtual Machine(s)","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Network + In","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Network + In","localizedValue":"Network In Billable (Deprecated)"},"displayDescription":"The + number of billable bytes received on all network interfaces by the Virtual + Machine(s) (Incoming Traffic) (Deprecated)","isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Network + Out","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Network + Out","localizedValue":"Network Out Billable (Deprecated)"},"displayDescription":"The + number of billable bytes out on all network interfaces by the Virtual Machine(s) + (Outgoing Traffic) (Deprecated)","isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Disk + Read Bytes","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Disk + Read Bytes","localizedValue":"Disk Read Bytes"},"displayDescription":"Bytes + read from disk during monitoring period","isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Disk + Write Bytes","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Disk + Write Bytes","localizedValue":"Disk Write Bytes"},"displayDescription":"Bytes + written to disk during monitoring period","isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Total","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Disk + Read Operations/Sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Disk + Read Operations/Sec","localizedValue":"Disk Read Operations/Sec"},"displayDescription":"Disk + Read IOPS","isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Disk + Write Operations/Sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Disk + Write Operations/Sec","localizedValue":"Disk Write Operations/Sec"},"displayDescription":"Disk + Write IOPS","isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/CPU + Credits Remaining","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"CPU + Credits Remaining","localizedValue":"CPU Credits Remaining"},"displayDescription":"Total + number of credits available to burst. Only available on B-series burstable + VMs","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/CPU + Credits Consumed","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"CPU + Credits Consumed","localizedValue":"CPU Credits Consumed"},"displayDescription":"Total + number of credits consumed by the Virtual Machine. Only available on B-series + burstable VMs","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Read Bytes/sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Read Bytes/sec","localizedValue":"Data Disk Read Bytes/Sec"},"displayDescription":"Bytes/Sec + read from a single disk during monitoring period","isDimensionRequired":false,"unit":"BytesPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Write Bytes/sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Write Bytes/sec","localizedValue":"Data Disk Write Bytes/Sec"},"displayDescription":"Bytes/Sec + written to a single disk during monitoring period","isDimensionRequired":false,"unit":"BytesPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Read Operations/Sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Read Operations/Sec","localizedValue":"Data Disk Read Operations/Sec"},"displayDescription":"Read + IOPS from a single disk during monitoring period","isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Write Operations/Sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Write Operations/Sec","localizedValue":"Data Disk Write Operations/Sec"},"displayDescription":"Write + IOPS from a single disk during monitoring period","isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Queue Depth","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Queue Depth","localizedValue":"Data Disk Queue Depth"},"displayDescription":"Data + Disk Queue Depth(or Queue Length)","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Latency","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Latency","localizedValue":"Data Disk Latency (Preview)"},"displayDescription":"Average + time to complete each IO during monitoring period for Data Disk. Values are + in milliseconds.","isDimensionRequired":false,"unit":"MilliSeconds","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Bandwidth Consumed Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Bandwidth Consumed Percentage","localizedValue":"Data Disk Bandwidth + Consumed Percentage"},"displayDescription":"Percentage of data disk bandwidth + consumed per minute. Only available on VM series that support premium storage.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk IOPS Consumed Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk IOPS Consumed Percentage","localizedValue":"Data Disk IOPS Consumed Percentage"},"displayDescription":"Percentage + of data disk I/Os consumed per minute. Only available on VM series that support + premium storage.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Target Bandwidth","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Target Bandwidth","localizedValue":"Data Disk Target Bandwidth"},"displayDescription":"Baseline + bytes per second throughput Data Disk can achieve without bursting","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Target IOPS","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Target IOPS","localizedValue":"Data Disk Target IOPS"},"displayDescription":"Baseline + IOPS Data Disk can achieve without bursting","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Max Burst Bandwidth","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Max Burst Bandwidth","localizedValue":"Data Disk Max Burst Bandwidth"},"displayDescription":"Maximum + bytes per second throughput Data Disk can achieve with bursting","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Max Burst IOPS","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Max Burst IOPS","localizedValue":"Data Disk Max Burst IOPS"},"displayDescription":"Maximum + IOPS Data Disk can achieve with bursting","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Used Burst BPS Credits Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Used Burst BPS Credits Percentage","localizedValue":"Data Disk Used Burst + BPS Credits Percentage"},"displayDescription":"Percentage of Data Disk burst + bandwidth credits used so far","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Data + Disk Used Burst IO Credits Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Data + Disk Used Burst IO Credits Percentage","localizedValue":"Data Disk Used Burst + IO Credits Percentage"},"displayDescription":"Percentage of Data Disk burst + I/O credits used so far","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Read Bytes/sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Read Bytes/sec","localizedValue":"OS Disk Read Bytes/Sec"},"displayDescription":"Bytes/Sec + read from a single disk during monitoring period for OS disk","isDimensionRequired":false,"unit":"BytesPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Write Bytes/sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Write Bytes/sec","localizedValue":"OS Disk Write Bytes/Sec"},"displayDescription":"Bytes/Sec + written to a single disk during monitoring period for OS disk","isDimensionRequired":false,"unit":"BytesPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Read Operations/Sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Read Operations/Sec","localizedValue":"OS Disk Read Operations/Sec"},"displayDescription":"Read + IOPS from a single disk during monitoring period for OS disk","isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Write Operations/Sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Write Operations/Sec","localizedValue":"OS Disk Write Operations/Sec"},"displayDescription":"Write + IOPS from a single disk during monitoring period for OS disk","isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Queue Depth","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Queue Depth","localizedValue":"OS Disk Queue Depth"},"displayDescription":"OS + Disk Queue Depth(or Queue Length)","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Latency","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Latency","localizedValue":"OS Disk Latency (Preview)"},"displayDescription":"Average + time to complete each IO during monitoring period for OS Disk. Values are + in milliseconds.","isDimensionRequired":false,"unit":"MilliSeconds","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Bandwidth Consumed Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Bandwidth Consumed Percentage","localizedValue":"OS Disk Bandwidth Consumed + Percentage"},"displayDescription":"Percentage of operating system disk bandwidth + consumed per minute. Only available on VM series that support premium storage.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk IOPS Consumed Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk IOPS Consumed Percentage","localizedValue":"OS Disk IOPS Consumed Percentage"},"displayDescription":"Percentage + of operating system disk I/Os consumed per minute. Only available on VM series + that support premium storage.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Target Bandwidth","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Target Bandwidth","localizedValue":"OS Disk Target Bandwidth"},"displayDescription":"Baseline + bytes per second throughput OS Disk can achieve without bursting","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Target IOPS","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Target IOPS","localizedValue":"OS Disk Target IOPS"},"displayDescription":"Baseline + IOPS OS Disk can achieve without bursting","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Max Burst Bandwidth","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Max Burst Bandwidth","localizedValue":"OS Disk Max Burst Bandwidth"},"displayDescription":"Maximum + bytes per second throughput OS Disk can achieve with bursting","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Max Burst IOPS","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Max Burst IOPS","localizedValue":"OS Disk Max Burst IOPS"},"displayDescription":"Maximum + IOPS OS Disk can achieve with bursting","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Used Burst BPS Credits Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Used Burst BPS Credits Percentage","localizedValue":"OS Disk Used Burst + BPS Credits Percentage"},"displayDescription":"Percentage of OS Disk burst + bandwidth credits used so far","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/OS + Disk Used Burst IO Credits Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"OS + Disk Used Burst IO Credits Percentage","localizedValue":"OS Disk Used Burst + IO Credits Percentage"},"displayDescription":"Percentage of OS Disk burst + I/O credits used so far","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Temp + Disk Latency","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Temp + Disk Latency","localizedValue":"Temp Disk Latency (Preview)"},"displayDescription":"Average + time to complete each IO during monitoring period for Temp Disk. Values are + in milliseconds.","isDimensionRequired":false,"unit":"MilliSeconds","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Temp + Disk Read Bytes/sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Temp + Disk Read Bytes/sec","localizedValue":"Temp Disk Read Bytes/Sec"},"displayDescription":"Bytes/Sec + read from a single disk during monitoring period for Temp Disk.","isDimensionRequired":false,"unit":"BytesPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Temp + Disk Write Bytes/sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Temp + Disk Write Bytes/sec","localizedValue":"Temp Disk Write Bytes/Sec"},"displayDescription":"Bytes/Sec + written to a single disk during monitoring period for Temp Disk.","isDimensionRequired":false,"unit":"BytesPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Temp + Disk Read Operations/Sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Temp + Disk Read Operations/Sec","localizedValue":"Temp Disk Read Operations/Sec"},"displayDescription":"Read + IOPS from a single disk during monitoring period for Temp Disk.","isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Temp + Disk Write Operations/Sec","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Temp + Disk Write Operations/Sec","localizedValue":"Temp Disk Write Operations/Sec"},"displayDescription":"Write + IOPS from a single disk during monitoring period for Temp Disk.","isDimensionRequired":false,"unit":"CountPerSecond","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Temp + Disk Queue Depth","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Temp + Disk Queue Depth","localizedValue":"Temp Disk Queue Depth"},"displayDescription":"Temp + Disk Queue Depth(or Queue Length).","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Premium + Data Disk Cache Read Hit","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Premium + Data Disk Cache Read Hit","localizedValue":"Premium Data Disk Cache Read Hit"},"displayDescription":"Premium + Data Disk Cache Read Hit","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Premium + Data Disk Cache Read Miss","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Premium + Data Disk Cache Read Miss","localizedValue":"Premium Data Disk Cache Read + Miss"},"displayDescription":"Premium Data Disk Cache Read Miss","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"LUN","localizedValue":"LUN"},{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Premium + OS Disk Cache Read Hit","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Premium + OS Disk Cache Read Hit","localizedValue":"Premium OS Disk Cache Read Hit"},"displayDescription":"Premium + OS Disk Cache Read Hit","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Premium + OS Disk Cache Read Miss","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Premium + OS Disk Cache Read Miss","localizedValue":"Premium OS Disk Cache Read Miss"},"displayDescription":"Premium + OS Disk Cache Read Miss","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/VM + Cached Bandwidth Consumed Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"VM + Cached Bandwidth Consumed Percentage","localizedValue":"VM Cached Bandwidth + Consumed Percentage"},"displayDescription":"Percentage of cached disk bandwidth + consumed by the VM. Only available on VM series that support premium storage.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/VM + Cached IOPS Consumed Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"VM + Cached IOPS Consumed Percentage","localizedValue":"VM Cached IOPS Consumed + Percentage"},"displayDescription":"Percentage of cached disk IOPS consumed + by the VM. Only available on VM series that support premium storage.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/VM + Uncached Bandwidth Consumed Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"VM + Uncached Bandwidth Consumed Percentage","localizedValue":"VM Uncached Bandwidth + Consumed Percentage"},"displayDescription":"Percentage of uncached disk bandwidth + consumed by the VM. Only available on VM series that support premium storage.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/VM + Uncached IOPS Consumed Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"VM + Uncached IOPS Consumed Percentage","localizedValue":"VM Uncached IOPS Consumed + Percentage"},"displayDescription":"Percentage of uncached disk IOPS consumed + by the VM. Only available on VM series that support premium storage.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/Available + Memory Bytes","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"Available + Memory Bytes","localizedValue":"Available Memory Bytes (Preview)"},"displayDescription":"Amount + of physical memory, in bytes, immediately available for allocation to a process + or for system use in the Virtual Machine","isDimensionRequired":false,"unit":"Bytes","primaryAggregationType":"Average","supportedAggregationTypes":["None","Average","Minimum","Maximum","Total","Count"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/VmAvailabilityMetric","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"VmAvailabilityMetric","localizedValue":"VM + Availability Metric (Preview)"},"displayDescription":"Measure of Availability + of Virtual machines over time.","isDimensionRequired":false,"unit":"Count","primaryAggregationType":"Average","supportedAggregationTypes":["Average","Minimum","Maximum"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/VM + Remote Used Burst IO Credits Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"VM + Remote Used Burst IO Credits Percentage","localizedValue":"VM Uncached Used + Burst IO Credits Percentage"},"displayDescription":"Percentage of Uncached + Burst IO Credits used by the VM.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["Average","Minimum","Maximum"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/VM + Remote Used Burst BPS Credits Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"VM + Remote Used Burst BPS Credits Percentage","localizedValue":"VM Uncached Used + Burst BPS Credits Percentage"},"displayDescription":"Percentage of Uncached + Burst BPS Credits used by the VM.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["Average","Minimum","Maximum"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/VM + Local Used Burst IO Credits Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"VM + Local Used Burst IO Credits Percentage","localizedValue":"VM Cached Used Burst + IO Credits Percentage"},"displayDescription":"Percentage of Cached Burst IO + Credits used by the VM.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["Average","Minimum","Maximum"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]},{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/microsoft.insights/metricdefinitions/VM + Local Used Burst BPS Credits Percentage","resourceId":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590","namespace":"microsoft.compute/virtualmachines","name":{"value":"VM + Local Used Burst BPS Credits Percentage","localizedValue":"VM Cached Used + Burst BPS Credits Percentage"},"displayDescription":"Percentage of Cached + Burst BPS Credits used by the VM.","isDimensionRequired":false,"unit":"Percent","primaryAggregationType":"Average","supportedAggregationTypes":["Average","Minimum","Maximum"],"metricAvailabilities":[{"timeGrain":"PT1M","retention":"P93D"},{"timeGrain":"PT5M","retention":"P93D"},{"timeGrain":"PT15M","retention":"P93D"},{"timeGrain":"PT30M","retention":"P93D"},{"timeGrain":"PT1H","retention":"P93D"},{"timeGrain":"PT6H","retention":"P93D"},{"timeGrain":"PT12H","retention":"P93D"},{"timeGrain":"P1D","retention":"P93D"}],"dimensions":[{"value":"Microsoft.ResourceId","localizedValue":"Microsoft.ResourceId"},{"value":"Microsoft.ResourceGroupName","localizedValue":"Microsoft.ResourceGroupName"}]}]}' + headers: + cache-control: + - no-cache + content-length: + - '65011' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:09:44 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '399' + status: + code: 200 + message: OK +- request: + body: '{"metricNames": "Data Disk Max Burst IOPS", "metricNamespace": "microsoft.compute/virtualmachines"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - monitor metrics list-sub + Connection: + - keep-alive + Content-Length: + - '99' + Content-Type: + - application/json + ParameterSetName: + - --region --metricnamespace --metricnames + User-Agent: + - AZURECLI/2.56.0 (AAZ) azsdk-python-core/1.28.0 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Insights/metrics?region=westus&api-version=2023-10-01 + response: + body: + string: '{"cost":59,"timespan":"2024-01-17T06:09:45Z/2024-01-17T07:09:45Z","interval":"PT1M","value":[{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Insights/metrics/Data + Disk Max Burst IOPS","type":"Microsoft.Insights/metrics","name":{"value":"Data + Disk Max Burst IOPS","localizedValue":"Data Disk Max Burst IOPS"},"displayDescription":"Maximum + IOPS Data Disk can achieve with bursting","unit":"Count","timeseries":[],"errorCode":"Success"}],"namespace":"microsoft.compute/virtualmachines","resourceregion":"westus"}' + headers: + cache-control: + - no-cache + content-length: + - '539' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 17 Jan 2024 07:09:45 GMT + expires: + - '-1' + pragma: + - no-cache + request-context: + - appId=cid-v1:b021da79-5252-4375-9df5-2e17c1dcd822 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_metrics.py b/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_metrics.py index ed93723313b..4d7b77af465 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_metrics.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_metrics.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer +from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, StorageAccountPreparer, JMESPathCheck class TestMonitorMetrics(ScenarioTest): @@ -28,3 +28,20 @@ def test_monitor_metrics_scenario(self, resource_group, storage_account): checks=self.check('length(@.value)', 2)) self.cmd('az monitor metrics list --resource {sa_id} --metrics Ingress Egress --end-time 2025-01-01 00:00:00 +00:00 --offset 5000d', checks=self.check('length(@.value)', 2)) + + @ResourceGroupPreparer(location='westus') + def test_monitor_metrics_list_by_sub(self, resource_group): + self.kwargs.update({ + 'rg': resource_group, + 'vm': "vm1", + "location": "westus", + }) + vm_json = self.cmd('vm create -g {rg} -n {vm} --image Ubuntu2204 --admin-password TestPassword11!! --admin-username testadmin --authentication-type password').get_output_in_json() + self.kwargs['vm_id'] = vm_json['id'] + self.kwargs['namespace'] = self.cmd('az monitor metrics list-namespaces --resource {vm_id}').get_output_in_json()[0]['properties']['metricNamespaceName'] + self.cmd('az monitor metrics list-sub-definitions --region {location} --metricnamespace {namespace}') + self.cmd('az monitor metrics list-sub --region {location} --metricnamespace {namespace} --metricnames "Data Disk Max Burst IOPS" ', + checks=[ + JMESPathCheck('resourceregion', self.kwargs["location"]), + JMESPathCheck('namespace', self.kwargs["namespace"]), + ]) From c87a75ba27d1678e180ca786458fb792ae75a6bf Mon Sep 17 00:00:00 2001 From: AllyWang Date: Wed, 17 Jan 2024 15:43:30 +0800 Subject: [PATCH 4/5] add yaml --- .../test_monitor_metrics_list_by_sub.yaml | 358 +++++++++++++++--- 1 file changed, 299 insertions(+), 59 deletions(-) diff --git a/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_metrics_list_by_sub.yaml b/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_metrics_list_by_sub.yaml index f50aef4e98a..f566c371a84 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_metrics_list_by_sub.yaml +++ b/src/azure-cli/azure/cli/command_modules/monitor/tests/latest/recordings/test_monitor_metrics_list_by_sub.yaml @@ -18,7 +18,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_monitor_metrics_list_by_sub","date":"2024-01-17T07:08:21Z","module":"monitor"},"properties":{"provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_monitor_metrics_list_by_sub","date":"2024-01-17T07:41:13Z","module":"monitor"},"properties":{"provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -27,7 +27,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:23 GMT + - Wed, 17 Jan 2024 07:41:19 GMT expires: - '-1' pragma: @@ -41,6 +41,126 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ + ,\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\"\ + : {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"\ + type\": \"object\",\n \"value\": {\n \"Linux\": {\n \"\ + CentOS85Gen2\": {\n \"publisher\": \"OpenLogic\",\n \ + \ \"offer\": \"CentOS\",\n \"sku\": \"8_5-gen2\",\n \ + \ \"version\": \"latest\",\n \"architecture\": \"x64\"\n \ + \ },\n \"Debian11\": {\n \"publisher\": \"Debian\"\ + ,\n \"offer\": \"debian-11\",\n \"sku\": \"11-backports-gen2\"\ + ,\n \"version\": \"latest\",\n \"architecture\": \"\ + x64\"\n },\n \"FlatcarLinuxFreeGen2\": {\n \"\ + publisher\": \"kinvolk\",\n \"offer\": \"flatcar-container-linux-free\"\ + ,\n \"sku\": \"stable-gen2\",\n \"version\": \"latest\"\ + ,\n \"architecture\": \"x64\"\n },\n \"OpenSuseLeap154Gen2\"\ + : {\n \"publisher\": \"SUSE\",\n \"offer\": \"openSUSE-leap-15-4\"\ + ,\n \"sku\": \"gen2\",\n \"version\": \"latest\",\n\ + \ \"architecture\": \"x64\"\n },\n \"RHELRaw8LVMGen2\"\ + : {\n \"publisher\": \"RedHat\",\n \"offer\": \"\ + RHEL\",\n \"sku\": \"8-lvm-gen2\",\n \"version\": \ + \ \"latest\",\n \"architecture\": \"x64\"\n },\n \ + \ \"SuseSles15SP3\": {\n \"publisher\": \"SUSE\",\n \ + \ \"offer\": \"sles-15-sp3\",\n \"sku\": \"gen2\",\n \ + \ \"version\": \"latest\",\n \"architecture\": \"x64\"\n \ + \ },\n \"Ubuntu2204\": {\n \"publisher\": \"\ + Canonical\",\n \"offer\": \"0001-com-ubuntu-server-jammy\",\n\ + \ \"sku\": \"22_04-lts-gen2\",\n \"version\": \"latest\"\ + ,\n \"architecture\": \"x64\"\n }\n },\n \ + \ \"Windows\": {\n \"Win2022Datacenter\": {\n \"publisher\"\ + : \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n\ + \ \"sku\": \"2022-datacenter-g2\",\n \"version\": \"\ + latest\",\n \"architecture\": \"x64\"\n },\n \ + \ \"Win2022AzureEditionCore\": {\n \"publisher\": \"MicrosoftWindowsServer\"\ + ,\n \"offer\": \"WindowsServer\",\n \"sku\": \"2022-datacenter-azure-edition-core\"\ + ,\n \"version\": \"latest\",\n \"architecture\": \"\ + x64\"\n },\n \"Win2019Datacenter\": {\n \"publisher\"\ + : \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n\ + \ \"sku\": \"2019-datacenter-gensecond\",\n \"version\"\ + : \"latest\",\n \"architecture\": \"x64\"\n },\n \ + \ \"Win2016Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\"\ + ,\n \"offer\": \"WindowsServer\",\n \"sku\": \"2016-datacenter-gensecond\"\ + ,\n \"version\": \"latest\",\n \"architecture\": \"\ + x64\"\n },\n \"Win2012R2Datacenter\": {\n \"\ + publisher\": \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\"\ + ,\n \"sku\": \"2012-R2-Datacenter\",\n \"version\":\ + \ \"latest\",\n \"architecture\": \"x64\"\n },\n \ + \ \"Win2012Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\"\ + ,\n \"offer\": \"WindowsServer\",\n \"sku\": \"2012-Datacenter\"\ + ,\n \"version\": \"latest\",\n \"architecture\": \"\ + x64\"\n },\n \"Win2008R2SP1\": {\n \"publisher\"\ + : \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n\ + \ \"sku\": \"2008-R2-SP1\",\n \"version\": \"latest\"\ + ,\n \"architecture\": \"x64\"\n }\n }\n }\n\ + \ }\n }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '3615' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + cross-origin-resource-policy: + - cross-origin + date: + - Wed, 17 Jan 2024 07:41:21 GMT + etag: + - W/"9fee27d398b0211e374a0f0e8e79c9b3a0342cfa43466b26b8548409639c8c17" + expires: + - Wed, 17 Jan 2024 07:46:21 GMT + source-age: + - '0' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding,Origin + via: + - 1.1 varnish + x-cache: + - HIT + x-cache-hits: + - '1' + x-content-type-options: + - nosniff + x-fastly-request-id: + - 9bc27ff4162103958468d401eb64b1646ac61292 + x-frame-options: + - deny + x-github-request-id: + - 3CF0:29FD3:2ABBE5:3622AC:65A45289 + x-served-by: + - cache-qpg1230-QPG + x-timer: + - S1705477281.077988,VS0,VE315 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK - request: body: null headers: @@ -71,7 +191,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:24 GMT + - Wed, 17 Jan 2024 07:41:21 GMT expires: - '-1' pragma: @@ -88,7 +208,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15995,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43986 + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15999,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43999 status: code: 200 message: OK @@ -135,7 +255,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:25 GMT + - Wed, 17 Jan 2024 07:41:22 GMT expires: - '-1' pragma: @@ -152,7 +272,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMImageFromLocation3Min;12995,Microsoft.Compute/GetVMImageFromLocation30Min;73988 + - Microsoft.Compute/GetVMImageFromLocation3Min;12999,Microsoft.Compute/GetVMImageFromLocation30Min;73999 status: code: 200 message: OK @@ -184,7 +304,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:26 GMT + - Wed, 17 Jan 2024 07:41:23 GMT expires: - '-1' pragma: @@ -198,6 +318,126 @@ interactions: status: code: 200 message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.31.0 + method: GET + uri: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/arm-compute/quickstart-templates/aliases.json + response: + body: + string: "{\n \"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json\"\ + ,\n \"contentVersion\": \"1.0.0.0\",\n \"parameters\": {},\n \"variables\"\ + : {},\n \"resources\": [],\n \"outputs\": {\n \"aliases\": {\n \"\ + type\": \"object\",\n \"value\": {\n \"Linux\": {\n \"\ + CentOS85Gen2\": {\n \"publisher\": \"OpenLogic\",\n \ + \ \"offer\": \"CentOS\",\n \"sku\": \"8_5-gen2\",\n \ + \ \"version\": \"latest\",\n \"architecture\": \"x64\"\n \ + \ },\n \"Debian11\": {\n \"publisher\": \"Debian\"\ + ,\n \"offer\": \"debian-11\",\n \"sku\": \"11-backports-gen2\"\ + ,\n \"version\": \"latest\",\n \"architecture\": \"\ + x64\"\n },\n \"FlatcarLinuxFreeGen2\": {\n \"\ + publisher\": \"kinvolk\",\n \"offer\": \"flatcar-container-linux-free\"\ + ,\n \"sku\": \"stable-gen2\",\n \"version\": \"latest\"\ + ,\n \"architecture\": \"x64\"\n },\n \"OpenSuseLeap154Gen2\"\ + : {\n \"publisher\": \"SUSE\",\n \"offer\": \"openSUSE-leap-15-4\"\ + ,\n \"sku\": \"gen2\",\n \"version\": \"latest\",\n\ + \ \"architecture\": \"x64\"\n },\n \"RHELRaw8LVMGen2\"\ + : {\n \"publisher\": \"RedHat\",\n \"offer\": \"\ + RHEL\",\n \"sku\": \"8-lvm-gen2\",\n \"version\": \ + \ \"latest\",\n \"architecture\": \"x64\"\n },\n \ + \ \"SuseSles15SP3\": {\n \"publisher\": \"SUSE\",\n \ + \ \"offer\": \"sles-15-sp3\",\n \"sku\": \"gen2\",\n \ + \ \"version\": \"latest\",\n \"architecture\": \"x64\"\n \ + \ },\n \"Ubuntu2204\": {\n \"publisher\": \"\ + Canonical\",\n \"offer\": \"0001-com-ubuntu-server-jammy\",\n\ + \ \"sku\": \"22_04-lts-gen2\",\n \"version\": \"latest\"\ + ,\n \"architecture\": \"x64\"\n }\n },\n \ + \ \"Windows\": {\n \"Win2022Datacenter\": {\n \"publisher\"\ + : \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n\ + \ \"sku\": \"2022-datacenter-g2\",\n \"version\": \"\ + latest\",\n \"architecture\": \"x64\"\n },\n \ + \ \"Win2022AzureEditionCore\": {\n \"publisher\": \"MicrosoftWindowsServer\"\ + ,\n \"offer\": \"WindowsServer\",\n \"sku\": \"2022-datacenter-azure-edition-core\"\ + ,\n \"version\": \"latest\",\n \"architecture\": \"\ + x64\"\n },\n \"Win2019Datacenter\": {\n \"publisher\"\ + : \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n\ + \ \"sku\": \"2019-datacenter-gensecond\",\n \"version\"\ + : \"latest\",\n \"architecture\": \"x64\"\n },\n \ + \ \"Win2016Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\"\ + ,\n \"offer\": \"WindowsServer\",\n \"sku\": \"2016-datacenter-gensecond\"\ + ,\n \"version\": \"latest\",\n \"architecture\": \"\ + x64\"\n },\n \"Win2012R2Datacenter\": {\n \"\ + publisher\": \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\"\ + ,\n \"sku\": \"2012-R2-Datacenter\",\n \"version\":\ + \ \"latest\",\n \"architecture\": \"x64\"\n },\n \ + \ \"Win2012Datacenter\": {\n \"publisher\": \"MicrosoftWindowsServer\"\ + ,\n \"offer\": \"WindowsServer\",\n \"sku\": \"2012-Datacenter\"\ + ,\n \"version\": \"latest\",\n \"architecture\": \"\ + x64\"\n },\n \"Win2008R2SP1\": {\n \"publisher\"\ + : \"MicrosoftWindowsServer\",\n \"offer\": \"WindowsServer\",\n\ + \ \"sku\": \"2008-R2-SP1\",\n \"version\": \"latest\"\ + ,\n \"architecture\": \"x64\"\n }\n }\n }\n\ + \ }\n }\n}\n" + headers: + accept-ranges: + - bytes + access-control-allow-origin: + - '*' + cache-control: + - max-age=300 + connection: + - keep-alive + content-length: + - '3615' + content-security-policy: + - default-src 'none'; style-src 'unsafe-inline'; sandbox + content-type: + - text/plain; charset=utf-8 + cross-origin-resource-policy: + - cross-origin + date: + - Wed, 17 Jan 2024 07:41:26 GMT + etag: + - W/"9fee27d398b0211e374a0f0e8e79c9b3a0342cfa43466b26b8548409639c8c17" + expires: + - Wed, 17 Jan 2024 07:46:26 GMT + source-age: + - '5' + strict-transport-security: + - max-age=31536000 + vary: + - Authorization,Accept-Encoding,Origin + via: + - 1.1 varnish + x-cache: + - HIT + x-cache-hits: + - '1' + x-content-type-options: + - nosniff + x-fastly-request-id: + - 276eb753c8683c36e4aa6d546e74cc2acfc49a58 + x-frame-options: + - deny + x-github-request-id: + - 3CF0:29FD3:2ABBE5:3622AC:65A45289 + x-served-by: + - cache-qpg1259-QPG + x-timer: + - S1705477286.076950,VS0,VE1 + x-xss-protection: + - 1; mode=block + status: + code: 200 + message: OK - request: body: null headers: @@ -228,7 +468,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:26 GMT + - Wed, 17 Jan 2024 07:41:26 GMT expires: - '-1' pragma: @@ -245,7 +485,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15994,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43985 + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15998,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43998 status: code: 200 message: OK @@ -292,7 +532,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:27 GMT + - Wed, 17 Jan 2024 07:41:28 GMT expires: - '-1' pragma: @@ -309,7 +549,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMImageFromLocation3Min;12994,Microsoft.Compute/GetVMImageFromLocation30Min;73987 + - Microsoft.Compute/GetVMImageFromLocation3Min;12998,Microsoft.Compute/GetVMImageFromLocation30Min;73998 status: code: 200 message: OK @@ -343,7 +583,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:28 GMT + - Wed, 17 Jan 2024 07:41:28 GMT expires: - '-1' pragma: @@ -360,7 +600,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15993,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43984 + - Microsoft.Compute/ListVMImagesVersionsFromLocation3Min;15997,Microsoft.Compute/ListVMImagesVersionsFromLocation30Min;43997 status: code: 200 message: OK @@ -407,7 +647,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:29 GMT + - Wed, 17 Jan 2024 07:41:29 GMT expires: - '-1' pragma: @@ -424,7 +664,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMImageFromLocation3Min;12993,Microsoft.Compute/GetVMImageFromLocation30Min;73986 + - Microsoft.Compute/GetVMImageFromLocation3Min;12997,Microsoft.Compute/GetVMImageFromLocation30Min;73997 status: code: 200 message: OK @@ -484,10 +724,10 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI","name":"vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI","type":"Microsoft.Resources/deployments","properties":{"templateHash":"16090802831674420015","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2024-01-17T07:08:34.4890638Z","duration":"PT0.0005682S","correlationId":"459ddea5-bd48-4f31-a612-6872043c32ce","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/vm_deploy_Ej8XrJKOxiXHsu7kZ4ywOh3nxzq3oEG9","name":"vm_deploy_Ej8XrJKOxiXHsu7kZ4ywOh3nxzq3oEG9","type":"Microsoft.Resources/deployments","properties":{"templateHash":"18242090259530584770","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Accepted","timestamp":"2024-01-17T07:41:37.7423137Z","duration":"PT0.0002451S","correlationId":"ba0be8d8-3be7-417c-a625-c419cfb15f37","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}]}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI/operationStatuses/08584961315735826499?api-version=2022-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/vm_deploy_Ej8XrJKOxiXHsu7kZ4ywOh3nxzq3oEG9/operationStatuses/08584961295907350552?api-version=2022-09-01 cache-control: - no-cache content-length: @@ -495,7 +735,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:35 GMT + - Wed, 17 Jan 2024 07:41:39 GMT expires: - '-1' pragma: @@ -505,7 +745,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 201 message: Created @@ -525,19 +765,19 @@ interactions: User-Agent: - AZURECLI/2.56.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584961315735826499?api-version=2022-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584961295907350552?api-version=2022-09-01 response: body: - string: '{"status":"Accepted"}' + string: '{"status":"Running"}' headers: cache-control: - no-cache content-length: - - '21' + - '20' content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:08:35 GMT + - Wed, 17 Jan 2024 07:41:39 GMT expires: - '-1' pragma: @@ -567,7 +807,7 @@ interactions: User-Agent: - AZURECLI/2.56.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584961315735826499?api-version=2022-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584961295907350552?api-version=2022-09-01 response: body: string: '{"status":"Running"}' @@ -579,7 +819,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:09:05 GMT + - Wed, 17 Jan 2024 07:42:09 GMT expires: - '-1' pragma: @@ -609,7 +849,7 @@ interactions: User-Agent: - AZURECLI/2.56.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.10.6 (macOS-14.2.1-x86_64-i386-64bit) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584961315735826499?api-version=2022-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment/operationStatuses/08584961295907350552?api-version=2022-09-01 response: body: string: '{"status":"Succeeded"}' @@ -621,7 +861,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:09:35 GMT + - Wed, 17 Jan 2024 07:42:40 GMT expires: - '-1' pragma: @@ -654,16 +894,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.Resources/deployments/mock-deployment?api-version=2022-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI","name":"vm_deploy_QeFbKsPyJXjQwYjwmJwahDvBk1PGbxyI","type":"Microsoft.Resources/deployments","properties":{"templateHash":"16090802831674420015","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2024-01-17T07:09:08.5843399Z","duration":"PT34.0958443S","correlationId":"459ddea5-bd48-4f31-a612-6872043c32ce","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET"}]}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Resources/deployments/vm_deploy_Ej8XrJKOxiXHsu7kZ4ywOh3nxzq3oEG9","name":"vm_deploy_Ej8XrJKOxiXHsu7kZ4ywOh3nxzq3oEG9","type":"Microsoft.Resources/deployments","properties":{"templateHash":"18242090259530584770","parameters":{"adminPassword":{"type":"SecureString"}},"mode":"Incremental","provisioningState":"Succeeded","timestamp":"2024-01-17T07:42:39.5475111Z","duration":"PT1M1.8054425S","correlationId":"ba0be8d8-3be7-417c-a625-c419cfb15f37","providers":[{"namespace":"Microsoft.Network","resourceTypes":[{"resourceType":"virtualNetworks","locations":["westus"]},{"resourceType":"networkSecurityGroups","locations":["westus"]},{"resourceType":"publicIPAddresses","locations":["westus"]},{"resourceType":"networkInterfaces","locations":["westus"]}]},{"namespace":"Microsoft.Compute","resourceTypes":[{"resourceType":"virtualMachines","locations":["westus"]}]}],"dependencies":[{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET","resourceType":"Microsoft.Network/virtualNetworks","resourceName":"vm1VNET"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG","resourceType":"Microsoft.Network/networkSecurityGroups","resourceName":"vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP","resourceType":"Microsoft.Network/publicIPAddresses","resourceName":"vm1PublicIP"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"},{"dependsOn":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic","resourceType":"Microsoft.Network/networkInterfaces","resourceName":"vm1VMNic"}],"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1","resourceType":"Microsoft.Compute/virtualMachines","resourceName":"vm1"}],"outputs":{},"outputResources":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/virtualMachines/vm1"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/virtualNetworks/vm1VNET"}]}}' headers: cache-control: - no-cache content-length: - - '3139' + - '3140' content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:09:36 GMT + - Wed, 17 Jan 2024 07:42:41 GMT expires: - '-1' pragma: @@ -700,15 +940,15 @@ interactions: ,\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\"\ : \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"hardwareProfile\"\ : {\r\n \"vmSize\": \"Standard_DS1_v2\"\r\n },\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"vmId\": \"67c37e29-f5f5-4b1f-a6bc-555f03d1f7cb\"\ + : \"Succeeded\",\r\n \"vmId\": \"062e26a0-8d0f-482c-9777-f5e96883d676\"\ ,\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"\ publisher\": \"Canonical\",\r\n \"offer\": \"0001-com-ubuntu-server-jammy\"\ ,\r\n \"sku\": \"22_04-lts-gen2\",\r\n \"version\": \"latest\"\ ,\r\n \"exactVersion\": \"22.04.202312060\"\r\n },\r\n \"\ - osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm1_disk1_3c00f89bb0b640bf8f8af1f9e6ee3537\"\ + osDisk\": {\r\n \"osType\": \"Linux\",\r\n \"name\": \"vm1_disk1_a66681be69dd432babb10ccff04a1116\"\ ,\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\"\ ,\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Premium_LRS\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/disks/vm1_disk1_3c00f89bb0b640bf8f8af1f9e6ee3537\"\ + ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Compute/disks/vm1_disk1_a66681be69dd432babb10ccff04a1116\"\ \r\n },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\"\ : 30\r\n },\r\n \"dataDisks\": [],\r\n \"diskControllerType\"\ : \"SCSI\"\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"\ @@ -728,20 +968,20 @@ interactions: : [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"\ Ready\",\r\n \"message\": \"Guest Agent is running\",\r\n \ - \ \"time\": \"2024-01-17T07:09:18+00:00\"\r\n }\r\n \ + \ \"time\": \"2024-01-17T07:42:20+00:00\"\r\n }\r\n \ \ ],\r\n \"extensionHandlers\": []\r\n },\r\n \"disks\":\ - \ [\r\n {\r\n \"name\": \"vm1_disk1_3c00f89bb0b640bf8f8af1f9e6ee3537\"\ + \ [\r\n {\r\n \"name\": \"vm1_disk1_a66681be69dd432babb10ccff04a1116\"\ ,\r\n \"statuses\": [\r\n {\r\n \"code\"\ : \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\ \n \"displayStatus\": \"Provisioning succeeded\",\r\n \ - \ \"time\": \"2024-01-17T07:08:52.5301698+00:00\"\r\n }\r\ + \ \"time\": \"2024-01-17T07:41:57.6313146+00:00\"\r\n }\r\ \n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": \"V2\"\ ,\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning\ - \ succeeded\",\r\n \"time\": \"2024-01-17T07:09:04.9209937+00:00\"\ + \ succeeded\",\r\n \"time\": \"2024-01-17T07:42:10.0064617+00:00\"\ \r\n },\r\n {\r\n \"code\": \"PowerState/running\"\ ,\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\ - \r\n }\r\n ]\r\n },\r\n \"timeCreated\": \"2024-01-17T07:08:50.5770193+00:00\"\ + \r\n }\r\n ]\r\n },\r\n \"timeCreated\": \"2024-01-17T07:41:55.8187877+00:00\"\ \r\n }\r\n}" headers: cache-control: @@ -751,7 +991,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:09:37 GMT + - Wed, 17 Jan 2024 07:42:41 GMT expires: - '-1' pragma: @@ -768,7 +1008,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGetSubscriptionMaximum;23999,Microsoft.Compute/LowCostGetResource;32 + - Microsoft.Compute/LowCostGetSubscriptionMaximum;23996,Microsoft.Compute/LowCostGetResource;32 status: code: 200 message: '' @@ -792,12 +1032,12 @@ interactions: response: body: string: "{\r\n \"name\": \"vm1VMNic\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic\"\ - ,\r\n \"etag\": \"W/\\\"077fbddb-4381-4a26-b5b6-7d8176b40314\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"625c74c0-ef7c-44c7-a3d2-e18029d3c770\\\"\",\r\n \ \ \"tags\": {},\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"684b3dcf-3db5-400d-831b-d78efe652453\",\r\n \ + ,\r\n \"resourceGuid\": \"26650cd2-2ffd-447e-b865-0be72ebf7704\",\r\n \ \ \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfigvm1\"\ ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ - ,\r\n \"etag\": \"W/\\\"077fbddb-4381-4a26-b5b6-7d8176b40314\\\"\"\ + ,\r\n \"etag\": \"W/\\\"625c74c0-ef7c-44c7-a3d2-e18029d3c770\\\"\"\ ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ @@ -807,8 +1047,8 @@ interactions: \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"dh3rl52onktenizdcpiq5wuluf.dx.internal.cloudapp.net\"\ - \r\n },\r\n \"macAddress\": \"60-45-BD-08-ED-EB\",\r\n \"vnetEncryptionSupported\"\ + internalDomainNameSuffix\": \"iq3hwfc3byfe1fsgazt3035qoe.dx.internal.cloudapp.net\"\ + \r\n },\r\n \"macAddress\": \"00-0D-3A-3B-0A-FB\",\r\n \"vnetEncryptionSupported\"\ : false,\r\n \"enableIPForwarding\": false,\r\n \"networkSecurityGroup\"\ : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkSecurityGroups/vm1NSG\"\ \r\n },\r\n \"primary\": true,\r\n \"virtualMachine\": {\r\n \ @@ -825,9 +1065,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:09:38 GMT + - Wed, 17 Jan 2024 07:42:43 GMT etag: - - W/"077fbddb-4381-4a26-b5b6-7d8176b40314" + - W/"625c74c0-ef7c-44c7-a3d2-e18029d3c770" expires: - '-1' pragma: @@ -844,7 +1084,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cd63592d-aeee-407f-9977-b1b6ced1499e + - fd297f8a-96f3-4d22-8818-95c3b09f6588 status: code: 200 message: OK @@ -868,10 +1108,10 @@ interactions: response: body: string: "{\r\n \"name\": \"vm1PublicIP\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/publicIPAddresses/vm1PublicIP\"\ - ,\r\n \"etag\": \"W/\\\"6c379240-c579-4adc-969d-adbf1ef0bc2e\\\"\",\r\n \ + ,\r\n \"etag\": \"W/\\\"d15e8269-d4fa-4ae3-a9cf-b6e06e5d5086\\\"\",\r\n \ \ \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n\ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"73f9c032-7727-4d88-b3cc-506c83bbb15c\"\ - ,\r\n \"ipAddress\": \"40.112.248.248\",\r\n \"publicIPAddressVersion\"\ + \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"89271aa7-1c04-4bee-863c-07ded9e63cda\"\ + ,\r\n \"ipAddress\": \"40.112.133.2\",\r\n \"publicIPAddressVersion\"\ : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\"\ : 4,\r\n \"ipTags\": [],\r\n \"ipConfiguration\": {\r\n \"id\"\ : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkInterfaces/vm1VMNic/ipConfigurations/ipconfigvm1\"\ @@ -882,13 +1122,13 @@ interactions: cache-control: - no-cache content-length: - - '907' + - '905' content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:09:39 GMT + - Wed, 17 Jan 2024 07:42:44 GMT etag: - - W/"6c379240-c579-4adc-969d-adbf1ef0bc2e" + - W/"d15e8269-d4fa-4ae3-a9cf-b6e06e5d5086" expires: - '-1' pragma: @@ -905,7 +1145,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 63b0d0be-44f6-433e-9925-bb1f7646a830 + - c9138d7f-fef7-4f2f-96fc-84eab425dadc status: code: 200 message: OK @@ -937,7 +1177,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:09:43 GMT + - Wed, 17 Jan 2024 07:42:47 GMT expires: - '-1' pragma: @@ -1177,7 +1417,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:09:44 GMT + - Wed, 17 Jan 2024 07:42:48 GMT expires: - '-1' pragma: @@ -1220,7 +1460,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Insights/metrics?region=westus&api-version=2023-10-01 response: body: - string: '{"cost":59,"timespan":"2024-01-17T06:09:45Z/2024-01-17T07:09:45Z","interval":"PT1M","value":[{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Insights/metrics/Data + string: '{"cost":59,"timespan":"2024-01-17T06:42:50Z/2024-01-17T07:42:50Z","interval":"PT1M","value":[{"id":"subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.Insights/metrics/Data Disk Max Burst IOPS","type":"Microsoft.Insights/metrics","name":{"value":"Data Disk Max Burst IOPS","localizedValue":"Data Disk Max Burst IOPS"},"displayDescription":"Maximum IOPS Data Disk can achieve with bursting","unit":"Count","timeseries":[],"errorCode":"Success"}],"namespace":"microsoft.compute/virtualmachines","resourceregion":"westus"}' @@ -1232,7 +1472,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 17 Jan 2024 07:09:45 GMT + - Wed, 17 Jan 2024 07:42:50 GMT expires: - '-1' pragma: From 28f65f1d90b970087741416373b831dd138d20b6 Mon Sep 17 00:00:00 2001 From: AllyWang Date: Wed, 17 Jan 2024 17:40:11 +0800 Subject: [PATCH 5/5] fix help --- .../command_modules/monitor/aaz/latest/monitor/__cmd_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/__cmd_group.py b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/__cmd_group.py index 84ca1041466..b7be6b843b5 100644 --- a/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/__cmd_group.py +++ b/src/azure-cli/azure/cli/command_modules/monitor/aaz/latest/monitor/__cmd_group.py @@ -15,7 +15,7 @@ "monitor", ) class __CMDGroup(AAZCommandGroup): - """Monitor. + """Manage the Azure Monitor Service. """ pass