Skip to content

StartSessionsStatisticsAggregation

Source: src/AWS/Deadline/StartSessionsStatisticsAggregation.ts

Runtime binding for deadline:StartSessionsStatisticsAggregation.

Starts an asynchronous usage/cost statistics aggregation over the bound Farm’s queues or fleets. Poll the returned aggregationId with GetSessionsStatisticsAggregation for the results. The farm’s farmId is injected from the binding. Provide the implementation with Effect.provide(AWS.Deadline.StartSessionsStatisticsAggregationHttp).

// init — bind the operation to the farm
const startAggregation =
yield* AWS.Deadline.StartSessionsStatisticsAggregation(farm);
// runtime
const { aggregationId } = yield* startAggregation({
resourceIds: { queueIds: [queueId] },
startTime: new Date(Date.now() - 24 * 3600 * 1000),
endTime: new Date(),
groupBy: ["QUEUE_ID"],
statistics: ["SUM"],
});