campaign_date_range_kpis
Creates, updates, deletes, gets or lists a campaign_date_range_kpis resource.
Overview
| Name | campaign_date_range_kpis |
| Type | Resource |
| Id | aws.pinpoint.campaign_date_range_kpis |
Fields
The following fields are returned by SELECT queries:
- get_campaign_date_range_kpi
| Name | Datatype | Description |
|---|---|---|
application_id | string | The unique identifier for the application that the metric applies to. |
campaign_id | string | The unique identifier for the campaign that the metric applies to. |
end_time | string (date-time) | The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive. |
kpi_name | string | The name of the metric, also referred to as a key performance indicator (KPI), that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the Amazon Pinpoint Developer Guide. |
kpi_result | object | An array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value. |
next_token | string | The string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Campaign Metrics resource because the resource returns all results in a single page. |
start_time | string (date-time) | The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_campaign_date_range_kpi | select | application-id, campaign-id, kpi-name, region | end-time, next-token, page-size, start-time | Retrieves (queries) pre-aggregated data for a standard metric that applies to a campaign. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
application-id | string | The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console. |
campaign-id | string | The unique identifier for the campaign. |
kpi-name | string | The name of the metric, also referred to as a key performance indicator (KPI), to retrieve data for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. Examples are email-open-rate and successful-delivery-rate. For a list of valid values, see the Amazon Pinpoint Developer Guide. |
region | string | AWS region (default: us-east-1) |
end-time | string (date-time) | The last date and time to retrieve data for, as part of an inclusive date range that filters the query results. This value should be in extended ISO 8601 format and use Coordinated Universal Time (UTC), for example: 2019-07-26T20:00:00Z for 8:00 PM UTC July 26, 2019. |
next-token | string | The string that specifies which page of results to return in a paginated response. This parameter is not supported for application, campaign, and journey metrics. |
page-size | string | The maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics. |
start-time | string (date-time) | The first date and time to retrieve data for, as part of an inclusive date range that filters the query results. This value should be in extended ISO 8601 format and use Coordinated Universal Time (UTC), for example: 2019-07-19T20:00:00Z for 8:00 PM UTC July 19, 2019. This value should also be fewer than 90 days from the current day. |
SELECT examples
- get_campaign_date_range_kpi
Retrieves (queries) pre-aggregated data for a standard metric that applies to a campaign.
SELECT
application_id,
campaign_id,
end_time,
kpi_name,
kpi_result,
next_token,
start_time
FROM aws.pinpoint.campaign_date_range_kpis
WHERE `application-id` = '{{ application-id }}' -- required
AND `campaign-id` = '{{ campaign-id }}' -- required
AND `kpi-name` = '{{ kpi-name }}' -- required
AND region = '{{ region }}' -- required
AND `end-time` = '{{ end-time }}'
AND `next-token` = '{{ next-token }}'
AND `page-size` = '{{ page-size }}'
AND `start-time` = '{{ start-time }}'
;