get Projects
The gitlab.getProjects
data source allows details of multiple projects to be retrieved. Optionally filtered by the set attributes.
This data source supports all available filters exposed by the xanzy/go-gitlab package, which might not expose all available filters exposed by the Gitlab APIs. The owner sub-attributes are only populated if the Gitlab token used has an administrator scope. Upstream API: GitLab REST API docs
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetGroupArgs;
import com.pulumi.gitlab.inputs.GetProjectsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var mygroup = GitlabFunctions.getGroup(GetGroupArgs.builder()
.fullPath("mygroup")
.build());
final var groupProjects = GitlabFunctions.getProjects(GetProjectsArgs.builder()
.groupId(mygroup.applyValue(getGroupResult -> getGroupResult.id()))
.orderBy("name")
.includeSubgroups(true)
.withShared(false)
.build());
final var projects = GitlabFunctions.getProjects(GetProjectsArgs.builder()
.search("postgresql")
.visibility("private")
.build());
}
}
Return
A collection of values returned by getProjects.
Parameters
A collection of arguments for invoking getProjects.
Return
A collection of values returned by getProjects.
Parameters
Limit by archived status.
The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level
, with_programming_language
or statistics
.
Include projects in subgroups of this group. Default is false
. Needs group_id
.
The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.
Limit by projects that the current user is a member of.
Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id
.
Return projects ordered ordered by: id
, name
, path
, created_at
, updated_at
, last_activity_at
, similarity
, repository_size
, storage_size
, packages_size
, wiki_size
. Some values or only available in certain circumstances. See upstream docs for details.
Limit by projects owned by the current user.
The first page to begin the query on.
The number of results to return per page.
Return list of authorized projects matching the search criteria.
Return only the ID, URL, name, and path of each project.
Return projects sorted in asc
or desc
order. Default is desc
.
Limit by projects starred by the current user.
Include project statistics. Cannot be used with group_id
.
Limit by visibility public
, internal
, or private
.
Include custom attributes in response (admins only).
Limit by projects with issues feature enabled. Default is false
.
Limit by projects with merge requests feature enabled. Default is false
.
Limit by projects which use the given programming language. Cannot be used with group_id
.
Include projects shared to this group. Default is true
. Needs group_id
.
See also
Return
A collection of values returned by getProjects.
Parameters
Builder for com.pulumi.gitlab.kotlin.inputs.GetProjectsPlainArgs.