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

gitlab.ProjectHook

Explore with Pulumi AI

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

    The gitlab.ProjectHook resource allows to manage the lifecycle of a project hook.

    Upstream API: GitLab REST API docs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gitlab from "@pulumi/gitlab";
    
    const example = new gitlab.ProjectHook("example", {
        mergeRequestsEvents: true,
        project: "example/hooked",
        url: "https://example.com/hook/example",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    example = gitlab.ProjectHook("example",
        merge_requests_events=True,
        project="example/hooked",
        url="https://example.com/hook/example")
    
    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 {
    		_, err := gitlab.NewProjectHook(ctx, "example", &gitlab.ProjectHookArgs{
    			MergeRequestsEvents: pulumi.Bool(true),
    			Project:             pulumi.String("example/hooked"),
    			Url:                 pulumi.String("https://example.com/hook/example"),
    		})
    		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 example = new GitLab.ProjectHook("example", new()
        {
            MergeRequestsEvents = true,
            Project = "example/hooked",
            Url = "https://example.com/hook/example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.ProjectHook;
    import com.pulumi.gitlab.ProjectHookArgs;
    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) {
            var example = new ProjectHook("example", ProjectHookArgs.builder()        
                .mergeRequestsEvents(true)
                .project("example/hooked")
                .url("https://example.com/hook/example")
                .build());
    
        }
    }
    
    resources:
      example:
        type: gitlab:ProjectHook
        properties:
          mergeRequestsEvents: true
          project: example/hooked
          url: https://example.com/hook/example
    

    Create ProjectHook Resource

    new ProjectHook(name: string, args: ProjectHookArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectHook(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    confidential_issues_events: Optional[bool] = None,
                    confidential_note_events: Optional[bool] = None,
                    deployment_events: Optional[bool] = None,
                    enable_ssl_verification: Optional[bool] = None,
                    issues_events: Optional[bool] = None,
                    job_events: Optional[bool] = None,
                    merge_requests_events: Optional[bool] = None,
                    note_events: Optional[bool] = None,
                    pipeline_events: Optional[bool] = None,
                    project: Optional[str] = None,
                    push_events: Optional[bool] = None,
                    push_events_branch_filter: Optional[str] = None,
                    releases_events: Optional[bool] = None,
                    tag_push_events: Optional[bool] = None,
                    token: Optional[str] = None,
                    url: Optional[str] = None,
                    wiki_page_events: Optional[bool] = None)
    @overload
    def ProjectHook(resource_name: str,
                    args: ProjectHookArgs,
                    opts: Optional[ResourceOptions] = None)
    func NewProjectHook(ctx *Context, name string, args ProjectHookArgs, opts ...ResourceOption) (*ProjectHook, error)
    public ProjectHook(string name, ProjectHookArgs args, CustomResourceOptions? opts = null)
    public ProjectHook(String name, ProjectHookArgs args)
    public ProjectHook(String name, ProjectHookArgs args, CustomResourceOptions options)
    
    type: gitlab:ProjectHook
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ProjectHookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProjectHookArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProjectHookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectHookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectHookArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ProjectHook Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ProjectHook resource accepts the following input properties:

    Project string
    The name or id of the project to add the hook to.
    Url string
    The url of the hook to invoke. Forces re-creation to preserve token.
    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.
    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.
    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.
    WikiPageEvents bool
    Invoke the hook for wiki page events.
    Project string
    The name or id of the project to add the hook to.
    Url string
    The url of the hook to invoke. Forces re-creation to preserve token.
    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.
    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.
    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.
    WikiPageEvents bool
    Invoke the hook for wiki page events.
    project String
    The name or id of the project to add the hook to.
    url String
    The url of the hook to invoke. Forces re-creation to preserve token.
    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.
    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.
    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.
    wikiPageEvents Boolean
    Invoke the hook for wiki page events.
    project string
    The name or id of the project to add the hook to.
    url string
    The url of the hook to invoke. Forces re-creation to preserve token.
    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.
    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.
    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.
    wikiPageEvents boolean
    Invoke the hook for wiki page events.
    project str
    The name or id of the project to add the hook to.
    url str
    The url of the hook to invoke. Forces re-creation to preserve token.
    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.
    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.
    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.
    wiki_page_events bool
    Invoke the hook for wiki page events.
    project String
    The name or id of the project to add the hook to.
    url String
    The url of the hook to invoke. Forces re-creation to preserve token.
    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.
    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.
    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.
    wikiPageEvents Boolean
    Invoke the hook for wiki page events.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProjectHook resource produces the following output properties:

    HookId int
    The id of the project hook.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId int
    The id of the project for the hook.
    HookId int
    The id of the project hook.
    Id string
    The provider-assigned unique ID for this managed resource.
    ProjectId int
    The id of the project for the hook.
    hookId Integer
    The id of the project hook.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId Integer
    The id of the project for the hook.
    hookId number
    The id of the project hook.
    id string
    The provider-assigned unique ID for this managed resource.
    projectId number
    The id of the project for the hook.
    hook_id int
    The id of the project hook.
    id str
    The provider-assigned unique ID for this managed resource.
    project_id int
    The id of the project for the hook.
    hookId Number
    The id of the project hook.
    id String
    The provider-assigned unique ID for this managed resource.
    projectId Number
    The id of the project for the hook.

    Look up Existing ProjectHook Resource

    Get an existing ProjectHook resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ProjectHookState, opts?: CustomResourceOptions): ProjectHook
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            confidential_issues_events: Optional[bool] = None,
            confidential_note_events: Optional[bool] = None,
            deployment_events: Optional[bool] = None,
            enable_ssl_verification: Optional[bool] = None,
            hook_id: Optional[int] = None,
            issues_events: Optional[bool] = None,
            job_events: Optional[bool] = None,
            merge_requests_events: Optional[bool] = None,
            note_events: Optional[bool] = None,
            pipeline_events: Optional[bool] = None,
            project: Optional[str] = None,
            project_id: Optional[int] = None,
            push_events: Optional[bool] = None,
            push_events_branch_filter: Optional[str] = None,
            releases_events: Optional[bool] = None,
            tag_push_events: Optional[bool] = None,
            token: Optional[str] = None,
            url: Optional[str] = None,
            wiki_page_events: Optional[bool] = None) -> ProjectHook
    func GetProjectHook(ctx *Context, name string, id IDInput, state *ProjectHookState, opts ...ResourceOption) (*ProjectHook, error)
    public static ProjectHook Get(string name, Input<string> id, ProjectHookState? state, CustomResourceOptions? opts = null)
    public static ProjectHook get(String name, Output<String> id, ProjectHookState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    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.
    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. Forces re-creation to preserve token.
    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.
    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. Forces re-creation to preserve token.
    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.
    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. Forces re-creation to preserve token.
    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.
    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. Forces re-creation to preserve token.
    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.
    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. Forces re-creation to preserve token.
    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.
    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. Forces re-creation to preserve token.
    wikiPageEvents Boolean
    Invoke the hook for wiki page events.

    Import

    A GitLab Project Hook can be imported using a key composed of <project-id>:<hook-id>, e.g.

    $ pulumi import gitlab:index/projectHook:ProjectHook example "12345:1"
    

    NOTE: the token resource attribute is not available for imported resources as this information cannot be read from the GitLab API.

    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