Metrics Class

A summary of request statistics grouped by API in hour or minute aggregates.

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

Constructor

Metrics(**kwargs: Any)

Keyword-Only Parameters

Name Description
version
str

The version of Storage Analytics to configure.

enabled

Required. Indicates whether metrics are enabled for the service.

include_apis

Indicates whether metrics should generate summary statistics for called API operations.

retention_policy

The retention policy for the metrics.

Methods

as_dict

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

deserialize

Deserialize this model from a dictionary.

enable_additional_properties_sending

Add additional_properties to the attribute map so they are sent to the service.

from_dict

Parse a dict using a given key extractor and return a model.

is_xml_model

Whether this model is serialized as XML.

serialize

Serialize this model to a dictionary.

as_dict

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

as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, dict[str, typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) -> MutableMapping[str, Any]

Parameters

Name Description
keep_readonly

If you want to serialize the readonly attributes.

Default value: True
key_transformer

A function that takes an attribute name, the attribute map, and the value, and returns the key to use in the output dict.

Returns

Type Description
<xref:JSON>

A dict JSON compatible object.

deserialize

Deserialize this model from a dictionary.

deserialize(data: Any, content_type: str | None = None) -> Self

Parameters

Name Description
data
Required
str

A str using RestAPI structure. JSON by default.

content_type
str

JSON by default, set application/xml if XML.

Default value: None

Returns

Type Description

An instance of this model.

enable_additional_properties_sending

Add additional_properties to the attribute map so they are sent to the service.

enable_additional_properties_sending() -> None

Returns

Type Description

None

from_dict

Parse a dict using a given key extractor and return a model.

from_dict(data: Any, key_extractors: Callable[[str, dict[str, Any], Any], Any] | None = None, content_type: str | None = None) -> Self

Parameters

Name Description
data
Required

A dict using RestAPI structure.

key_extractors

A key extractor function.

Default value: None
content_type
str

JSON by default, set application/xml if XML.

Default value: None

Returns

Type Description

An instance of this model.

is_xml_model

Whether this model is serialized as XML.

is_xml_model() -> bool

Returns

Type Description

True if this model is serialized as XML, otherwise False.

serialize

Serialize this model to a dictionary.

serialize(keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]

Parameters

Name Description
keep_readonly

If you want to serialize the readonly attributes.

Default value: False

Returns

Type Description
<xref:JSON>

A dict JSON compatible object.

Attributes

enabled

Indicates whether metrics are enabled for the service.

enabled: bool = False

include_apis

Indicates whether metrics should generate summary statistics for called API operations.

include_apis: bool | None

retention_policy

The retention policy for the metrics.

retention_policy: RetentionPolicy = <azure.storage.queue._models.RetentionPolicy object>

version

The version of Storage Analytics to configure.

version: str = '1.0'