GitLab v8.1.0 published on Friday, Jun 21, 2024 by Pulumi
gitlab.getProjectProtectedBranches
Explore with Pulumi AI
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 dictionaryThe following arguments are supported:
- Project
Id string - The integer or path with namespace that uniquely identifies the project.
 - Protected
Branches List<Pulumi.Git Lab. Inputs. Get Project Protected Branches Protected Branch>  - A list of protected branches, as defined below.
 
- Project
Id string - The integer or path with namespace that uniquely identifies the project.
 - Protected
Branches []GetProject Protected Branches Protected Branch  - A list of protected branches, as defined below.
 
- project
Id String - The integer or path with namespace that uniquely identifies the project.
 - protected
Branches List<GetProject Protected Branches Protected Branch>  - A list of protected branches, as defined below.
 
- project
Id string - The integer or path with namespace that uniquely identifies the project.
 - protected
Branches GetProject Protected Branches Protected Branch[]  - 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[GetProject Protected Branches Protected Branch]  - A list of protected branches, as defined below.
 
- project
Id String - The integer or path with namespace that uniquely identifies the project.
 - protected
Branches 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.
 - Project
Id string - The integer or path with namespace that uniquely identifies the project.
 - Protected
Branches List<Pulumi.Git Lab. Outputs. Get Project Protected Branches Protected Branch>  - A list of protected branches, as defined below.
 
- Id int
 - The ID of this resource.
 - Project
Id string - The integer or path with namespace that uniquely identifies the project.
 - Protected
Branches []GetProject Protected Branches Protected Branch  - A list of protected branches, as defined below.
 
- id Integer
 - The ID of this resource.
 - project
Id String - The integer or path with namespace that uniquely identifies the project.
 - protected
Branches List<GetProject Protected Branches Protected Branch>  - A list of protected branches, as defined below.
 
- id number
 - The ID of this resource.
 - project
Id string - The integer or path with namespace that uniquely identifies the project.
 - protected
Branches GetProject Protected Branches Protected Branch[]  - 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[GetProject Protected Branches Protected Branch]  - A list of protected branches, as defined below.
 
- id Number
 - The ID of this resource.
 - project
Id String - The integer or path with namespace that uniquely identifies the project.
 - protected
Branches List<Property Map> - A list of protected branches, as defined below.
 
Supporting Types
GetProjectProtectedBranchesProtectedBranch     
- Allow
Force boolPush  - Whether force push is allowed.
 - Code
Owner boolApproval Required  - 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.
 - Merge
Access List<Pulumi.Levels Git Lab. Inputs. Get Project Protected Branches Protected Branch Merge Access Level>  - Array of access levels and user(s)/group(s) allowed to merge to protected branch.
 - Push
Access List<Pulumi.Levels Git Lab. Inputs. Get Project Protected Branches Protected Branch Push Access Level>  - Array of access levels and user(s)/group(s) allowed to push to protected branch.
 
- Allow
Force boolPush  - Whether force push is allowed.
 - Code
Owner boolApproval Required  - 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.
 - Merge
Access []GetLevels Project Protected Branches Protected Branch Merge Access Level  - Array of access levels and user(s)/group(s) allowed to merge to protected branch.
 - Push
Access []GetLevels Project Protected Branches Protected Branch Push Access Level  - Array of access levels and user(s)/group(s) allowed to push to protected branch.
 
- allow
Force BooleanPush  - Whether force push is allowed.
 - code
Owner BooleanApproval Required  - 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.
 - merge
Access List<GetLevels Project Protected Branches Protected Branch Merge Access Level>  - Array of access levels and user(s)/group(s) allowed to merge to protected branch.
 - push
Access List<GetLevels Project Protected Branches Protected Branch Push Access Level>  - Array of access levels and user(s)/group(s) allowed to push to protected branch.
 
- allow
Force booleanPush  - Whether force push is allowed.
 - code
Owner booleanApproval Required  - 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.
 - merge
Access GetLevels Project Protected Branches Protected Branch Merge Access Level[]  - Array of access levels and user(s)/group(s) allowed to merge to protected branch.
 - push
Access GetLevels Project Protected Branches Protected Branch Push Access Level[]  - Array of access levels and user(s)/group(s) allowed to push to protected branch.
 
- allow_
force_ boolpush  - Whether force push is allowed.
 - code_
owner_ boolapproval_ required  - 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_ Sequence[Getlevels Project Protected Branches Protected Branch Merge Access Level]  - Array of access levels and user(s)/group(s) allowed to merge to protected branch.
 - push_
access_ Sequence[Getlevels Project Protected Branches Protected Branch Push Access Level]  - Array of access levels and user(s)/group(s) allowed to push to protected branch.
 
- allow
Force BooleanPush  - Whether force push is allowed.
 - code
Owner BooleanApproval Required  - 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.
 - merge
Access List<Property Map>Levels  - Array of access levels and user(s)/group(s) allowed to merge to protected branch.
 - push
Access List<Property Map>Levels  - Array of access levels and user(s)/group(s) allowed to push to protected branch.
 
GetProjectProtectedBranchesProtectedBranchMergeAccessLevel        
- Access
Level string - Access levels allowed to merge to protected branch. Valid values are: 
no one,developer,maintainer. - Access
Level stringDescription  - 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. 
- Access
Level string - Access levels allowed to merge to protected branch. Valid values are: 
no one,developer,maintainer. - Access
Level stringDescription  - 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. 
- access
Level String - Access levels allowed to merge to protected branch. Valid values are: 
no one,developer,maintainer. - access
Level StringDescription  - Readable description of access level.
 - group
Id Integer - The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with 
user_id. - user
Id Integer - The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with 
group_id. 
- access
Level string - Access levels allowed to merge to protected branch. Valid values are: 
no one,developer,maintainer. - access
Level stringDescription  - Readable description of access level.
 - group
Id number - The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with 
user_id. - user
Id 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_ strdescription  - 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. 
- access
Level String - Access levels allowed to merge to protected branch. Valid values are: 
no one,developer,maintainer. - access
Level StringDescription  - Readable description of access level.
 - group
Id Number - The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with 
user_id. - user
Id Number - The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with 
group_id. 
GetProjectProtectedBranchesProtectedBranchPushAccessLevel        
- Access
Level string - Access levels allowed to push to protected branch. Valid values are: 
no one,developer,maintainer. - Access
Level stringDescription  - 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. 
- Access
Level string - Access levels allowed to push to protected branch. Valid values are: 
no one,developer,maintainer. - Access
Level stringDescription  - 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. 
- access
Level String - Access levels allowed to push to protected branch. Valid values are: 
no one,developer,maintainer. - access
Level StringDescription  - Readable description of access level.
 - group
Id Integer - The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with 
user_id. - user
Id Integer - The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with 
group_id. 
- access
Level string - Access levels allowed to push to protected branch. Valid values are: 
no one,developer,maintainer. - access
Level stringDescription  - Readable description of access level.
 - group
Id number - The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with 
user_id. - user
Id 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_ strdescription  - 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. 
- access
Level String - Access levels allowed to push to protected branch. Valid values are: 
no one,developer,maintainer. - access
Level StringDescription  - Readable description of access level.
 - group
Id Number - The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with 
user_id. - user
Id 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 
gitlabTerraform Provider.