Skip to main content

ci_minutes_project_monthly_usage

Gets or lists a ci_minutes_project_monthly_usage resource.

Overview​

Nameci_minutes_project_monthly_usage
TypeResource
Idgitlab.ci.ci_minutes_project_monthly_usage

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
minutesintegerNumber of compute minutes used by the project in the month.
projectobjectProject identity (id, full_path, name)
shared_runners_durationintegerTotal duration (in seconds) of shared runners use by the project for the month.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselecthostdate, namespace_idCompute 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.

NameDatatypeDescription
hoststringGitLab 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)
datestringDate for which to retrieve the usage data, should be the first day of a month. Defaults to the current month.
namespace_idstringGlobal ID of the Namespace for the project compute usage.

SELECT examples​

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 }}'
;