-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from a2ed141f095adf20aeb11d3bd796d5906fce4f6b (#3414)
Update sqr documentation to include LogToMetricAction
- Loading branch information
1 parent
d143388
commit 39e8a0d
Showing
13 changed files
with
275 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class Criteria(Model): | ||
"""Specifies the criteria for converting log to metric. | ||
All required parameters must be populated in order to send to Azure. | ||
:param metric_name: Required. Name of the metric | ||
:type metric_name: str | ||
:param dimensions: List of Dimensions for creating metric | ||
:type dimensions: list[~azure.mgmt.monitor.models.Dimension] | ||
""" | ||
|
||
_validation = { | ||
'metric_name': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'metric_name': {'key': 'metricName', 'type': 'str'}, | ||
'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(Criteria, self).__init__(**kwargs) | ||
self.metric_name = kwargs.get('metric_name', None) | ||
self.dimensions = kwargs.get('dimensions', None) |
38 changes: 38 additions & 0 deletions
38
azure-mgmt-monitor/azure/mgmt/monitor/models/criteria_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class Criteria(Model): | ||
"""Specifies the criteria for converting log to metric. | ||
All required parameters must be populated in order to send to Azure. | ||
:param metric_name: Required. Name of the metric | ||
:type metric_name: str | ||
:param dimensions: List of Dimensions for creating metric | ||
:type dimensions: list[~azure.mgmt.monitor.models.Dimension] | ||
""" | ||
|
||
_validation = { | ||
'metric_name': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'metric_name': {'key': 'metricName', 'type': 'str'}, | ||
'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, | ||
} | ||
|
||
def __init__(self, *, metric_name: str, dimensions=None, **kwargs) -> None: | ||
super(Criteria, self).__init__(**kwargs) | ||
self.metric_name = metric_name | ||
self.dimensions = dimensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class Dimension(Model): | ||
"""Specifies the criteria for converting log to metric. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:param name: Required. Name of the dimension | ||
:type name: str | ||
:ivar operator: Required. Operator for dimension values. Default value: | ||
"Include" . | ||
:vartype operator: str | ||
:param values: Required. List of dimension values | ||
:type values: list[str] | ||
""" | ||
|
||
_validation = { | ||
'name': {'required': True}, | ||
'operator': {'required': True, 'constant': True}, | ||
'values': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'operator': {'key': 'operator', 'type': 'str'}, | ||
'values': {'key': 'values', 'type': '[str]'}, | ||
} | ||
|
||
operator = "Include" | ||
|
||
def __init__(self, **kwargs): | ||
super(Dimension, self).__init__(**kwargs) | ||
self.name = kwargs.get('name', None) | ||
self.values = kwargs.get('values', None) |
49 changes: 49 additions & 0 deletions
49
azure-mgmt-monitor/azure/mgmt/monitor/models/dimension_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class Dimension(Model): | ||
"""Specifies the criteria for converting log to metric. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
All required parameters must be populated in order to send to Azure. | ||
:param name: Required. Name of the dimension | ||
:type name: str | ||
:ivar operator: Required. Operator for dimension values. Default value: | ||
"Include" . | ||
:vartype operator: str | ||
:param values: Required. List of dimension values | ||
:type values: list[str] | ||
""" | ||
|
||
_validation = { | ||
'name': {'required': True}, | ||
'operator': {'required': True, 'constant': True}, | ||
'values': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'name': {'key': 'name', 'type': 'str'}, | ||
'operator': {'key': 'operator', 'type': 'str'}, | ||
'values': {'key': 'values', 'type': '[str]'}, | ||
} | ||
|
||
operator = "Include" | ||
|
||
def __init__(self, *, name: str, values, **kwargs) -> None: | ||
super(Dimension, self).__init__(**kwargs) | ||
self.name = name | ||
self.values = values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
azure-mgmt-monitor/azure/mgmt/monitor/models/log_to_metric_action.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .action import Action | ||
|
||
|
||
class LogToMetricAction(Action): | ||
"""Specifiy action need to be taken when rule type is converting log to | ||
metric. | ||
All required parameters must be populated in order to send to Azure. | ||
:param odatatype: Required. Constant filled by server. | ||
:type odatatype: str | ||
:param criteria: Required. Severity of the alert | ||
:type criteria: ~azure.mgmt.monitor.models.Criteria | ||
""" | ||
|
||
_validation = { | ||
'odatatype': {'required': True}, | ||
'criteria': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'odatatype': {'key': 'odata\\.type', 'type': 'str'}, | ||
'criteria': {'key': 'criteria', 'type': 'Criteria'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(LogToMetricAction, self).__init__(**kwargs) | ||
self.criteria = kwargs.get('criteria', None) | ||
self.odatatype = 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction' |
40 changes: 40 additions & 0 deletions
40
azure-mgmt-monitor/azure/mgmt/monitor/models/log_to_metric_action_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .action_py3 import Action | ||
|
||
|
||
class LogToMetricAction(Action): | ||
"""Specifiy action need to be taken when rule type is converting log to | ||
metric. | ||
All required parameters must be populated in order to send to Azure. | ||
:param odatatype: Required. Constant filled by server. | ||
:type odatatype: str | ||
:param criteria: Required. Severity of the alert | ||
:type criteria: ~azure.mgmt.monitor.models.Criteria | ||
""" | ||
|
||
_validation = { | ||
'odatatype': {'required': True}, | ||
'criteria': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'odatatype': {'key': 'odata\\.type', 'type': 'str'}, | ||
'criteria': {'key': 'criteria', 'type': 'Criteria'}, | ||
} | ||
|
||
def __init__(self, *, criteria, **kwargs) -> None: | ||
super(LogToMetricAction, self).__init__(**kwargs) | ||
self.criteria = criteria | ||
self.odatatype = 'Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.