GitLab
getProjectProtectedBranches
The gitlab_protected_branches
data source allows details of the protected branches of a given project.
Upstream API: GitLab REST API docs
Example Usage
using Pulumi;
using GitLab = Pulumi.GitLab;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(GitLab.GetProjectProtectedBranches.InvokeAsync(new GitLab.GetProjectProtectedBranchesArgs
{
ProjectId = "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.GetProjectProtectedBranches(ctx, &GetProjectProtectedBranchesArgs{
ProjectId: "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.getProjectProtectedBranches(GetProjectProtectedBranchesArgs.builder()
.projectId("foo/bar/baz")
.build()));
}
}
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.get_project_protected_branches(project_id="foo/bar/baz")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = pulumi.output(gitlab.getProjectProtectedBranches({
projectId: "foo/bar/baz",
}));
variables:
example:
Fn::Invoke:
Function: gitlab:getProjectProtectedBranches
Arguments:
projectId: foo/bar/baz
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,
opts: Optional[InvokeOptions] = None) -> GetProjectProtectedBranchesResult
def get_project_protected_branches_output(project_id: Optional[pulumi.Input[str]] = 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:
- Project
Id string
- Project
Id string
- project
Id String
- project
Id string
- project_
id str
- project
Id String
getProjectProtectedBranches Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string - Protected
Branches List<Pulumi.Git Lab. Outputs. Get Project Protected Branches Protected Branch>
- Id string
The provider-assigned unique ID for this managed resource.
- Project
Id string - Protected
Branches []GetProject Protected Branches Protected Branch
- id String
The provider-assigned unique ID for this managed resource.
- project
Id String - protected
Branches List<GetProject Protected Branches Protected Branch>
- id string
The provider-assigned unique ID for this managed resource.
- project
Id string - protected
Branches GetProject Protected Branches Protected Branch[]
- id str
The provider-assigned unique ID for this managed resource.
- project_
id str - protected_
branches Sequence[GetProject Protected Branches Protected Branch]
- id String
The provider-assigned unique ID for this managed resource.
- project
Id String - protected
Branches List<Property Map>
Supporting Types
GetProjectProtectedBranchesProtectedBranch
- allow
Force BooleanPush - code
Owner BooleanApproval Required - id Number
- merge
Access List<Property Map>Levels - name String
- push
Access List<Property Map>Levels
GetProjectProtectedBranchesProtectedBranchMergeAccessLevel
- Access
Level string - Access
Level stringDescription - Group
Id int - User
Id int
- Access
Level string - Access
Level stringDescription - Group
Id int - User
Id int
- access
Level String - access
Level StringDescription - group
Id Integer - user
Id Integer
- access
Level string - access
Level stringDescription - group
Id number - user
Id number
- access_
level str - access_
level_ strdescription - group_
id int - user_
id int
- access
Level String - access
Level StringDescription - group
Id Number - user
Id Number
GetProjectProtectedBranchesProtectedBranchPushAccessLevel
- Access
Level string - Access
Level stringDescription - Group
Id int - User
Id int
- Access
Level string - Access
Level stringDescription - Group
Id int - User
Id int
- access
Level String - access
Level StringDescription - group
Id Integer - user
Id Integer
- access
Level string - access
Level stringDescription - group
Id number - user
Id number
- access_
level str - access_
level_ strdescription - group_
id int - user_
id int
- access
Level String - access
Level StringDescription - group
Id Number - user
Id Number
Package Details
- Repository
- https://github.com/pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
gitlab
Terraform Provider.