-
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.
[Monitor] Add Public Preview APIs of Metric Baseline (#1710)
* Generated from e6af07c * Update Monitor version
- Loading branch information
1 parent
6d7b146
commit 4f77cc7
Showing
77 changed files
with
804 additions
and
186 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
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
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,43 @@ | ||
# 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 Baseline(Model): | ||
"""The baseline values for a single sensitivity value. | ||
:param sensitivity: the sensitivity of the baseline. Possible values | ||
include: 'Low', 'Medium', 'High' | ||
:type sensitivity: str or ~azure.mgmt.monitor.models.Sensitivity | ||
:param low_thresholds: The low thresholds of the baseline. | ||
:type low_thresholds: list[float] | ||
:param high_thresholds: The high thresholds of the baseline. | ||
:type high_thresholds: list[float] | ||
""" | ||
|
||
_validation = { | ||
'sensitivity': {'required': True}, | ||
'low_thresholds': {'required': True}, | ||
'high_thresholds': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'sensitivity': {'key': 'sensitivity', 'type': 'Sensitivity'}, | ||
'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, | ||
'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, | ||
} | ||
|
||
def __init__(self, sensitivity, low_thresholds, high_thresholds): | ||
super(Baseline, self).__init__() | ||
self.sensitivity = sensitivity | ||
self.low_thresholds = low_thresholds | ||
self.high_thresholds = high_thresholds |
32 changes: 32 additions & 0 deletions
32
azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_metadata_value.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,32 @@ | ||
# 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 BaselineMetadataValue(Model): | ||
"""Represents a baseline metadata value. | ||
:param name: the name of the metadata. | ||
:type name: ~azure.mgmt.monitor.models.LocalizableString | ||
:param value: the value of the metadata. | ||
:type value: str | ||
""" | ||
|
||
_attribute_map = { | ||
'name': {'key': 'name', 'type': 'LocalizableString'}, | ||
'value': {'key': 'value', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, name=None, value=None): | ||
super(BaselineMetadataValue, self).__init__() | ||
self.name = name | ||
self.value = value |
76 changes: 76 additions & 0 deletions
76
azure-mgmt-monitor/azure/mgmt/monitor/models/baseline_response.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,76 @@ | ||
# 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 BaselineResponse(Model): | ||
"""The response to a baseline query. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
:ivar id: the metric baseline Id. | ||
:vartype id: str | ||
:ivar type: the resource type of the baseline resource. | ||
:vartype type: str | ||
:ivar name: the name and the display name of the metric, i.e. it is | ||
localizable string. | ||
:vartype name: ~azure.mgmt.monitor.models.LocalizableString | ||
:param timespan: The timespan for which the data was retrieved. Its value | ||
consists of two datatimes concatenated, separated by '/'. This may be | ||
adjusted in the future and returned back from what was originally | ||
requested. | ||
:type timespan: str | ||
:param interval: The interval (window size) for which the metric data was | ||
returned in. This may be adjusted in the future and returned back from | ||
what was originally requested. This is not present if a metadata request | ||
was made. | ||
:type interval: timedelta | ||
:param aggregation: The aggregation type of the metric. | ||
:type aggregation: str | ||
:param timestamps: the array of timestamps of the baselines. | ||
:type timestamps: list[datetime] | ||
:param baseline: the baseline values for each sensitivity. | ||
:type baseline: list[~azure.mgmt.monitor.models.Baseline] | ||
:param metadata: the baseline metadata values. | ||
:type metadata: list[~azure.mgmt.monitor.models.BaselineMetadataValue] | ||
""" | ||
|
||
_validation = { | ||
'id': {'readonly': True}, | ||
'type': {'readonly': True}, | ||
'name': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'id': {'key': 'id', 'type': 'str'}, | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'name': {'key': 'name', 'type': 'LocalizableString'}, | ||
'timespan': {'key': 'properties.timespan', 'type': 'str'}, | ||
'interval': {'key': 'properties.interval', 'type': 'duration'}, | ||
'aggregation': {'key': 'properties.aggregation', 'type': 'str'}, | ||
'timestamps': {'key': 'properties.timestamps', 'type': '[iso-8601]'}, | ||
'baseline': {'key': 'properties.baseline', 'type': '[Baseline]'}, | ||
'metadata': {'key': 'properties.metadata', 'type': '[BaselineMetadataValue]'}, | ||
} | ||
|
||
def __init__(self, timespan=None, interval=None, aggregation=None, timestamps=None, baseline=None, metadata=None): | ||
super(BaselineResponse, self).__init__() | ||
self.id = None | ||
self.type = None | ||
self.name = None | ||
self.timespan = timespan | ||
self.interval = interval | ||
self.aggregation = aggregation | ||
self.timestamps = timestamps | ||
self.baseline = baseline | ||
self.metadata = metadata |
41 changes: 41 additions & 0 deletions
41
azure-mgmt-monitor/azure/mgmt/monitor/models/calculate_baseline_response.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,41 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class CalculateBaselineResponse(Model): | ||
"""The response to a calcualte baseline call. | ||
:param type: the resource type of the baseline resource. | ||
:type type: str | ||
:param timestamps: the array of timestamps of the baselines. | ||
:type timestamps: list[datetime] | ||
:param baseline: the baseline values for each sensitivity. | ||
:type baseline: list[~azure.mgmt.monitor.models.Baseline] | ||
""" | ||
|
||
_validation = { | ||
'type': {'required': True}, | ||
'baseline': {'required': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'type': {'key': 'type', 'type': 'str'}, | ||
'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, | ||
'baseline': {'key': 'baseline', 'type': '[Baseline]'}, | ||
} | ||
|
||
def __init__(self, type, baseline, timestamps=None): | ||
super(CalculateBaselineResponse, self).__init__() | ||
self.type = type | ||
self.timestamps = timestamps | ||
self.baseline = baseline |
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
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
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
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.