# Resource Groups

## Reference

- v4 API:

  - `gitlab.v4.objects.ProjectResourceGroup`

  - `gitlab.v4.objects.ProjectResourceGroupManager`

  - `gitlab.v4.objects.Project.resource_groups`

  - `gitlab.v4.objects.ProjectResourceGroupUpcomingJob`

  - `gitlab.v4.objects.ProjectResourceGroupUpcomingJobManager`

  - `gitlab.v4.objects.ProjectResourceGroup.upcoming_jobs`

- Gitlab API: https://docs.gitlab.com/ee/api/resource_groups.html

## Examples

List resource groups for a project:

    project = gl.projects.get(project_id, lazy=True)
    resource_group = project.resource_groups.list()

Get a single resource group:

    resource_group = project.resource_groups.get("production")

Edit a resource group:

    resource_group.process_mode = "oldest_first"
    resource_group.save()

List upcoming jobs for a resource group:

    upcoming_jobs = resource_group.upcoming_jobs.list()