1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getProjectProtectedBranches
GitLab v8.4.1 published on Tuesday, Sep 24, 2024 by Pulumi

gitlab.getProjectProtectedBranches

Explore with Pulumi AI

gitlab logo
GitLab v8.4.1 published on Tuesday, Sep 24, 2024 by Pulumi

    The gitlab.getProjectProtectedBranches data source allows details of the protected branches of a given project.

    Upstream API: GitLab REST API docs

    Using getProjectProtectedBranches

    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 getProjectProtectedBranches(args: GetProjectProtectedBranchesArgs, opts?: InvokeOptions): Promise<GetProjectProtectedBranchesResult>
    function getProjectProtectedBranchesOutput(args: GetProjectProtectedBranchesOutputArgs, opts?: InvokeOptions): Output<GetProjectProtectedBranchesResult>
    def get_project_protected_branches(project_id: Optional[str] = None,
                                       protected_branches: Optional[Sequence[GetProjectProtectedBranchesProtectedBranch]] = None,
                                       opts: Optional[InvokeOptions] = None) -> GetProjectProtectedBranchesResult
    def get_project_protected_branches_output(project_id: Optional[pulumi.Input[str]] = None,
                                       protected_branches: Optional[pulumi.Input[Sequence[pulumi.Input[GetProjectProtectedBranchesProtectedBranchArgs]]]] = None,
                                       opts: Optional[InvokeOptions] = None) -> Output[GetProjectProtectedBranchesResult]
    func GetProjectProtectedBranches(ctx *Context, args *GetProjectProtectedBranchesArgs, opts ...InvokeOption) (*GetProjectProtectedBranchesResult, error)
    func GetProjectProtectedBranchesOutput(ctx *Context, args *GetProjectProtectedBranchesOutputArgs, opts ...InvokeOption) GetProjectProtectedBranchesResultOutput

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

    public static class GetProjectProtectedBranches 
    {
        public static Task<GetProjectProtectedBranchesResult> InvokeAsync(GetProjectProtectedBranchesArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectProtectedBranchesResult> Invoke(GetProjectProtectedBranchesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectProtectedBranchesResult> getProjectProtectedBranches(GetProjectProtectedBranchesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gitlab:index/getProjectProtectedBranches:getProjectProtectedBranches
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProjectId string
    The integer or path with namespace that uniquely identifies the project.
    ProtectedBranches List<Pulumi.GitLab.Inputs.GetProjectProtectedBranchesProtectedBranch>
    A list of protected branches, as defined below.
    ProjectId string
    The integer or path with namespace that uniquely identifies the project.
    ProtectedBranches []GetProjectProtectedBranchesProtectedBranch
    A list of protected branches, as defined below.
    projectId String
    The integer or path with namespace that uniquely identifies the project.
    protectedBranches List<GetProjectProtectedBranchesProtectedBranch>
    A list of protected branches, as defined below.
    projectId string
    The integer or path with namespace that uniquely identifies the project.
    protectedBranches GetProjectProtectedBranchesProtectedBranch[]
    A list of protected branches, as defined below.
    project_id str
    The integer or path with namespace that uniquely identifies the project.
    protected_branches Sequence[GetProjectProtectedBranchesProtectedBranch]
    A list of protected branches, as defined below.
    projectId String
    The integer or path with namespace that uniquely identifies the project.
    protectedBranches List<Property Map>
    A list of protected branches, as defined below.

    getProjectProtectedBranches Result

    The following output properties are available:

    Id int
    The ID of this resource.
    ProjectId string
    The integer or path with namespace that uniquely identifies the project.
    ProtectedBranches List<Pulumi.GitLab.Outputs.GetProjectProtectedBranchesProtectedBranch>
    A list of protected branches, as defined below.
    Id int
    The ID of this resource.
    ProjectId string
    The integer or path with namespace that uniquely identifies the project.
    ProtectedBranches []GetProjectProtectedBranchesProtectedBranch
    A list of protected branches, as defined below.
    id Integer
    The ID of this resource.
    projectId String
    The integer or path with namespace that uniquely identifies the project.
    protectedBranches List<GetProjectProtectedBranchesProtectedBranch>
    A list of protected branches, as defined below.
    id number
    The ID of this resource.
    projectId string
    The integer or path with namespace that uniquely identifies the project.
    protectedBranches GetProjectProtectedBranchesProtectedBranch[]
    A list of protected branches, as defined below.
    id int
    The ID of this resource.
    project_id str
    The integer or path with namespace that uniquely identifies the project.
    protected_branches Sequence[GetProjectProtectedBranchesProtectedBranch]
    A list of protected branches, as defined below.
    id Number
    The ID of this resource.
    projectId String
    The integer or path with namespace that uniquely identifies the project.
    protectedBranches List<Property Map>
    A list of protected branches, as defined below.

    Supporting Types

    GetProjectProtectedBranchesProtectedBranch

    AllowForcePush bool
    Whether force push is allowed.
    CodeOwnerApprovalRequired bool
    Reject code pushes that change files listed in the CODEOWNERS file.
    Id int
    The ID of this resource.
    Name string
    The name of the protected branch.
    MergeAccessLevels List<Pulumi.GitLab.Inputs.GetProjectProtectedBranchesProtectedBranchMergeAccessLevel>
    Array of access levels and user(s)/group(s) allowed to merge to protected branch.
    PushAccessLevels List<Pulumi.GitLab.Inputs.GetProjectProtectedBranchesProtectedBranchPushAccessLevel>
    Array of access levels and user(s)/group(s) allowed to push to protected branch.
    AllowForcePush bool
    Whether force push is allowed.
    CodeOwnerApprovalRequired bool
    Reject code pushes that change files listed in the CODEOWNERS file.
    Id int
    The ID of this resource.
    Name string
    The name of the protected branch.
    MergeAccessLevels []GetProjectProtectedBranchesProtectedBranchMergeAccessLevel
    Array of access levels and user(s)/group(s) allowed to merge to protected branch.
    PushAccessLevels []GetProjectProtectedBranchesProtectedBranchPushAccessLevel
    Array of access levels and user(s)/group(s) allowed to push to protected branch.
    allowForcePush Boolean
    Whether force push is allowed.
    codeOwnerApprovalRequired Boolean
    Reject code pushes that change files listed in the CODEOWNERS file.
    id Integer
    The ID of this resource.
    name String
    The name of the protected branch.
    mergeAccessLevels List<GetProjectProtectedBranchesProtectedBranchMergeAccessLevel>
    Array of access levels and user(s)/group(s) allowed to merge to protected branch.
    pushAccessLevels List<GetProjectProtectedBranchesProtectedBranchPushAccessLevel>
    Array of access levels and user(s)/group(s) allowed to push to protected branch.
    allowForcePush boolean
    Whether force push is allowed.
    codeOwnerApprovalRequired boolean
    Reject code pushes that change files listed in the CODEOWNERS file.
    id number
    The ID of this resource.
    name string
    The name of the protected branch.
    mergeAccessLevels GetProjectProtectedBranchesProtectedBranchMergeAccessLevel[]
    Array of access levels and user(s)/group(s) allowed to merge to protected branch.
    pushAccessLevels GetProjectProtectedBranchesProtectedBranchPushAccessLevel[]
    Array of access levels and user(s)/group(s) allowed to push to protected branch.
    allow_force_push bool
    Whether force push is allowed.
    code_owner_approval_required bool
    Reject code pushes that change files listed in the CODEOWNERS file.
    id int
    The ID of this resource.
    name str
    The name of the protected branch.
    merge_access_levels Sequence[GetProjectProtectedBranchesProtectedBranchMergeAccessLevel]
    Array of access levels and user(s)/group(s) allowed to merge to protected branch.
    push_access_levels Sequence[GetProjectProtectedBranchesProtectedBranchPushAccessLevel]
    Array of access levels and user(s)/group(s) allowed to push to protected branch.
    allowForcePush Boolean
    Whether force push is allowed.
    codeOwnerApprovalRequired Boolean
    Reject code pushes that change files listed in the CODEOWNERS file.
    id Number
    The ID of this resource.
    name String
    The name of the protected branch.
    mergeAccessLevels List<Property Map>
    Array of access levels and user(s)/group(s) allowed to merge to protected branch.
    pushAccessLevels List<Property Map>
    Array of access levels and user(s)/group(s) allowed to push to protected branch.

    GetProjectProtectedBranchesProtectedBranchMergeAccessLevel

    AccessLevel string
    Access levels allowed to merge to protected branch. Valid values are: no one, developer, maintainer.
    AccessLevelDescription string
    Readable description of access level.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    AccessLevel string
    Access levels allowed to merge to protected branch. Valid values are: no one, developer, maintainer.
    AccessLevelDescription string
    Readable description of access level.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    accessLevel String
    Access levels allowed to merge to protected branch. Valid values are: no one, developer, maintainer.
    accessLevelDescription String
    Readable description of access level.
    groupId Integer
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    userId Integer
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    accessLevel string
    Access levels allowed to merge to protected branch. Valid values are: no one, developer, maintainer.
    accessLevelDescription string
    Readable description of access level.
    groupId number
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    userId number
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    access_level str
    Access levels allowed to merge to protected branch. Valid values are: no one, developer, maintainer.
    access_level_description str
    Readable description of access level.
    group_id int
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    user_id int
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    accessLevel String
    Access levels allowed to merge to protected branch. Valid values are: no one, developer, maintainer.
    accessLevelDescription String
    Readable description of access level.
    groupId Number
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    userId Number
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.

    GetProjectProtectedBranchesProtectedBranchPushAccessLevel

    AccessLevel string
    Access levels allowed to push to protected branch. Valid values are: no one, developer, maintainer.
    AccessLevelDescription string
    Readable description of access level.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    AccessLevel string
    Access levels allowed to push to protected branch. Valid values are: no one, developer, maintainer.
    AccessLevelDescription string
    Readable description of access level.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    accessLevel String
    Access levels allowed to push to protected branch. Valid values are: no one, developer, maintainer.
    accessLevelDescription String
    Readable description of access level.
    groupId Integer
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    userId Integer
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    accessLevel string
    Access levels allowed to push to protected branch. Valid values are: no one, developer, maintainer.
    accessLevelDescription string
    Readable description of access level.
    groupId number
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    userId number
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    access_level str
    Access levels allowed to push to protected branch. Valid values are: no one, developer, maintainer.
    access_level_description str
    Readable description of access level.
    group_id int
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    user_id int
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.
    accessLevel String
    Access levels allowed to push to protected branch. Valid values are: no one, developer, maintainer.
    accessLevelDescription String
    Readable description of access level.
    groupId Number
    The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id.
    userId Number
    The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id.

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v8.4.1 published on Tuesday, Sep 24, 2024 by Pulumi