1. Packages
  2. Packages
  3. Gitlab Provider
  4. API Docs
  5. getGroupProtectedBranches
Viewing docs for GitLab v10.0.0
published on Friday, Jun 26, 2026 by Pulumi
gitlab logo
Viewing docs for GitLab v10.0.0
published on Friday, Jun 26, 2026 by Pulumi

    The gitlab.getGroupProtectedBranches data source allows details of the group-level protected branches of a given group.

    This data source requires a GitLab Premium or Ultimate instance.

    Upstream API: GitLab REST API docs

    Using getGroupProtectedBranches

    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 getGroupProtectedBranches(args: GetGroupProtectedBranchesArgs, opts?: InvokeOptions): Promise<GetGroupProtectedBranchesResult>
    function getGroupProtectedBranchesOutput(args: GetGroupProtectedBranchesOutputArgs, opts?: InvokeOptions): Output<GetGroupProtectedBranchesResult>
    def get_group_protected_branches(group: Optional[str] = None,
                                     opts: Optional[InvokeOptions] = None) -> GetGroupProtectedBranchesResult
    def get_group_protected_branches_output(group: pulumi.Input[Optional[str]] = None,
                                     opts: Optional[InvokeOptions] = None) -> Output[GetGroupProtectedBranchesResult]
    func GetGroupProtectedBranches(ctx *Context, args *GetGroupProtectedBranchesArgs, opts ...InvokeOption) (*GetGroupProtectedBranchesResult, error)
    func GetGroupProtectedBranchesOutput(ctx *Context, args *GetGroupProtectedBranchesOutputArgs, opts ...InvokeOption) GetGroupProtectedBranchesResultOutput

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

    public static class GetGroupProtectedBranches 
    {
        public static Task<GetGroupProtectedBranchesResult> InvokeAsync(GetGroupProtectedBranchesArgs args, InvokeOptions? opts = null)
        public static Output<GetGroupProtectedBranchesResult> Invoke(GetGroupProtectedBranchesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetGroupProtectedBranchesResult> getGroupProtectedBranches(GetGroupProtectedBranchesArgs args, InvokeOptions options)
    public static Output<GetGroupProtectedBranchesResult> getGroupProtectedBranches(GetGroupProtectedBranchesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gitlab:index/getGroupProtectedBranches:getGroupProtectedBranches
      arguments:
        # arguments dictionary
    data "gitlab_getgroupprotectedbranches" "name" {
        # arguments
    }

    The following arguments are supported:

    Group string
    The integer or URL-encoded path of the group.
    Group string
    The integer or URL-encoded path of the group.
    group string
    The integer or URL-encoded path of the group.
    group String
    The integer or URL-encoded path of the group.
    group string
    The integer or URL-encoded path of the group.
    group str
    The integer or URL-encoded path of the group.
    group String
    The integer or URL-encoded path of the group.

    getGroupProtectedBranches Result

    The following output properties are available:

    Group string
    The integer or URL-encoded path of the group.
    Id string
    The ID of this Terraform resource. Equal to the group argument.
    ProtectedBranches List<Pulumi.GitLab.Outputs.GetGroupProtectedBranchesProtectedBranch>
    A list of group-level protected branches, as defined below.
    Group string
    The integer or URL-encoded path of the group.
    Id string
    The ID of this Terraform resource. Equal to the group argument.
    ProtectedBranches []GetGroupProtectedBranchesProtectedBranch
    A list of group-level protected branches, as defined below.
    group string
    The integer or URL-encoded path of the group.
    id string
    The ID of this Terraform resource. Equal to the group argument.
    protected_branches list(object)
    A list of group-level protected branches, as defined below.
    group String
    The integer or URL-encoded path of the group.
    id String
    The ID of this Terraform resource. Equal to the group argument.
    protectedBranches List<GetGroupProtectedBranchesProtectedBranch>
    A list of group-level protected branches, as defined below.
    group string
    The integer or URL-encoded path of the group.
    id string
    The ID of this Terraform resource. Equal to the group argument.
    protectedBranches GetGroupProtectedBranchesProtectedBranch[]
    A list of group-level protected branches, as defined below.
    group str
    The integer or URL-encoded path of the group.
    id str
    The ID of this Terraform resource. Equal to the group argument.
    protected_branches Sequence[GetGroupProtectedBranchesProtectedBranch]
    A list of group-level protected branches, as defined below.
    group String
    The integer or URL-encoded path of the group.
    id String
    The ID of this Terraform resource. Equal to the group argument.
    protectedBranches List<Property Map>
    A list of group-level protected branches, as defined below.

    Supporting Types

    GetGroupProtectedBranchesProtectedBranch

    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.
    MergeAccessLevels List<Pulumi.GitLab.Inputs.GetGroupProtectedBranchesProtectedBranchMergeAccessLevel>
    Array of merge access levels/users/groups allowed for the protected branch.
    Name string
    The name of the protected branch.
    PushAccessLevels List<Pulumi.GitLab.Inputs.GetGroupProtectedBranchesProtectedBranchPushAccessLevel>
    Array of push access levels/users/groups/deploy keys allowed for the protected branch.
    UnprotectAccessLevels List<Pulumi.GitLab.Inputs.GetGroupProtectedBranchesProtectedBranchUnprotectAccessLevel>
    Array of unprotect access levels/users/groups allowed for the 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.
    MergeAccessLevels []GetGroupProtectedBranchesProtectedBranchMergeAccessLevel
    Array of merge access levels/users/groups allowed for the protected branch.
    Name string
    The name of the protected branch.
    PushAccessLevels []GetGroupProtectedBranchesProtectedBranchPushAccessLevel
    Array of push access levels/users/groups/deploy keys allowed for the protected branch.
    UnprotectAccessLevels []GetGroupProtectedBranchesProtectedBranchUnprotectAccessLevel
    Array of unprotect access levels/users/groups allowed for the 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 number
    The ID of this resource.
    merge_access_levels list(object)
    Array of merge access levels/users/groups allowed for the protected branch.
    name string
    The name of the protected branch.
    push_access_levels list(object)
    Array of push access levels/users/groups/deploy keys allowed for the protected branch.
    unprotect_access_levels list(object)
    Array of unprotect access levels/users/groups allowed for the 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.
    mergeAccessLevels List<GetGroupProtectedBranchesProtectedBranchMergeAccessLevel>
    Array of merge access levels/users/groups allowed for the protected branch.
    name String
    The name of the protected branch.
    pushAccessLevels List<GetGroupProtectedBranchesProtectedBranchPushAccessLevel>
    Array of push access levels/users/groups/deploy keys allowed for the protected branch.
    unprotectAccessLevels List<GetGroupProtectedBranchesProtectedBranchUnprotectAccessLevel>
    Array of unprotect access levels/users/groups allowed for the 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.
    mergeAccessLevels GetGroupProtectedBranchesProtectedBranchMergeAccessLevel[]
    Array of merge access levels/users/groups allowed for the protected branch.
    name string
    The name of the protected branch.
    pushAccessLevels GetGroupProtectedBranchesProtectedBranchPushAccessLevel[]
    Array of push access levels/users/groups/deploy keys allowed for the protected branch.
    unprotectAccessLevels GetGroupProtectedBranchesProtectedBranchUnprotectAccessLevel[]
    Array of unprotect access levels/users/groups allowed for the 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.
    merge_access_levels Sequence[GetGroupProtectedBranchesProtectedBranchMergeAccessLevel]
    Array of merge access levels/users/groups allowed for the protected branch.
    name str
    The name of the protected branch.
    push_access_levels Sequence[GetGroupProtectedBranchesProtectedBranchPushAccessLevel]
    Array of push access levels/users/groups/deploy keys allowed for the protected branch.
    unprotect_access_levels Sequence[GetGroupProtectedBranchesProtectedBranchUnprotectAccessLevel]
    Array of unprotect access levels/users/groups allowed for the 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.
    mergeAccessLevels List<Property Map>
    Array of merge access levels/users/groups allowed for the protected branch.
    name String
    The name of the protected branch.
    pushAccessLevels List<Property Map>
    Array of push access levels/users/groups/deploy keys allowed for the protected branch.
    unprotectAccessLevels List<Property Map>
    Array of unprotect access levels/users/groups allowed for the protected branch.

    GetGroupProtectedBranchesProtectedBranchMergeAccessLevel

    AccessLevel string
    Access level allowed to perform the relevant action.
    AccessLevelDescription string
    Readable description of access level.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action.
    AccessLevel string
    Access level allowed to perform the relevant action.
    AccessLevelDescription string
    Readable description of access level.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action.
    access_level string
    Access level allowed to perform the relevant action.
    access_level_description string
    Readable description of access level.
    group_id number
    The ID of a GitLab group allowed to perform the relevant action.
    user_id number
    The ID of a GitLab user allowed to perform the relevant action.
    accessLevel String
    Access level allowed to perform the relevant action.
    accessLevelDescription String
    Readable description of access level.
    groupId Integer
    The ID of a GitLab group allowed to perform the relevant action.
    userId Integer
    The ID of a GitLab user allowed to perform the relevant action.
    accessLevel string
    Access level allowed to perform the relevant action.
    accessLevelDescription string
    Readable description of access level.
    groupId number
    The ID of a GitLab group allowed to perform the relevant action.
    userId number
    The ID of a GitLab user allowed to perform the relevant action.
    access_level str
    Access level allowed to perform the relevant action.
    access_level_description str
    Readable description of access level.
    group_id int
    The ID of a GitLab group allowed to perform the relevant action.
    user_id int
    The ID of a GitLab user allowed to perform the relevant action.
    accessLevel String
    Access level allowed to perform the relevant action.
    accessLevelDescription String
    Readable description of access level.
    groupId Number
    The ID of a GitLab group allowed to perform the relevant action.
    userId Number
    The ID of a GitLab user allowed to perform the relevant action.

    GetGroupProtectedBranchesProtectedBranchPushAccessLevel

    AccessLevel string
    Access level allowed to perform the relevant action.
    AccessLevelDescription string
    Readable description of access level.
    DeployKeyId int
    The ID of a GitLab deploy key allowed to perform the relevant action.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action.
    AccessLevel string
    Access level allowed to perform the relevant action.
    AccessLevelDescription string
    Readable description of access level.
    DeployKeyId int
    The ID of a GitLab deploy key allowed to perform the relevant action.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action.
    access_level string
    Access level allowed to perform the relevant action.
    access_level_description string
    Readable description of access level.
    deploy_key_id number
    The ID of a GitLab deploy key allowed to perform the relevant action.
    group_id number
    The ID of a GitLab group allowed to perform the relevant action.
    user_id number
    The ID of a GitLab user allowed to perform the relevant action.
    accessLevel String
    Access level allowed to perform the relevant action.
    accessLevelDescription String
    Readable description of access level.
    deployKeyId Integer
    The ID of a GitLab deploy key allowed to perform the relevant action.
    groupId Integer
    The ID of a GitLab group allowed to perform the relevant action.
    userId Integer
    The ID of a GitLab user allowed to perform the relevant action.
    accessLevel string
    Access level allowed to perform the relevant action.
    accessLevelDescription string
    Readable description of access level.
    deployKeyId number
    The ID of a GitLab deploy key allowed to perform the relevant action.
    groupId number
    The ID of a GitLab group allowed to perform the relevant action.
    userId number
    The ID of a GitLab user allowed to perform the relevant action.
    access_level str
    Access level allowed to perform the relevant action.
    access_level_description str
    Readable description of access level.
    deploy_key_id int
    The ID of a GitLab deploy key allowed to perform the relevant action.
    group_id int
    The ID of a GitLab group allowed to perform the relevant action.
    user_id int
    The ID of a GitLab user allowed to perform the relevant action.
    accessLevel String
    Access level allowed to perform the relevant action.
    accessLevelDescription String
    Readable description of access level.
    deployKeyId Number
    The ID of a GitLab deploy key allowed to perform the relevant action.
    groupId Number
    The ID of a GitLab group allowed to perform the relevant action.
    userId Number
    The ID of a GitLab user allowed to perform the relevant action.

    GetGroupProtectedBranchesProtectedBranchUnprotectAccessLevel

    AccessLevel string
    Access level allowed to perform the relevant action.
    AccessLevelDescription string
    Readable description of access level.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action.
    AccessLevel string
    Access level allowed to perform the relevant action.
    AccessLevelDescription string
    Readable description of access level.
    GroupId int
    The ID of a GitLab group allowed to perform the relevant action.
    UserId int
    The ID of a GitLab user allowed to perform the relevant action.
    access_level string
    Access level allowed to perform the relevant action.
    access_level_description string
    Readable description of access level.
    group_id number
    The ID of a GitLab group allowed to perform the relevant action.
    user_id number
    The ID of a GitLab user allowed to perform the relevant action.
    accessLevel String
    Access level allowed to perform the relevant action.
    accessLevelDescription String
    Readable description of access level.
    groupId Integer
    The ID of a GitLab group allowed to perform the relevant action.
    userId Integer
    The ID of a GitLab user allowed to perform the relevant action.
    accessLevel string
    Access level allowed to perform the relevant action.
    accessLevelDescription string
    Readable description of access level.
    groupId number
    The ID of a GitLab group allowed to perform the relevant action.
    userId number
    The ID of a GitLab user allowed to perform the relevant action.
    access_level str
    Access level allowed to perform the relevant action.
    access_level_description str
    Readable description of access level.
    group_id int
    The ID of a GitLab group allowed to perform the relevant action.
    user_id int
    The ID of a GitLab user allowed to perform the relevant action.
    accessLevel String
    Access level allowed to perform the relevant action.
    accessLevelDescription String
    Readable description of access level.
    groupId Number
    The ID of a GitLab group allowed to perform the relevant action.
    userId Number
    The ID of a GitLab user allowed to perform the relevant action.

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    Viewing docs for GitLab v10.0.0
    published on Friday, Jun 26, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial