MicrosoftDocs / azure-docs-sdk-python

Azure Python SDK documentation, hosted on docs.microsoft.com.

Home Page:https://docs.microsoft.com/python/api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example script for Monitor Alerts creates a deprecated resource type

vlkuznet opened this issue · comments

On this page of our docs: https://docs.microsoft.com/en-us/python/api/overview/azure/monitoring?view=azure-python

We provide an example script, but applying it emits the following error:

azure.mgmt.monitor.models.error_response_py3.ErrorResponseException: As part of classic alerts retirement, starting Sep 01, 2019, no new classic alerts can be created except on a few metrics listed here https://aka.ms/classic-alerts-exceptions. All classic alerts including the exceptions listed will stop working after June 2020. It is strongly recommended to use new metric alerts. See https://aka.ms/create-metric-alerts.

This is the very last code snippet on the page.

It looks like it's a fairly straightforward update to use the metric_alerts method in place of the alertrules method for the legacy resource.

@estensen sorry, I no longer work in docs

@lisawong19 you're listed as the author here on the deprecated code example. Do you know if anyone going to create an up-to-date example?

@estensen - Please open this issue over at https://github.com/Azure/azure-sdk-for-python - the team there is the ones that owns this source code.

@rloutlaw But this isn't a problem with the source code. It's the docs that are outdated and missing. Are you sure you want me to open an issue in azure-sdk-for-python?

Closing in favor of the SDK issue opened