View a markdown version of this page

MetricDefinition - AWS App Monetization

MetricDefinition

The definition of how raw events are aggregated into a metric: which events to include (filters), how to combine them (function and functionField), how to group them, and over what period.

Contents

filters

The predicates selecting which events contribute to the metric. Combined with logical AND.

Type: Array of MetricFilter objects

Array Members: Minimum number of 0 items. Maximum number of 10 items.

Required: Yes

function

The aggregation function applied to matching events (SUM, COUNT, or MAX).

Type: String

Valid Values: SUM | COUNT | MAX

Required: Yes

groupBy

The event fields to group aggregated results by.

Type: Array of strings

Array Members: Minimum number of 0 items. Maximum number of 5 items.

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-z][a-z0-9_]*

Required: Yes

period

The reset or rollup period for the aggregation.

Type: String

Valid Values: MONTHLY

Required: Yes

functionField

The event property key the aggregation function operates on. Required for SUM and MAX; ignored for COUNT.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [a-z][a-z0-9_]*

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: