Skip to content

CreateMetricRequest

Source code in docs_src/capo_appmonetization/types/create_metric_request.py
class CreateMetricRequest(TypedDict, closed=True):
    app_id: "capo_appmonetization.types.app_id.AppId"
    """The ID of the app the metric belongs to."""
    name: "capo_appmonetization.types.metric_display_name.MetricDisplayName"
    """A human-readable display name for the metric (for example, `Riddles Solved`)."""
    description: "capo_appmonetization.types.metric_description.MetricDescription"
    """A description of what the metric measures."""
    event_type: "capo_appmonetization.types.source_event_type.SourceEventType"
    """The event type this metric aggregates. Must match the eventType sent on PutEvent."""
    unit_name: "capo_appmonetization.types.unit_name.UnitName"
    """The unit of measure for the metric (for example, "requests" or "tokens")."""
    definition: "capo_appmonetization.types.metric_definition.MetricDefinition"
    """The aggregation definition: filters, aggregation function, grouping, and period."""
    client_token: NotRequired["capo_appmonetization.types.client_token.ClientToken"]
    """A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error."""
    tags: NotRequired["capo_appmonetization.types.tag_map.TagMap"]
    """Optional tags to add to the metric when it is created. Tagging on create also requires permission for appmonetization:TagResource."""

app_id instance-attribute

app_id: AppId

The ID of the app the metric belongs to.

client_token instance-attribute

client_token: NotRequired[ClientToken]

A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, the service ignores the request but does not return an error.

definition instance-attribute

definition: MetricDefinition

The aggregation definition: filters, aggregation function, grouping, and period.

description instance-attribute

description: MetricDescription

A description of what the metric measures.

event_type instance-attribute

event_type: SourceEventType

The event type this metric aggregates. Must match the eventType sent on PutEvent.

name instance-attribute

A human-readable display name for the metric (for example, Riddles Solved).

tags instance-attribute

tags: NotRequired[TagMap]

Optional tags to add to the metric when it is created. Tagging on create also requires permission for appmonetization:TagResource.

unit_name instance-attribute

unit_name: UnitName

The unit of measure for the metric (for example, "requests" or "tokens").