GitLab

Pulumi Official
Package maintained by Pulumi
v4.7.1 published on Thursday, Jun 30, 2022 by Pulumi

getProject

The gitlab.Project data source allows details of a project to be retrieved by either its ID or its path with namespace.

Upstream API: GitLab REST API docs

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(GitLab.GetProject.InvokeAsync(new GitLab.GetProjectArgs
        {
            Id = "foo/bar/baz",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v4/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gitlab.LookupProject(ctx, &GetProjectArgs{
			Id: pulumi.StringRef("foo/bar/baz"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(GitlabFunctions.getProject(GetProjectArgs.builder()
            .id("foo/bar/baz")
            .build()));

    }
}
import pulumi
import pulumi_gitlab as gitlab

example = gitlab.get_project(id="foo/bar/baz")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const example = pulumi.output(gitlab.getProject({
    id: "foo/bar/baz",
}));
variables:
  example:
    Fn::Invoke:
      Function: gitlab:getProject
      Arguments:
        id: foo/bar/baz

Using getProject

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>
def get_project(id: Optional[str] = None,
                path_with_namespace: Optional[str] = None,
                public_builds: Optional[bool] = None,
                opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(id: Optional[pulumi.Input[str]] = None,
                path_with_namespace: Optional[pulumi.Input[str]] = None,
                public_builds: Optional[pulumi.Input[bool]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]
func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput

> Note: This function is named LookupProject in the Go SDK.

public static class GetProject 
{
    public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: gitlab:index/getProject:getProject
  Arguments:
    # Arguments dictionary

The following arguments are supported:

id String
pathWithNamespace String
publicBuilds Boolean
id string
pathWithNamespace string
publicBuilds boolean
id String
pathWithNamespace String
publicBuilds Boolean

getProject Result

The following output properties are available:

AnalyticsAccessLevel string
Archived bool
AutoCancelPendingPipelines string
AutoDevopsDeployStrategy string
AutoDevopsEnabled bool
AutocloseReferencedIssues bool
BuildGitStrategy string
BuildTimeout int
BuildsAccessLevel string
ContainerExpirationPolicies List<Pulumi.GitLab.Outputs.GetProjectContainerExpirationPolicy>
ContainerRegistryAccessLevel string
DefaultBranch string
Description string
EmailsDisabled bool
ExternalAuthorizationClassificationLabel string
ForkingAccessLevel string
HttpUrlToRepo string
Id string
IssuesAccessLevel string
IssuesEnabled bool
LfsEnabled bool
MergeCommitTemplate string
MergePipelinesEnabled bool
MergeRequestsAccessLevel string
MergeRequestsEnabled bool
MergeTrainsEnabled bool
Name string
NamespaceId int
OperationsAccessLevel string
Path string
PathWithNamespace string
PipelinesEnabled bool
PrintingMergeRequestLinkEnabled bool
PushRules Pulumi.GitLab.Outputs.GetProjectPushRules
RemoveSourceBranchAfterMerge bool
RepositoryAccessLevel string
RepositoryStorage string
RequestAccessEnabled bool
RequirementsAccessLevel string
ResolveOutdatedDiffDiscussions bool
RunnersToken string
SecurityAndComplianceAccessLevel string
SnippetsAccessLevel string
SnippetsEnabled bool
SquashCommitTemplate string
SshUrlToRepo string
Topics List<string>
VisibilityLevel string
WebUrl string
WikiAccessLevel string
WikiEnabled bool
PublicBuilds bool
AnalyticsAccessLevel string
Archived bool
AutoCancelPendingPipelines string
AutoDevopsDeployStrategy string
AutoDevopsEnabled bool
AutocloseReferencedIssues bool
BuildGitStrategy string
BuildTimeout int
BuildsAccessLevel string
ContainerExpirationPolicies []GetProjectContainerExpirationPolicy
ContainerRegistryAccessLevel string
DefaultBranch string
Description string
EmailsDisabled bool
ExternalAuthorizationClassificationLabel string
ForkingAccessLevel string
HttpUrlToRepo string
Id string
IssuesAccessLevel string
IssuesEnabled bool
LfsEnabled bool
MergeCommitTemplate string
MergePipelinesEnabled bool
MergeRequestsAccessLevel string
MergeRequestsEnabled bool
MergeTrainsEnabled bool
Name string
NamespaceId int
OperationsAccessLevel string
Path string
PathWithNamespace string
PipelinesEnabled bool
PrintingMergeRequestLinkEnabled bool
PushRules GetProjectPushRules
RemoveSourceBranchAfterMerge bool
RepositoryAccessLevel string
RepositoryStorage string
RequestAccessEnabled bool
RequirementsAccessLevel string
ResolveOutdatedDiffDiscussions bool
RunnersToken string
SecurityAndComplianceAccessLevel string
SnippetsAccessLevel string
SnippetsEnabled bool
SquashCommitTemplate string
SshUrlToRepo string
Topics []string
VisibilityLevel string
WebUrl string
WikiAccessLevel string
WikiEnabled bool
PublicBuilds bool
analyticsAccessLevel String
archived Boolean
autoCancelPendingPipelines String
autoDevopsDeployStrategy String
autoDevopsEnabled Boolean
autocloseReferencedIssues Boolean
buildGitStrategy String
buildTimeout Integer
buildsAccessLevel String
containerExpirationPolicies List<GetProjectContainerExpirationPolicy>
containerRegistryAccessLevel String
defaultBranch String
description String
emailsDisabled Boolean
externalAuthorizationClassificationLabel String
forkingAccessLevel String
httpUrlToRepo String
id String
issuesAccessLevel String
issuesEnabled Boolean
lfsEnabled Boolean
mergeCommitTemplate String
mergePipelinesEnabled Boolean
mergeRequestsAccessLevel String
mergeRequestsEnabled Boolean
mergeTrainsEnabled Boolean
name String
namespaceId Integer
operationsAccessLevel String
path String
pathWithNamespace String
pipelinesEnabled Boolean
printingMergeRequestLinkEnabled Boolean
pushRules GetProjectPushRules
removeSourceBranchAfterMerge Boolean
repositoryAccessLevel String
repositoryStorage String
requestAccessEnabled Boolean
requirementsAccessLevel String
resolveOutdatedDiffDiscussions Boolean
runnersToken String
securityAndComplianceAccessLevel String
snippetsAccessLevel String
snippetsEnabled Boolean
squashCommitTemplate String
sshUrlToRepo String
topics List<String>
visibilityLevel String
webUrl String
wikiAccessLevel String
wikiEnabled Boolean
publicBuilds Boolean
analyticsAccessLevel string
archived boolean
autoCancelPendingPipelines string
autoDevopsDeployStrategy string
autoDevopsEnabled boolean
autocloseReferencedIssues boolean
buildGitStrategy string
buildTimeout number
buildsAccessLevel string
containerExpirationPolicies GetProjectContainerExpirationPolicy[]
containerRegistryAccessLevel string
defaultBranch string
description string
emailsDisabled boolean
externalAuthorizationClassificationLabel string
forkingAccessLevel string
httpUrlToRepo string
id string
issuesAccessLevel string
issuesEnabled boolean
lfsEnabled boolean
mergeCommitTemplate string
mergePipelinesEnabled boolean
mergeRequestsAccessLevel string
mergeRequestsEnabled boolean
mergeTrainsEnabled boolean
name string
namespaceId number
operationsAccessLevel string
path string
pathWithNamespace string
pipelinesEnabled boolean
printingMergeRequestLinkEnabled boolean
pushRules GetProjectPushRules
removeSourceBranchAfterMerge boolean
repositoryAccessLevel string
repositoryStorage string
requestAccessEnabled boolean
requirementsAccessLevel string
resolveOutdatedDiffDiscussions boolean
runnersToken string
securityAndComplianceAccessLevel string
snippetsAccessLevel string
snippetsEnabled boolean
squashCommitTemplate string
sshUrlToRepo string
topics string[]
visibilityLevel string
webUrl string
wikiAccessLevel string
wikiEnabled boolean
publicBuilds boolean
analytics_access_level str
archived bool
auto_cancel_pending_pipelines str
auto_devops_deploy_strategy str
auto_devops_enabled bool
autoclose_referenced_issues bool
build_git_strategy str
build_timeout int
builds_access_level str
container_expiration_policies Sequence[GetProjectContainerExpirationPolicy]
container_registry_access_level str
default_branch str
description str
emails_disabled bool
external_authorization_classification_label str
forking_access_level str
http_url_to_repo str
id str
issues_access_level str
issues_enabled bool
lfs_enabled bool
merge_commit_template str
merge_pipelines_enabled bool
merge_requests_access_level str
merge_requests_enabled bool
merge_trains_enabled bool
name str
namespace_id int
operations_access_level str
path str
path_with_namespace str
pipelines_enabled bool
printing_merge_request_link_enabled bool
push_rules GetProjectPushRules
remove_source_branch_after_merge bool
repository_access_level str
repository_storage str
request_access_enabled bool
requirements_access_level str
resolve_outdated_diff_discussions bool
runners_token str
security_and_compliance_access_level str
snippets_access_level str
snippets_enabled bool
squash_commit_template str
ssh_url_to_repo str
topics Sequence[str]
visibility_level str
web_url str
wiki_access_level str
wiki_enabled bool
public_builds bool
analyticsAccessLevel String
archived Boolean
autoCancelPendingPipelines String
autoDevopsDeployStrategy String
autoDevopsEnabled Boolean
autocloseReferencedIssues Boolean
buildGitStrategy String
buildTimeout Number
buildsAccessLevel String
containerExpirationPolicies List<Property Map>
containerRegistryAccessLevel String
defaultBranch String
description String
emailsDisabled Boolean
externalAuthorizationClassificationLabel String
forkingAccessLevel String
httpUrlToRepo String
id String
issuesAccessLevel String
issuesEnabled Boolean
lfsEnabled Boolean
mergeCommitTemplate String
mergePipelinesEnabled Boolean
mergeRequestsAccessLevel String
mergeRequestsEnabled Boolean
mergeTrainsEnabled Boolean
name String
namespaceId Number
operationsAccessLevel String
path String
pathWithNamespace String
pipelinesEnabled Boolean
printingMergeRequestLinkEnabled Boolean
pushRules Property Map
removeSourceBranchAfterMerge Boolean
repositoryAccessLevel String
repositoryStorage String
requestAccessEnabled Boolean
requirementsAccessLevel String
resolveOutdatedDiffDiscussions Boolean
runnersToken String
securityAndComplianceAccessLevel String
snippetsAccessLevel String
snippetsEnabled Boolean
squashCommitTemplate String
sshUrlToRepo String
topics List<String>
visibilityLevel String
webUrl String
wikiAccessLevel String
wikiEnabled Boolean
publicBuilds Boolean

Supporting Types

GetProjectContainerExpirationPolicy

Cadence string
Enabled bool
KeepN int
NameRegexDelete string
NameRegexKeep string
NextRunAt string
OlderThan string
Cadence string
Enabled bool
KeepN int
NameRegexDelete string
NameRegexKeep string
NextRunAt string
OlderThan string
cadence String
enabled Boolean
keepN Integer
nameRegexDelete String
nameRegexKeep String
nextRunAt String
olderThan String
cadence string
enabled boolean
keepN number
nameRegexDelete string
nameRegexKeep string
nextRunAt string
olderThan string
cadence String
enabled Boolean
keepN Number
nameRegexDelete String
nameRegexKeep String
nextRunAt String
olderThan String

GetProjectPushRules

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes

This Pulumi package is based on the gitlab Terraform Provider.