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 of the root cause.

  • description (str) – Required. description of the root cause.

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.EntityStatus

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.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.AzureApplicationInsightsDataFeedSource(query: str, **kwargs: Any)[source]

AzureApplicationInsightsDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • azure_cloud (str) – Azure cloud environment.

  • application_id (str) – Azure Application Insights ID.

  • api_key (str) – API Key.

Parameters

query (str) – Required. Query.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.AzureBlobDataFeedSource(container: str, blob_template: str, **kwargs: Any)[source]

AzureBlobDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – Azure Blob connection string.

  • msi (bool) – If using managed identity authentication.

Parameters
  • container (str) – Required. Container.

  • blob_template (str) – Required. Blob Template.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.AzureCosmosDbDataFeedSource(sql_query: str, database: str, collection_id: str, **kwargs: Any)[source]

AzureCosmosDbDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – Azure CosmosDB connection string.

Parameters
  • sql_query (str) – Required. Query script.

  • database (str) – Required. Database name.

  • collection_id (str) – Required. Collection id.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.AzureTableDataFeedSource(query: str, table: str, **kwargs: Any)[source]

AzureTableDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – Azure Table connection string.

Parameters
  • query (str) – Required. Query script.

  • table (str) – Required. Table name.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.AzureLogAnalyticsDataFeedSource(workspace_id: str, query: str, **kwargs: Any)[source]

AzureLogAnalyticsDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • tenant_id (str) – The tenant id of service principal that have access to this Log Analytics.

  • client_id (str) – The client id of service principal that have access to this Log Analytics.

  • client_secret (str) – The client secret of service principal that have access to this Log Analytics.

  • datasource_service_principal_id (str) – Datasource service principal unique id.

  • datasource_service_principal_in_kv_id (str) – Datasource service principal in key vault unique id.

Parameters
  • workspace_id (str) – Required. The workspace id of this Log Analytics.

  • query (str) – Required. The KQL (Kusto Query Language) query to fetch data from this Log Analytics.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.InfluxDbDataFeedSource(query: str, **kwargs: Any)[source]

InfluxDbDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – InfluxDB connection string.

  • database (str) – Database name.

  • user_name (str) – Database access user.

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

Parameters

query (str) – Required. Query script.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.SqlServerDataFeedSource(query: str, **kwargs: Any)[source]

SqlServerDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – Database connection string.

  • msi (bool) – If using managed identity authentication.

  • datasource_service_principal_id (str) – Datasource service principal unique id.

  • datasource_service_principal_in_kv_id (str) – Datasource service principal in key vault unique id.

  • datasource_sql_connection_string_id (str) – Datasource sql connection string unique id.

Parameters

query (str) – Required. Query script.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.MongoDbDataFeedSource(command: str, **kwargs: Any)[source]

MongoDbDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – MongoDb connection string.

  • database (str) – Database name.

Parameters

command (str) – Required. Query script.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.MySqlDataFeedSource(query: str, **kwargs: Any)[source]

MySqlDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – Database connection string.

Parameters

query (str) – Required. Query script.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.PostgreSqlDataFeedSource(query: str, **kwargs: Any)[source]

PostgreSqlDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – Database connection string.

Parameters

query (str) – Required. Query script.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.AzureDataExplorerDataFeedSource(query: str, **kwargs: Any)[source]

AzureDataExplorerDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – Database connection string.

  • msi (bool) – If using managed identity authentication.

  • datasource_service_principal_id (str) – Datasource service principal unique id.

  • datasource_service_principal_in_kv_id (str) – Datasource service principal in key vault unique id.

Parameters

query (str) – Required. Query script.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
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]

data source type

AZURE_APPLICATION_INSIGHTS = 'AzureApplicationInsights'
AZURE_BLOB = 'AzureBlob'
AZURE_COSMOS_DB = 'AzureCosmosDB'
AZURE_DATA_EXPLORER = 'AzureDataExplorer'
AZURE_DATA_LAKE_STORAGE_GEN2 = 'AzureDataLakeStorageGen2'
AZURE_EVENT_HUBS = 'AzureEventHubs'
AZURE_LOG_ANALYTICS = 'AzureLogAnalytics'
AZURE_TABLE = 'AzureTable'
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.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
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.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
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.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
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.IncidentStatus

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.RollUpMethod

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.AzureDataLakeStorageGen2DataFeedSource(file_system_name: str, directory_template: str, file_template: str, **kwargs: Any)[source]

AzureDataLakeStorageGen2DataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • account_name (str) – Account name.

  • account_key (str) – Account key.

  • msi (bool) – If using managed identity authentication.

  • datasource_service_principal_id (str) – Datasource service principal unique id.

  • datasource_service_principal_in_kv_id (str) – Datasource service principal in key vault unique id.

  • datasource_datalake_gen2_shared_key_id (str) – Datasource datalake gen2 shared key unique id.

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

  • directory_template (str) – Required. Directory template.

  • file_template (str) – Required. File template.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.AzureEventHubsDataFeedSource(consumer_group: str, **kwargs: Any)[source]

AzureEventHubsDataFeedSource.

Variables
  • data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

Keyword Arguments
  • credential_id (str) – The datasource credential id.

  • connection_string (str) – The connection string of this Azure Event Hubs.

Parameters

consumer_group (str) – Required. The consumer group to be used in this data feed.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
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.

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

DatasourceSqlConnectionString.

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

Variables
  • credential_type – Required. Type of data source credential.Constant filled by server. Possible values include: “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”.

  • id (str) – Unique id of data source credential.

Parameters
  • name (str) – Required. Name of data source credential.

  • connection_string (str) – Required. The connection string to access the Azure SQL.

Keyword Arguments

description (str) – Description of data source credential.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.DatasourceDataLakeGen2SharedKey(name: str, account_key: str, **kwargs: Any)[source]

DatasourceDataLakeGen2SharedKey.

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

Variables
  • credential_type – Required. Type of data source credential.Constant filled by server. Possible values include: “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”.

  • id (str) – Unique id of data source credential.

Parameters
  • name (str) – Required. Name of data source credential.

  • account_key (str) – Required. The account key to access the Azure Data Lake Storage Gen2.

Keyword Arguments

description (str) – Description of data source credential.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.DatasourceServicePrincipal(name: str, client_id: str, client_secret: str, tenant_id: str, **kwargs: Any)[source]

DatasourceServicePrincipal.

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

Variables
  • credential_type – Required. Type of data source credential.Constant filled by server. Possible values include: “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”.

  • id (str) – Unique id of data source credential.

Parameters
  • name (str) – Required. Name of data source credential.

  • client_id (str) – Required. The client id of the service principal.

  • client_secret (str) – Required. The client secret of the service principal.

  • tenant_id (str) – Required. The tenant id of the service principal.

Keyword Arguments

description (str) – Description of data source credential.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.DatasourceServicePrincipalInKeyVault(name: str, **kwargs: Any)[source]

DatasourceServicePrincipalInKeyVault.

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

Variables
  • credential_type – Required. Type of data source credential.Constant filled by server. Possible values include: “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”.

  • id (str) – Unique id of data source credential.

Parameters

name (str) – Required. Name of data source credential.

Keyword Arguments
  • description (str) – Description of data source credential.

  • key_vault_endpoint (str) – Required. The Key Vault endpoint that storing the service principal.

  • key_vault_client_id (str) – Required. The Client Id to access the Key Vault.

  • key_vault_client_secret (str) – Required. The Client Secret to access the Key Vault.

  • service_principal_id_name_in_kv (str) – Required. The secret name of the service principal’s client Id in the Key Vault.

  • service_principal_secret_name_in_kv (str) – Required. The secret name of the service principal’s client secret in the Key Vault.

  • tenant_id (str) – Required. The tenant id of your service principal.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.DataSourceCredentialType[source]

Type of data source credential

AZURE_SQL_CONNECTION_STRING = 'AzureSQLConnectionString'
DATA_LAKE_GEN2_SHARED_KEY = 'DataLakeGen2SharedKey'
SERVICE_PRINCIPAL = 'ServicePrincipal'
SERVICE_PRINCIPAL_IN_KV = 'ServicePrincipalInKV'
azure.ai.metricsadvisor.models.DataSourceAuthenticationType

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

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

DatasourceCredential base class.

Parameters
  • credential_type (str or DataSourceCredentialType) – Required. Type of data source credential.Constant filled by server. Possible values include: “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”.

  • name (str) – Required. Name of data source credential.

Variables

id (str) – Unique id of data source credential.

Keyword Arguments

description (str) – Description of data source credential.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values
class azure.ai.metricsadvisor.models.DataFeedSource(data_source_type: str, **kwargs: Any)[source]

DataFeedSource base class

Parameters

data_source_type (str or DataSourceType) – Required. data source type.Constant filled by server. Possible values include: “AzureApplicationInsights”, “AzureBlob”, “AzureCosmosDB”, “AzureDataExplorer”, “AzureDataLakeStorageGen2”, “AzureEventHubs”, “AzureLogAnalytics”, “AzureTable”, “InfluxDB”, “MongoDB”, “MySql”, “PostgreSql”, “SqlServer”.

Keyword Arguments
  • authentication_type (str or DataSourceAuthenticationType) – authentication type for corresponding data source. Possible values include: “Basic”, “ManagedIdentity”, “AzureSQLConnectionString”, “DataLakeGen2SharedKey”, “ServicePrincipal”, “ServicePrincipalInKV”. Default is “Basic”.

  • credential_id (str) – The datasource credential id.

clear() → None. Remove all items from D.
copy() → a shallow copy of D
fromkeys()

Returns a new dict with keys from iterable and values equal to value.

get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem() → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from dict/iterable E and F.

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() → an object providing a view on D’s values