1. Packages
  2. GitLab
  3. API Docs
  4. getProjectHook
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

gitlab.getProjectHook

Explore with Pulumi AI

gitlab logo
GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi

    The gitlab.ProjectHook data source allows to retrieve details about a hook in a project.

    Upstream API: GitLab REST API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const exampleProject = gitlab.getProject({
        id: "foo/bar/baz",
    });
    const exampleProjectHook = exampleProject.then(exampleProject => gitlab.getProjectHook({
        project: exampleProject.id,
        hookId: 1,
    }));
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    example_project = gitlab.get_project(id="foo/bar/baz")
    example_project_hook = gitlab.get_project_hook(project=example_project.id,
        hook_id=1)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleProject, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{
    			Id: pulumi.StringRef("foo/bar/baz"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = gitlab.LookupProjectHook(ctx, &gitlab.LookupProjectHookArgs{
    			Project: exampleProject.Id,
    			HookId:  1,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using GitLab = Pulumi.GitLab;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleProject = GitLab.GetProject.Invoke(new()
        {
            Id = "foo/bar/baz",
        });
    
        var exampleProjectHook = GitLab.GetProjectHook.Invoke(new()
        {
            Project = exampleProject.Apply(getProjectResult => getProjectResult.Id),
            HookId = 1,
        });
    
    });
    
    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.GetProjectHookArgs;
    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 exampleProject = GitlabFunctions.getProject(GetProjectArgs.builder()
                .id("foo/bar/baz")
                .build());
    
            final var exampleProjectHook = GitlabFunctions.getProjectHook(GetProjectHookArgs.builder()
                .project(exampleProject.applyValue(getProjectResult -> getProjectResult.id()))
                .hookId(1)
                .build());
    
        }
    }
    
    variables:
      exampleProject:
        fn::invoke:
          Function: gitlab:getProject
          Arguments:
            id: foo/bar/baz
      exampleProjectHook:
        fn::invoke:
          Function: gitlab:getProjectHook
          Arguments:
            project: ${exampleProject.id}
            hookId: 1
    

    Using getProjectHook

    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 getProjectHook(args: GetProjectHookArgs, opts?: InvokeOptions): Promise<GetProjectHookResult>
    function getProjectHookOutput(args: GetProjectHookOutputArgs, opts?: InvokeOptions): Output<GetProjectHookResult>
    def get_project_hook(hook_id: Optional[int] = None,
                         project: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetProjectHookResult
    def get_project_hook_output(hook_id: Optional[pulumi.Input[int]] = None,
                         project: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetProjectHookResult]
    func LookupProjectHook(ctx *Context, args *LookupProjectHookArgs, opts ...InvokeOption) (*LookupProjectHookResult, error)
    func LookupProjectHookOutput(ctx *Context, args *LookupProjectHookOutputArgs, opts ...InvokeOption) LookupProjectHookResultOutput

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

    public static class GetProjectHook 
    {
        public static Task<GetProjectHookResult> InvokeAsync(GetProjectHookArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectHookResult> Invoke(GetProjectHookInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectHookResult> getProjectHook(GetProjectHookArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gitlab:index/getProjectHook:getProjectHook
      arguments:
        # arguments dictionary

    The following arguments are supported:

    HookId int
    The id of the project hook.
    Project string
    The name or id of the project to add the hook to.
    HookId int
    The id of the project hook.
    Project string
    The name or id of the project to add the hook to.
    hookId Integer
    The id of the project hook.
    project String
    The name or id of the project to add the hook to.
    hookId number
    The id of the project hook.
    project string
    The name or id of the project to add the hook to.
    hook_id int
    The id of the project hook.
    project str
    The name or id of the project to add the hook to.
    hookId Number
    The id of the project hook.
    project String
    The name or id of the project to add the hook to.

    getProjectHook Result

    The following output properties are available:

    ConfidentialIssuesEvents bool
    Invoke the hook for confidential issues events.
    ConfidentialNoteEvents bool
    Invoke the hook for confidential notes events.
    DeploymentEvents bool
    Invoke the hook for deployment events.
    EnableSslVerification bool
    Enable ssl verification when invoking the hook.
    HookId int
    The id of the project hook.
    Id string
    The provider-assigned unique ID for this managed resource.
    IssuesEvents bool
    Invoke the hook for issues events.
    JobEvents bool
    Invoke the hook for job events.
    MergeRequestsEvents bool
    Invoke the hook for merge requests.
    NoteEvents bool
    Invoke the hook for notes events.
    PipelineEvents bool
    Invoke the hook for pipeline events.
    Project string
    The name or id of the project to add the hook to.
    ProjectId int
    The id of the project for the hook.
    PushEvents bool
    Invoke the hook for push events.
    PushEventsBranchFilter string
    Invoke the hook for push events on matching branches only.
    ReleasesEvents bool
    Invoke the hook for releases events.
    TagPushEvents bool
    Invoke the hook for tag push events.
    Token string
    A token to present when invoking the hook. The token is not available for imported resources.
    Url string
    The url of the hook to invoke.
    WikiPageEvents bool
    Invoke the hook for wiki page events.
    ConfidentialIssuesEvents bool
    Invoke the hook for confidential issues events.
    ConfidentialNoteEvents bool
    Invoke the hook for confidential notes events.
    DeploymentEvents bool
    Invoke the hook for deployment events.
    EnableSslVerification bool
    Enable ssl verification when invoking the hook.
    HookId int
    The id of the project hook.
    Id string
    The provider-assigned unique ID for this managed resource.
    IssuesEvents bool
    Invoke the hook for issues events.
    JobEvents bool
    Invoke the hook for job events.
    MergeRequestsEvents bool
    Invoke the hook for merge requests.
    NoteEvents bool
    Invoke the hook for notes events.
    PipelineEvents bool
    Invoke the hook for pipeline events.
    Project string
    The name or id of the project to add the hook to.
    ProjectId int
    The id of the project for the hook.
    PushEvents bool
    Invoke the hook for push events.
    PushEventsBranchFilter string
    Invoke the hook for push events on matching branches only.
    ReleasesEvents bool
    Invoke the hook for releases events.
    TagPushEvents bool
    Invoke the hook for tag push events.
    Token string
    A token to present when invoking the hook. The token is not available for imported resources.
    Url string
    The url of the hook to invoke.
    WikiPageEvents bool
    Invoke the hook for wiki page events.
    confidentialIssuesEvents Boolean
    Invoke the hook for confidential issues events.
    confidentialNoteEvents Boolean
    Invoke the hook for confidential notes events.
    deploymentEvents Boolean
    Invoke the hook for deployment events.
    enableSslVerification Boolean
    Enable ssl verification when invoking the hook.
    hookId Integer
    The id of the project hook.
    id String
    The provider-assigned unique ID for this managed resource.
    issuesEvents Boolean
    Invoke the hook for issues events.
    jobEvents Boolean
    Invoke the hook for job events.
    mergeRequestsEvents Boolean
    Invoke the hook for merge requests.
    noteEvents Boolean
    Invoke the hook for notes events.
    pipelineEvents Boolean
    Invoke the hook for pipeline events.
    project String
    The name or id of the project to add the hook to.
    projectId Integer
    The id of the project for the hook.
    pushEvents Boolean
    Invoke the hook for push events.
    pushEventsBranchFilter String
    Invoke the hook for push events on matching branches only.
    releasesEvents Boolean
    Invoke the hook for releases events.
    tagPushEvents Boolean
    Invoke the hook for tag push events.
    token String
    A token to present when invoking the hook. The token is not available for imported resources.
    url String
    The url of the hook to invoke.
    wikiPageEvents Boolean
    Invoke the hook for wiki page events.
    confidentialIssuesEvents boolean
    Invoke the hook for confidential issues events.
    confidentialNoteEvents boolean
    Invoke the hook for confidential notes events.
    deploymentEvents boolean
    Invoke the hook for deployment events.
    enableSslVerification boolean
    Enable ssl verification when invoking the hook.
    hookId number
    The id of the project hook.
    id string
    The provider-assigned unique ID for this managed resource.
    issuesEvents boolean
    Invoke the hook for issues events.
    jobEvents boolean
    Invoke the hook for job events.
    mergeRequestsEvents boolean
    Invoke the hook for merge requests.
    noteEvents boolean
    Invoke the hook for notes events.
    pipelineEvents boolean
    Invoke the hook for pipeline events.
    project string
    The name or id of the project to add the hook to.
    projectId number
    The id of the project for the hook.
    pushEvents boolean
    Invoke the hook for push events.
    pushEventsBranchFilter string
    Invoke the hook for push events on matching branches only.
    releasesEvents boolean
    Invoke the hook for releases events.
    tagPushEvents boolean
    Invoke the hook for tag push events.
    token string
    A token to present when invoking the hook. The token is not available for imported resources.
    url string
    The url of the hook to invoke.
    wikiPageEvents boolean
    Invoke the hook for wiki page events.
    confidential_issues_events bool
    Invoke the hook for confidential issues events.
    confidential_note_events bool
    Invoke the hook for confidential notes events.
    deployment_events bool
    Invoke the hook for deployment events.
    enable_ssl_verification bool
    Enable ssl verification when invoking the hook.
    hook_id int
    The id of the project hook.
    id str
    The provider-assigned unique ID for this managed resource.
    issues_events bool
    Invoke the hook for issues events.
    job_events bool
    Invoke the hook for job events.
    merge_requests_events bool
    Invoke the hook for merge requests.
    note_events bool
    Invoke the hook for notes events.
    pipeline_events bool
    Invoke the hook for pipeline events.
    project str
    The name or id of the project to add the hook to.
    project_id int
    The id of the project for the hook.
    push_events bool
    Invoke the hook for push events.
    push_events_branch_filter str
    Invoke the hook for push events on matching branches only.
    releases_events bool
    Invoke the hook for releases events.
    tag_push_events bool
    Invoke the hook for tag push events.
    token str
    A token to present when invoking the hook. The token is not available for imported resources.
    url str
    The url of the hook to invoke.
    wiki_page_events bool
    Invoke the hook for wiki page events.
    confidentialIssuesEvents Boolean
    Invoke the hook for confidential issues events.
    confidentialNoteEvents Boolean
    Invoke the hook for confidential notes events.
    deploymentEvents Boolean
    Invoke the hook for deployment events.
    enableSslVerification Boolean
    Enable ssl verification when invoking the hook.
    hookId Number
    The id of the project hook.
    id String
    The provider-assigned unique ID for this managed resource.
    issuesEvents Boolean
    Invoke the hook for issues events.
    jobEvents Boolean
    Invoke the hook for job events.
    mergeRequestsEvents Boolean
    Invoke the hook for merge requests.
    noteEvents Boolean
    Invoke the hook for notes events.
    pipelineEvents Boolean
    Invoke the hook for pipeline events.
    project String
    The name or id of the project to add the hook to.
    projectId Number
    The id of the project for the hook.
    pushEvents Boolean
    Invoke the hook for push events.
    pushEventsBranchFilter String
    Invoke the hook for push events on matching branches only.
    releasesEvents Boolean
    Invoke the hook for releases events.
    tagPushEvents Boolean
    Invoke the hook for tag push events.
    token String
    A token to present when invoking the hook. The token is not available for imported resources.
    url String
    The url of the hook to invoke.
    wikiPageEvents Boolean
    Invoke the hook for wiki page events.

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v6.10.0 published on Monday, Mar 25, 2024 by Pulumi