get Project Hooks
The gitlab.getProjectHooks
data source allows to retrieve details about hooks in a project. Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = gitlab.getProject({
id: "foo/bar/baz",
});
const examples = example.then(example => gitlab.getProjectHooks({
project: example.id,
}));
Content copied to clipboard
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.get_project(id="foo/bar/baz")
examples = gitlab.get_project_hooks(project=example.id)
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = GitLab.GetProject.Invoke(new()
{
Id = "foo/bar/baz",
});
var examples = GitLab.GetProjectHooks.Invoke(new()
{
Project = example.Apply(getProjectResult => getProjectResult.Id),
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v7/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{
Id: pulumi.StringRef("foo/bar/baz"),
}, nil)
if err != nil {
return err
}
_, err = gitlab.GetProjectHooks(ctx, &gitlab.GetProjectHooksArgs{
Project: example.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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.GetProjectArgs;
import com.pulumi.gitlab.inputs.GetProjectHooksArgs;
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.getProject(GetProjectArgs.builder()
.id("foo/bar/baz")
.build());
final var examples = GitlabFunctions.getProjectHooks(GetProjectHooksArgs.builder()
.project(example.applyValue(getProjectResult -> getProjectResult.id()))
.build());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
Function: gitlab:getProject
Arguments:
id: foo/bar/baz
examples:
fn::invoke:
Function: gitlab:getProjectHooks
Arguments:
project: ${example.id}
Content copied to clipboard
Return
A collection of values returned by getProjectHooks.
Parameters
argument
A collection of arguments for invoking getProjectHooks.
Return
A collection of values returned by getProjectHooks.
Parameters
project
The name or id of the project.
See also
suspend fun getProjectHooks(argument: suspend GetProjectHooksPlainArgsBuilder.() -> Unit): GetProjectHooksResult
Return
A collection of values returned by getProjectHooks.
Parameters
argument
Builder for com.pulumi.gitlab.kotlin.inputs.GetProjectHooksPlainArgs.