ci_dedicated_hosted_runner_usage
Gets or lists a ci_dedicated_hosted_runner_usage resource.
Overview​
| Name | ci_dedicated_hosted_runner_usage |
| Type | Resource |
| Id | gitlab.ci.ci_dedicated_hosted_runner_usage |
Fields​
The following fields are returned by SELECT queries:
- list
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
billing_month | string | Month of the usage data. |
billing_month_iso8601 | string | Timestamp of the billing month in ISO 8601 format. |
compute_minutes | integer | Total compute minutes used across all namespaces. Values are rounded down to the nearest integer. |
compute_minutes_usage | number | Total compute minutes used across all namespaces. |
duration_minutes | number | Total duration in minutes of runner usage. |
duration_seconds | integer | Total duration in seconds of runner usage. Values are rounded down to the nearest integer. |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | host | billing_month, grouping, runner_id, year | 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). |
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) |
billing_month | string | First day of the month to retrieve data for. |
grouping | string | Groups usage data by instance aggregate or root namespace. |
runner_id | string | Runner ID to retrieve data for. |
year | integer | Year to retrieve data for. |
SELECT examples​
- list
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 }}'
;