Skip to main content

ci_dedicated_hosted_runner_usage

Gets or lists a ci_dedicated_hosted_runner_usage resource.

Overview​

Nameci_dedicated_hosted_runner_usage
TypeResource
Idgitlab.ci.ci_dedicated_hosted_runner_usage

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
billing_monthstringMonth of the usage data.
billing_month_iso8601stringTimestamp of the billing month in ISO 8601 format.
compute_minutesintegerTotal compute minutes used across all namespaces. Values are rounded down to the nearest integer.
compute_minutes_usagenumberTotal compute minutes used across all namespaces.
duration_minutesnumberTotal duration in minutes of runner usage.
duration_secondsintegerTotal duration in seconds of runner usage. Values are rounded down to the nearest integer.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselecthostbilling_month, grouping, runner_id, yearCompute usage data for runners across namespaces on GitLab Dedicated. Defaults to the current year if no year or billing month is specified. Ultimate only. Generated from the GitLab GraphQL schema field Query.ciDedicatedHostedRunnerUsage (connection of CiDedicatedHostedRunnerUsage 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)
billing_monthstringFirst day of the month to retrieve data for.
groupingstringGroups usage data by instance aggregate or root namespace.
runner_idstringRunner ID to retrieve data for.
yearintegerYear to retrieve data for.

SELECT examples​

Compute usage data for runners across namespaces on GitLab Dedicated. Defaults to the current year if no year or billing month is specified. Ultimate only. Generated from the GitLab GraphQL schema field Query.ciDedicatedHostedRunnerUsage (connection of CiDedicatedHostedRunnerUsage nodes).

SELECT
billing_month,
billing_month_iso8601,
compute_minutes,
compute_minutes_usage,
duration_minutes,
duration_seconds
FROM gitlab.ci.ci_dedicated_hosted_runner_usage
WHERE host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND billing_month = '{{ billing_month }}'
AND grouping = '{{ grouping }}'
AND runner_id = '{{ runner_id }}'
AND year = '{{ year }}'
;