azure.ai.metricsadvisor.models package

class azure.ai.metricsadvisor.models.AnomalyFeedback(metric_id, dimension_key, start_time, end_time, value, **kwargs)[source]

AnomalyFeedback.

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.

Parameters
  • feedback_type (str or FeedbackType) – Required. feedback type.Constant filled by server. Possible values include: “Anomaly”, “ChangePoint”, “Period”, “Comment”.

  • metric_id (str) – Required. metric unique id.

  • dimension_key (dict[str, str]) – Required. metric dimension filter.

  • start_time (datetime) – Required. the start timestamp of feedback timerange.

  • end_time (datetime) – Required. the end timestamp of feedback timerange, when equals to startTime means only one timestamp.

  • value (str or AnomalyValue) – Required. Possible values include: “AutoDetect”, “Anomaly”, “NotAnomaly”.

Variables
  • id (str) – feedback unique id.

  • created_time (datetime) – feedback created time.

  • user_principal (str) – user who gives this feedback.

Keyword Arguments
  • anomaly_detection_configuration_id (str) – the corresponding anomaly detection configuration of this feedback.

  • anomaly_detection_configuration_snapshot (AnomalyDetectionConfiguration) –

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.ChangePointFeedback(metric_id, dimension_key, start_time, end_time, value, **kwargs)[source]

ChangePointFeedback.

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.

Parameters
  • feedback_type (str or FeedbackType) – Required. feedback type.Constant filled by server. Possible values include: “Anomaly”, “ChangePoint”, “Period”, “Comment”.

  • metric_id (str) – Required. metric unique id.

  • dimension_key (dict[str, str]) – Required. metric dimension filter.

  • start_time (datetime) – Required. the start timestamp of feedback timerange.

  • end_time (datetime) – Required. the end timestamp of feedback timerange, when equals to startTime means only one timestamp.

  • value (str or ChangePointValue) – Required. Possible values include: “AutoDetect”, “ChangePoint”, “NotChangePoint”.

Variables
  • id (str) – feedback unique id.

  • created_time (datetime) – feedback created time.

  • user_principal (str) – user who gives this feedback.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.CommentFeedback(metric_id, dimension_key, start_time, end_time, value, **kwargs)[source]

CommentFeedback.

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.

Parameters
  • feedback_type (str or FeedbackType) – Required. feedback type.Constant filled by server. Possible values include: “Anomaly”, “ChangePoint”, “Period”, “Comment”.

  • metric_id (str) – Required. metric unique id.

  • dimension_key (dict[str, str]) – Required. metric dimension filter.

  • start_time (datetime) – the start timestamp of feedback timerange.

  • end_time (datetime) – the end timestamp of feedback timerange, when equals to startTime means only one timestamp.

  • value (str) – Required. the comment string.

Variables
  • id (str) – feedback unique id.

  • created_time (datetime) – feedback created time.

  • user_principal (str) – user who gives this feedback.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.PeriodFeedback(metric_id, dimension_key, value, period_type, **kwargs)[source]

PeriodFeedback.

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.

Parameters
  • feedback_type (str or FeedbackType) – Required. feedback type.Constant filled by server. Possible values include: “Anomaly”, “ChangePoint”, “Period”, “Comment”.

  • metric_id (str) – Required. metric unique id.

  • dimension_key (dict[str, str]) – Required. metric dimension filter.

  • value (int) – Required.

  • period_type (str or PeriodType) – Required. the type of setting period. Possible values include: “AutoDetect”, “AssignValue”.

Variables
  • id (str) – feedback unique id.

  • created_time (datetime) – feedback created time.

  • user_principal (str) – user who gives this feedback.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.FeedbackQueryTimeMode[source]

time mode to filter feedback

FEEDBACK_CREATED_TIME = 'FeedbackCreatedTime'
METRIC_TIMESTAMP = 'MetricTimestamp'
class azure.ai.metricsadvisor.models.RootCause(*, root_cause: azure.ai.metricsadvisor._generated.models._models_py3.DimensionGroupIdentity, path: List[str], score: float, description: str, **kwargs)[source]

RootCause.

All required parameters must be populated in order to send to Azure.

Parameters
  • root_cause (DimensionGroupIdentity) – Required.

  • path (list[str]) – Required. drilling down path from query anomaly to root cause.

  • score (float) – Required. score.

  • description (str) – Required. description.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.AnomalyAlertConfiguration(name: str, metric_alert_configurations: List[azure.ai.metricsadvisor.models._models.MetricAlertConfiguration], hook_ids: List[str], **kwargs: Any)[source]

AnomalyAlertConfiguration.

Parameters
  • name (str) – Required. anomaly alert configuration name.

  • hook_ids (list[str]) – Required. hook unique ids.

  • metric_alert_configurations (list[MetricAlertConfiguration]) – Required. Anomaly alert configurations.

Variables
  • id (str) – anomaly alert configuration unique id.

  • description (str) – anomaly alert configuration description.

  • cross_metrics_operator (str or MetricAnomalyAlertConfigurationsOperator) – cross metrics operator should be specified when setting up multiple metric alert configurations. Possible values include: “AND”, “OR”, “XOR”.

class azure.ai.metricsadvisor.models.DetectionAnomalyFilterCondition(*, dimension_filter: Optional[List[DimensionGroupIdentity]] = None, severity_filter: Optional[SeverityFilterCondition] = None, **kwargs)[source]

DetectionAnomalyFilterCondition.

Parameters
as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.DimensionGroupIdentity(*, dimension: Dict[str, str], **kwargs)[source]

DimensionGroupIdentity.

All required parameters must be populated in order to send to Azure.

Parameters

dimension (dict[str, str]) – Required. dimension specified for series group.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.AnomalyIncident(**kwargs)[source]

AnomalyIncident.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • metric_id (str) – metric unique id. Only returned for alerting incident result.

  • detection_configuration_id (str) – anomaly detection configuration unique id. Only returned for alerting incident result.

  • id (str) – incident id.

  • start_time (datetime) – incident start time.

  • last_time (datetime) – incident last time.

  • severity (str or AnomalySeverity) – max severity of latest anomalies in the incident. Possible values include: “Low”, “Medium”, “High”.

  • status (str or AnomalyIncidentStatus) – incident status only return for alerting incident result. Possible values include: “Active”, “Resolved”.

Parameters

dimension_key (dict[str, str]) – dimension specified for series.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.DetectionIncidentFilterCondition(*, dimension_filter: Optional[List[DimensionGroupIdentity]] = None, **kwargs)[source]

DetectionIncidentFilterCondition.

Parameters

dimension_filter (list[DimensionGroupIdentity]) – dimension filter.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.AnomalyDetectionConfiguration(name: str, metric_id: str, whole_series_detection_condition: azure.ai.metricsadvisor.models._models.MetricDetectionCondition, **kwargs: Any)[source]

AnomalyDetectionConfiguration.

Parameters
  • name (str) – Required. anomaly detection configuration name.

  • metric_id (str) – Required. metric unique id.

  • whole_series_detection_condition (MetricDetectionCondition) – Required. Conditions to detect anomalies in all time series of a metric.

Variables
class azure.ai.metricsadvisor.models.MetricAnomalyAlertConfigurationsOperator[source]

Cross metrics operator

AND = 'AND'
OR = 'OR'
XOR = 'XOR'
azure.ai.metricsadvisor.models.DataFeedStatus

alias of azure.ai.metricsadvisor._generated.models._azure_cognitive_service_metrics_advisor_restapi_open_ap_iv2_enums.DataFeedDetailStatus

class azure.ai.metricsadvisor.models.DataFeedGranularity(granularity_type: Union[str, DataFeedGranularityType], **kwargs: Any)[source]

Data feed granularity

Parameters

granularity_type (str or DataFeedGranularityType) – Granularity of the time series. Possible values include: “Yearly”, “Monthly”, “Weekly”, “Daily”, “Hourly”, “Minutely”, “Secondly”, “Custom”.

Keyword Arguments

custom_granularity_value (int) – Must be populated if granularity_type is “Custom”.

class azure.ai.metricsadvisor.models.DataFeedIngestionSettings(ingestion_begin_time: datetime.datetime, **kwargs: Any)[source]

Data feed ingestion settings.

Parameters

ingestion_begin_time (datetime) – Ingestion start time.

Keyword Arguments
  • data_source_request_concurrency (int) – The max concurrency of data ingestion queries against user data source. Zero (0) means no limitation.

  • ingestion_retry_delay (int) – The min retry interval for failed data ingestion tasks, in seconds.

  • ingestion_start_offset (int) – The time that the beginning of data ingestion task will delay for every data slice according to this offset, in seconds.

  • stop_retry_after (int) – Stop retry data ingestion after the data slice first schedule time in seconds.

class azure.ai.metricsadvisor.models.DataFeedOptions(**kwargs)[source]

Data feed options.

Keyword Arguments
  • admin_emails (list[str]) – Data feed administrator emails.

  • data_feed_description (str) – Data feed description.

  • missing_data_point_fill_settings (DataFeedMissingDataPointFillSettings) – The fill missing point type and value.

  • rollup_settings (DataFeedRollupSettings) – The rollup settings.

  • viewer_emails (list[str]) – Data feed viewer emails.

  • access_mode (str or DataFeedAccessMode) – Data feed access mode. Possible values include: “Private”, “Public”. Default value: “Private”.

  • action_link_template (str) – action link for alert.

class azure.ai.metricsadvisor.models.DataFeedMissingDataPointFillSettings(**kwargs)[source]

Data feed missing data point fill settings

Keyword Arguments
  • fill_type (str or DataSourceMissingDataPointFillType) – The type of fill missing point for anomaly detection. Possible values include: “SmartFilling”, “PreviousValue”, “CustomValue”, “NoFilling”. Default value: “SmartFilling”.

  • custom_fill_value (float) – The value of fill missing point for anomaly detection if “CustomValue” fill type is specified.

class azure.ai.metricsadvisor.models.DataFeedRollupSettings(**kwargs)[source]

Data feed rollup settings

Keyword Arguments
  • rollup_identification_value (str) – The identification value for the row of calculated all-up value.

  • rollup_type (str or DataFeedRollupType) – Mark if the data feed needs rollup. Possible values include: “NoRollup”, “AutoRollup”, “AlreadyRollup”. Default value: “AutoRollup”.

  • auto_rollup_group_by_column_names (list[str]) – Roll up columns.

  • rollup_method (str or DataFeedAutoRollupMethod) – Roll up method. Possible values include: “None”, “Sum”, “Max”, “Min”, “Avg”, “Count”.

class azure.ai.metricsadvisor.models.DataFeedSchema(metrics: List[azure.ai.metricsadvisor.models._models.DataFeedMetric], **kwargs: Any)[source]

Data feed schema

Parameters

metrics (list[DataFeedMetric]) – List of metrics.

Keyword Arguments
  • dimensions (list[DataFeedDimension]) – List of dimension.

  • timestamp_column (str) – User-defined timestamp column. If timestamp_column is None, start time of every time slice will be used as default value.

class azure.ai.metricsadvisor.models.DataFeedDimension(name: str, **kwargs: Any)[source]

DataFeedDimension.

Parameters

name (str) – Required. dimension name.

Keyword Arguments

display_name (str) – dimension display name.

class azure.ai.metricsadvisor.models.DataFeedMetric(name: str, **kwargs: Any)[source]

DataFeedMetric.

Parameters

name (str) – Required. metric name.

Keyword Arguments
  • display_name (str) – metric display name.

  • description (str) – metric description.

Variables

id (str) – metric id.

class azure.ai.metricsadvisor.models.DataFeed(name: str, source: DataFeedSourceUnion, granularity: DataFeedGranularity, schema: DataFeedSchema, ingestion_settings: DataFeedIngestionSettings, **kwargs: Any)[source]

Represents a data feed.

Variables
class azure.ai.metricsadvisor.models.TopNGroupScope(top: int, period: int, min_top_count: int, **kwargs: Any)[source]

TopNGroupScope.

Parameters
  • top (int) – Required. top N, value range : [1, +∞).

  • period (int) – Required. point count used to look back, value range : [1, +∞).

  • min_top_count (int) – Required. min count should be in top N, value range : [1, +∞) should be less than or equal to period.

class azure.ai.metricsadvisor.models.MetricAnomalyAlertScope(scope_type: str, **kwargs: Any)[source]
Parameters

scope_type (str or MetricAnomalyAlertScopeType) – Required. Anomaly scope. Possible values include: “WholeSeries”, “SeriesGroup”, “TopN”.

Keyword Arguments
  • series_group_in_scope (dict[str, str]) – Dimension specified for series group.

  • top_n_group_in_scope (TopNGroupScope) –

class azure.ai.metricsadvisor.models.MetricAlertConfiguration(detection_configuration_id: str, alert_scope: azure.ai.metricsadvisor.models._models.MetricAnomalyAlertScope, **kwargs: Any)[source]

MetricAlertConfiguration.

Parameters
  • detection_configuration_id (str) – Required. Anomaly detection configuration unique id.

  • alert_scope (MetricAnomalyAlertScope) – Required. Anomaly scope.

Keyword Arguments
class azure.ai.metricsadvisor.models.SnoozeScope[source]

snooze scope

METRIC = 'Metric'
SERIES = 'Series'
azure.ai.metricsadvisor.models.AnomalySeverity

alias of azure.ai.metricsadvisor._generated.models._azure_cognitive_service_metrics_advisor_restapi_open_ap_iv2_enums.Severity

class azure.ai.metricsadvisor.models.MetricAnomalyAlertSnoozeCondition(auto_snooze: int, snooze_scope: Union[str, SnoozeScope], only_for_successive: bool, **kwargs: Any)[source]

MetricAnomalyAlertSnoozeCondition.

Parameters
  • auto_snooze (int) – Required. snooze point count, value range : [0, +∞).

  • snooze_scope (str or SnoozeScope) – Required. snooze scope. Possible values include: “Metric”, “Series”.

  • only_for_successive (bool) – Required. only snooze for successive anomalies.

class azure.ai.metricsadvisor.models.MetricBoundaryCondition(direction: Union[str, AnomalyDetectorDirection], **kwargs: Any)[source]

MetricBoundaryCondition.

Parameters

direction (str or AnomalyDetectorDirection) – Required. value filter direction. Possible values include: “Both”, “Down”, “Up”.

Keyword Arguments
  • lower (float) – lower bound should be specified when direction is Both or Down.

  • upper (float) – upper bound should be specified when direction is Both or Up.

  • companion_metric_id (str) – the other metric unique id used for value filter.

  • trigger_for_missing (bool) – trigger alert when the corresponding point is missing in the other metric should be specified only when using other metric to filter.

class azure.ai.metricsadvisor.models.AzureApplicationInsightsDataFeed(azure_cloud: str, application_id: str, api_key: str, query: str, **kwargs: Any)[source]

AzureApplicationInsightsDataFeed.

Parameters
  • azure_cloud (str) – Required. Azure cloud environment.

  • application_id (str) – Required. Azure Application Insights ID.

  • api_key (str) – Required. API Key.

  • query (str) – Required. Query.

class azure.ai.metricsadvisor.models.AzureBlobDataFeed(connection_string: str, container: str, blob_template: str, **kwargs: Any)[source]

AzureBlobDataFeed.

Parameters
  • connection_string (str) – Required. Azure Blob connection string.

  • container (str) – Required. Container.

  • blob_template (str) – Required. Blob Template.

class azure.ai.metricsadvisor.models.AzureCosmosDBDataFeed(connection_string: str, sql_query: str, database: str, collection_id: str, **kwargs: Any)[source]

AzureCosmosDBDataFeed.

Parameters
  • connection_string (str) – Required. Azure CosmosDB connection string.

  • sql_query (str) – Required. Query script.

  • database (str) – Required. Database name.

  • collection_id (str) – Required. Collection id.

class azure.ai.metricsadvisor.models.AzureTableDataFeed(connection_string: str, query: str, table: str, **kwargs: Any)[source]

AzureTableDataFeed.

Parameters
  • connection_string (str) – Required. Azure Table connection string.

  • query (str) – Required. Query script.

  • table (str) – Required. Table name.

class azure.ai.metricsadvisor.models.HttpRequestDataFeed(url: str, http_method: str, **kwargs: Any)[source]

HttpRequestDataFeed.

Parameters
  • url (str) – Required. HTTP URL.

  • http_method (str) – Required. HTTP method.

Keyword Arguments
  • http_header (str) – Required. HTTP header.

  • payload (str) – Required. HTTP request body.

class azure.ai.metricsadvisor.models.InfluxDBDataFeed(connection_string: str, database: str, user_name: str, password: str, query: str, **kwargs: Any)[source]

InfluxDBDataFeed.

Parameters
  • connection_string (str) – Required. InfluxDB connection string.

  • database (str) – Required. Database name.

  • user_name (str) – Required. Database access user.

  • password (str) – Required. Database access password.

  • query (str) – Required. Query script.

class azure.ai.metricsadvisor.models.SQLServerDataFeed(connection_string: str, query: str, **kwargs: Any)[source]

SQLServerDataFeed.

Parameters
  • connection_string (str) – Required. Database connection string.

  • query (str) – Required. Query script.

class azure.ai.metricsadvisor.models.MongoDBDataFeed(connection_string: str, database: str, command: str, **kwargs: Any)[source]

MongoDBDataFeed.

Parameters
  • connection_string (str) – Required. MongoDB connection string.

  • database (str) – Required. Database name.

  • command (str) – Required. Query script.

class azure.ai.metricsadvisor.models.MySqlDataFeed(connection_string: str, query: str, **kwargs: Any)[source]

MySqlDataFeed.

Parameters
  • connection_string (str) – Required. Database connection string.

  • query (str) – Required. Query script.

class azure.ai.metricsadvisor.models.PostgreSqlDataFeed(connection_string: str, query: str, **kwargs: Any)[source]

PostgreSqlDataFeed.

Parameters
  • connection_string (str) – Required. Database connection string.

  • query (str) – Required. Query script.

class azure.ai.metricsadvisor.models.AzureDataExplorerDataFeed(connection_string: str, query: str, **kwargs: Any)[source]

AzureDataExplorerDataFeed.

Parameters
  • connection_string (str) – Required. Database connection string.

  • query (str) – Required. Query script.

class azure.ai.metricsadvisor.models.MetricDetectionCondition(**kwargs)[source]

MetricDetectionCondition.

Keyword Arguments
class azure.ai.metricsadvisor.models.MetricSeriesGroupDetectionCondition(series_group_key: Dict[str, str], **kwargs: Any)[source]

MetricSeriesGroupAnomalyDetectionConditions.

Parameters

series_group_key (dict[str, str]) – Required. dimension specified for series group.

Keyword Arguments
class azure.ai.metricsadvisor.models.MetricSingleSeriesDetectionCondition(series_key: Dict[str, str], **kwargs: Any)[source]

MetricSingleSeriesDetectionCondition.

Parameters

series_key (dict[str, str]) – Required. dimension specified for series.

Keyword Arguments
class azure.ai.metricsadvisor.models.SeverityCondition(min_alert_severity: Union[str, AnomalySeverity], max_alert_severity: Union[str, AnomalySeverity], **kwargs: Any)[source]

SeverityCondition.

Parameters
  • min_alert_severity (str or AnomalySeverity) – Required. min alert severity. Possible values include: “Low”, “Medium”, “High”.

  • max_alert_severity (str or AnomalySeverity) – Required. max alert severity. Possible values include: “Low”, “Medium”, “High”.

class azure.ai.metricsadvisor.models.DataSourceType[source]

An enumeration.

AZURE_APPLICATION_INSIGHTS = 'AzureApplicationInsights'
AZURE_BLOB = 'AzureBlob'
AZURE_COSMOS_DB = 'AzureCosmosDB'
AZURE_DATA_EXPLORER = 'AzureDataExplorer'
AZURE_DATA_LAKE_STORAGE_GEN2 = 'AzureDataLakeStorageGen2'
AZURE_TABLE = 'AzureTable'
ELASTICSEARCH = 'Elasticsearch'
HTTP_REQUEST = 'HttpRequest'
INFLUX_DB = 'InfluxDB'
MONGO_DB = 'MongoDB'
MY_SQL = 'MySql'
POSTGRE_SQL = 'PostgreSql'
SQL_SERVER = 'SqlServer'
class azure.ai.metricsadvisor.models.MetricAnomalyAlertScopeType[source]

Anomaly scope

SERIES_GROUP = 'SeriesGroup'
TOP_N = 'TopN'
WHOLE_SERIES = 'WholeSeries'
class azure.ai.metricsadvisor.models.AnomalyDetectorDirection[source]

detection direction

BOTH = 'Both'
DOWN = 'Down'
UP = 'Up'
class azure.ai.metricsadvisor.models.NotificationHook(name, **kwargs)[source]

NotificationHook.

Parameters

name (str) – Hook unique name.

Variables
  • description (str) – Hook description.

  • external_link (str) – Hook external link.

  • admin_emails (list[str]) – Hook administrator emails.

  • hook_type (str) – Constant filled by server. Possible values include: “Webhook”, “Email”.

  • id (str) – Hook unique id.

class azure.ai.metricsadvisor.models.EmailNotificationHook(name: str, emails_to_alert: List[str], **kwargs: Any)[source]

EmailNotificationHook.

Parameters
  • name (str) – Hook unique name.

  • emails_to_alert (list[str]) – Required. Email TO: list.

Keyword Arguments
  • description (str) – Hook description.

  • external_link (str) – Hook external link.

Variables
  • admin_emails (list[str]) – Hook administrator emails.

  • hook_type (str) – Constant filled by server - “Email”.

  • id (str) – Hook unique id.

class azure.ai.metricsadvisor.models.WebNotificationHook(name: str, endpoint: str, **kwargs: Any)[source]

WebNotificationHook.

Parameters
  • name (str) – Hook unique name.

  • endpoint (str) – Required. API address, will be called when alert is triggered, only support POST method via SSL.

Keyword Arguments
  • username (str) – basic authentication.

  • password (str) – basic authentication.

  • certificate_key (str) – client certificate.

  • certificate_password (str) – client certificate password.

  • description (str) – Hook description.

  • external_link (str) – Hook external link.

Variables
  • admin_emails (list[str]) – Hook administrator emails.

  • hook_type (str) – Constant filled by server - “Webhook”.

  • id (str) – Hook unique id.

class azure.ai.metricsadvisor.models.DataFeedIngestionProgress(**kwargs)[source]

DataFeedIngestionProgress.

Variables
  • latest_success_timestamp (datetime) – the timestamp of lastest success ingestion job. null indicates not available.

  • latest_active_timestamp (datetime) – the timestamp of lastest ingestion job with status update. null indicates not available.

class azure.ai.metricsadvisor.models.DetectionConditionsOperator[source]

An enumeration.

AND = 'AND'
OR = 'OR'
class azure.ai.metricsadvisor.models.MetricAnomalyAlertConditions(**kwargs)[source]
Keyword Arguments
class azure.ai.metricsadvisor.models.EnrichmentStatus(**kwargs)[source]

EnrichmentStatus.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • timestamp (datetime) – data slice timestamp.

  • status (str) – latest enrichment status for this data slice.

  • message (str) – the trimmed message describes details of the enrichment status.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

azure.ai.metricsadvisor.models.DataFeedGranularityType

alias of azure.ai.metricsadvisor._generated.models._azure_cognitive_service_metrics_advisor_restapi_open_ap_iv2_enums.Granularity

class azure.ai.metricsadvisor.models.DataPointAnomaly(**kwargs)[source]

DataPointAnomaly.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • metric_id (str) – metric unique id. Only returned for alerting anomaly result.

  • detection_configuration_id (str) – anomaly detection configuration unique id. Only returned for alerting anomaly result.

  • timestamp (datetime) – anomaly time.

  • created_time (datetime) – created time. Only returned for alerting result.

  • modified_time (datetime) – modified time. Only returned for alerting result.

  • dimension (dict[str, str]) – dimension specified for series.

  • severity (str) – anomaly severity. Possible values include: “Low”, “Medium”, “High”.

  • status (str) – anomaly status. only returned for alerting anomaly result. Possible values include: “Active”, “Resolved”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

azure.ai.metricsadvisor.models.AnomalyIncidentStatus

alias of azure.ai.metricsadvisor._generated.models._azure_cognitive_service_metrics_advisor_restapi_open_ap_iv2_enums.IncidentPropertyIncidentStatus

class azure.ai.metricsadvisor.models.MetricSeriesData(**kwargs)[source]

MetricSeriesData.

Variables
  • metric_id (str) – metric unique id.

  • series_key (dict[str, str]) – dimension name and value pair.

  • timestamps (list[datetime]) – timestamps of the data related to this time series.

  • values (list[float]) – values of the data related to this time series.

azure.ai.metricsadvisor.models.MetricSeriesDefinition

alias of azure.ai.metricsadvisor._generated.models._models_py3.MetricSeriesItem

class azure.ai.metricsadvisor.models.AnomalyAlert(**kwargs)[source]
Variables
  • id (str) – alert id.

  • timestamp (datetime) – anomaly time.

  • created_on (datetime) – created time.

  • modified_on (datetime) – modified time.

azure.ai.metricsadvisor.models.DataFeedAccessMode

alias of azure.ai.metricsadvisor._generated.models._azure_cognitive_service_metrics_advisor_restapi_open_ap_iv2_enums.ViewMode

class azure.ai.metricsadvisor.models.DataFeedRollupType[source]

Data feed rollup type

ALREADY_ROLLUP = 'AlreadyRollup'
AUTO_ROLLUP = 'AutoRollup'
NO_ROLLUP = 'NoRollup'
azure.ai.metricsadvisor.models.DataFeedAutoRollupMethod

alias of azure.ai.metricsadvisor._generated.models._azure_cognitive_service_metrics_advisor_restapi_open_ap_iv2_enums.DataFeedDetailRollUpMethod

azure.ai.metricsadvisor.models.DataSourceMissingDataPointFillType

alias of azure.ai.metricsadvisor._generated.models._azure_cognitive_service_metrics_advisor_restapi_open_ap_iv2_enums.FillMissingPointType

azure.ai.metricsadvisor.models.DataFeedIngestionStatus

alias of azure.ai.metricsadvisor._generated.models._models_py3.IngestionStatus

class azure.ai.metricsadvisor.models.SmartDetectionCondition(sensitivity: float, anomaly_detector_direction: Union[str, AnomalyDetectorDirection], suppress_condition: SuppressCondition, **kwargs: Any)[source]

SmartDetectionCondition.

Parameters
  • sensitivity (float) – Required. sensitivity, value range : (0, 100].

  • anomaly_detector_direction (str or AnomalyDetectorDirection) – Required. detection direction. Possible values include: “Both”, “Down”, “Up”.

  • suppress_condition (SuppressCondition) – Required.

class azure.ai.metricsadvisor.models.SuppressCondition(min_number: int, min_ratio: float, **kwargs: Any)[source]

SuppressCondition.

Parameters
  • min_number (int) – Required. min point number, value range : [1, +∞).

  • min_ratio (float) – Required. min point ratio, value range : (0, 100].

class azure.ai.metricsadvisor.models.ChangeThresholdCondition(change_percentage: float, shift_point: int, within_range: bool, anomaly_detector_direction: Union[str, AnomalyDetectorDirection], suppress_condition: SuppressCondition, **kwargs: Any)[source]

ChangeThresholdCondition.

Parameters
  • change_percentage (float) – Required. change percentage, value range : [0, +∞).

  • shift_point (int) – Required. shift point, value range : [1, +∞).

  • within_range (bool) – Required. if the withinRange = true, detected data is abnormal when the value falls in the range, in this case anomalyDetectorDirection must be Both if the withinRange = false, detected data is abnormal when the value falls out of the range.

  • anomaly_detector_direction (str or AnomalyDetectorDirection) – Required. detection direction. Possible values include: “Both”, “Down”, “Up”.

  • suppress_condition (SuppressCondition) – Required.

class azure.ai.metricsadvisor.models.HardThresholdCondition(anomaly_detector_direction: Union[str, AnomalyDetectorDirection], suppress_condition: SuppressCondition, **kwargs: Any)[source]

HardThresholdCondition.

Parameters
Keyword Arguments
  • lower_bound (float) – lower bound should be specified when anomalyDetectorDirection is Both or Down.

  • upper_bound (float) – upper bound should be specified when anomalyDetectorDirection is Both or Up.

class azure.ai.metricsadvisor.models.SeriesIdentity(*, dimension: Dict[str, str], **kwargs)[source]

SeriesIdentity.

All required parameters must be populated in order to send to Azure.

Parameters

dimension (dict[str, str]) – Required. dimension specified for series.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.AzureDataLakeStorageGen2DataFeed(account_name: str, account_key: str, file_system_name: str, directory_template: str, file_template: str, **kwargs: Any)[source]

AzureDataLakeStorageGen2Parameter.

Parameters
  • account_name (str) – Required. Account name.

  • account_key (str) – Required. Account key.

  • file_system_name (str) – Required. File system name (Container).

  • directory_template (str) – Required. Directory template.

  • file_template (str) – Required. File template.

class azure.ai.metricsadvisor.models.ElasticsearchDataFeed(host: str, port: str, auth_header: str, query: str, **kwargs: Any)[source]

ElasticsearchParameter.

Parameters
  • host (str) – Required. Host.

  • port (str) – Required. Port.

  • auth_header (str) – Required. Authorization header.

  • query (str) – Required. Query.

class azure.ai.metricsadvisor.models.AnomalyValue[source]

An enumeration.

ANOMALY = 'Anomaly'
AUTO_DETECT = 'AutoDetect'
NOT_ANOMALY = 'NotAnomaly'
class azure.ai.metricsadvisor.models.ChangePointValue[source]

An enumeration.

AUTO_DETECT = 'AutoDetect'
CHANGE_POINT = 'ChangePoint'
NOT_CHANGE_POINT = 'NotChangePoint'
class azure.ai.metricsadvisor.models.PeriodType[source]

the type of setting period

ASSIGN_VALUE = 'AssignValue'
AUTO_DETECT = 'AutoDetect'
class azure.ai.metricsadvisor.models.FeedbackType[source]

feedback type

ANOMALY = 'Anomaly'
CHANGE_POINT = 'ChangePoint'
COMMENT = 'Comment'
PERIOD = 'Period'
azure.ai.metricsadvisor.models.AlertQueryTimeMode

alias of azure.ai.metricsadvisor._generated.models._azure_cognitive_service_metrics_advisor_restapi_open_ap_iv2_enums.TimeMode

class azure.ai.metricsadvisor.models.IncidentRootCause(**kwargs)[source]

Incident Root Cause.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters

dimension_key (dict[str, str]) – dimension specified for series group.

Variables
  • path (list[str]) – drilling down path from query anomaly to root cause.

  • score (float) – score.

  • description (str) – description.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.SeverityFilterCondition(*, min: Union[str, Severity], max: Union[str, Severity], **kwargs)[source]

SeverityFilterCondition.

All required parameters must be populated in order to send to Azure.

Parameters
  • min (str or Severity) – Required. min severity. Possible values include: “Low”, “Medium”, “High”.

  • max (str or Severity) – Required. max severity. Possible values include: “Low”, “Medium”, “High”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionaly use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.ai.metricsadvisor.models.MetricEnrichedSeriesData(**kwargs)[source]

MetricEnrichedSeriesData.

All required parameters must be populated in order to send to Azure.

Parameters
  • series_key (SeriesIdentity) – Required.

  • timestamps (list[datetime]) – Required. timestamps of the series.

  • values (list[float]) – Required. values of the series.

  • is_anomaly (list[bool]) – Required. whether points of the series are anomalies.

  • periods (list[int]) – Required. period calculated on each point of the series.

  • expected_values (list[float]) – Required. expected values of the series given by smart detector.

  • lower_bounds (list[float]) – Required. lower boundary list of the series given by smart detector.

  • upper_bounds (list[float]) – Required. upper boundary list of the series given by smart detector.