Metric
A usage metric definition for an app. Metrics aggregate raw usage events (by event type) into a metered quantity used for quota enforcement and usage-based billing.
Contents
- appId
-
The ID of the app the metric belongs to.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[A-Za-z0-9_-]+Required: Yes
- definition
-
The aggregation definition: filters, aggregation function, grouping, and period.
Type: MetricDefinition object
Required: Yes
- description
-
A description of what the metric measures.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 512.
Required: Yes
- eventType
-
The event type this metric aggregates.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[a-z][a-z0-9_.]{0,63}Required: Yes
- metricId
-
The ID of the metric. We assign this value when you create the metric; it is unique within the app. Treat it as opaque.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[A-Za-z0-9_-]+Required: Yes
- name
-
A human-readable display name for the metric.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
\s*\S[\s\S]*Required: Yes
- unitName
-
The unit of measure for the metric.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 64.
Pattern:
[a-z][a-z0-9_]*Required: Yes
- arn
-
The Amazon Resource Name (ARN) of the metric. Output only.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern:
arn:(aws|aws-cn|aws-us-gov):.+:.+:.+:.+Required: No
- stage
-
The offering stage this metric was read from: DRAFT or PUBLISHED. Present on metric reads; absent on write responses.
Type: String
Valid Values:
DRAFT | PUBLISHEDRequired: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: