get Project Protected Branch
suspend fun getProjectProtectedBranch(argument: GetProjectProtectedBranchPlainArgs): GetProjectProtectedBranchResult
The gitlab_protected_branch
data source allows details of a protected branch to be retrieved by its name and the project it belongs to. Upstream API: GitLab REST API docs
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetProjectProtectedBranchArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = GitlabFunctions.getProjectProtectedBranch(GetProjectProtectedBranchArgs.builder()
.name("main")
.projectId("foo/bar/baz")
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getProjectProtectedBranch.
Parameters
argument
A collection of arguments for invoking getProjectProtectedBranch.
suspend fun getProjectProtectedBranch(name: String, projectId: String): GetProjectProtectedBranchResult
Return
A collection of values returned by getProjectProtectedBranch.
Parameters
name
The name of the protected branch.
project Id
The integer or path with namespace that uniquely identifies the project.
See also
suspend fun getProjectProtectedBranch(argument: suspend GetProjectProtectedBranchPlainArgsBuilder.() -> Unit): GetProjectProtectedBranchResult
Return
A collection of values returned by getProjectProtectedBranch.
Parameters
argument
Builder for com.pulumi.gitlab.kotlin.inputs.GetProjectProtectedBranchPlainArgs.