ci_minutes_project_monthly_usage
Gets or lists a ci_minutes_project_monthly_usage resource.
Overview​
| Name | ci_minutes_project_monthly_usage |
| Type | Resource |
| Id | gitlab.ci.ci_minutes_project_monthly_usage |
Fields​
The following fields are returned by SELECT queries:
- list
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
minutes | integer | Number of compute minutes used by the project in the month. |
project | object | Project identity (id, full_path, name) |
shared_runners_duration | integer | Total duration (in seconds) of shared runners use by the project for the month. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | host | date, namespace_id | Compute usage data for projects in a namespace for a given month. Returns project usage independent of whether a namespace-level usage record exists. Generated from the GitLab GraphQL schema field Query.ciMinutesProjectMonthlyUsage (connection of CiMinutesProjectMonthlyUsage nodes). |
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 |
|---|---|---|
host | string | GitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST) |
date | string | Date for which to retrieve the usage data, should be the first day of a month. Defaults to the current month. |
namespace_id | string | Global ID of the Namespace for the project compute usage. |
SELECT examples​
- list
Compute usage data for projects in a namespace for a given month. Returns project usage independent of whether a namespace-level usage record exists. Generated from the GitLab GraphQL schema field Query.ciMinutesProjectMonthlyUsage (connection of CiMinutesProjectMonthlyUsage nodes).
SELECT
minutes,
project,
shared_runners_duration
FROM gitlab.ci.ci_minutes_project_monthly_usage
WHERE host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND date = '{{ date }}'
AND namespace_id = '{{ namespace_id }}'
;