1. Packages
  2. Harbor
  3. API Docs
  4. ProjectWebhook
Harbor v3.9.1 published on Tuesday, May 30, 2023 by Pulumiverse

harbor.ProjectWebhook

Explore with Pulumi AI

harbor logo
Harbor v3.9.1 published on Tuesday, May 30, 2023 by Pulumiverse

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harbor = Pulumiverse.Harbor;
    
    return await Deployment.RunAsync(() => 
    {
        var mainProject = new Harbor.Project("mainProject");
    
        var mainProjectWebhook = new Harbor.ProjectWebhook("mainProjectWebhook", new()
        {
            Address = "https://webhook.domain.com",
            ProjectId = mainProject.Id,
            NotifyType = "http",
            EventsTypes = new[]
            {
                "DELETE_ARTIFACT",
                "PULL_ARTIFACT",
                "PUSH_ARTIFACT",
                "DELETE_CHART",
                "DOWNLOAD_CHART",
                "UPLOAD_CHART",
                "QUOTA_EXCEED",
                "QUOTA_WARNING",
                "REPLICATION",
                "SCANNING_FAILED",
                "SCANNING_COMPLETED",
                "TAG_RETENTION",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-harbor/sdk/v3/go/harbor"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		mainProject, err := harbor.NewProject(ctx, "mainProject", nil)
    		if err != nil {
    			return err
    		}
    		_, err = harbor.NewProjectWebhook(ctx, "mainProjectWebhook", &harbor.ProjectWebhookArgs{
    			Address:    pulumi.String("https://webhook.domain.com"),
    			ProjectId:  mainProject.ID(),
    			NotifyType: pulumi.String("http"),
    			EventsTypes: pulumi.StringArray{
    				pulumi.String("DELETE_ARTIFACT"),
    				pulumi.String("PULL_ARTIFACT"),
    				pulumi.String("PUSH_ARTIFACT"),
    				pulumi.String("DELETE_CHART"),
    				pulumi.String("DOWNLOAD_CHART"),
    				pulumi.String("UPLOAD_CHART"),
    				pulumi.String("QUOTA_EXCEED"),
    				pulumi.String("QUOTA_WARNING"),
    				pulumi.String("REPLICATION"),
    				pulumi.String("SCANNING_FAILED"),
    				pulumi.String("SCANNING_COMPLETED"),
    				pulumi.String("TAG_RETENTION"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.harbor.Project;
    import com.pulumi.harbor.ProjectWebhook;
    import com.pulumi.harbor.ProjectWebhookArgs;
    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 mainProject = new Project("mainProject");
    
            var mainProjectWebhook = new ProjectWebhook("mainProjectWebhook", ProjectWebhookArgs.builder()        
                .address("https://webhook.domain.com")
                .projectId(mainProject.id())
                .notifyType("http")
                .eventsTypes(            
                    "DELETE_ARTIFACT",
                    "PULL_ARTIFACT",
                    "PUSH_ARTIFACT",
                    "DELETE_CHART",
                    "DOWNLOAD_CHART",
                    "UPLOAD_CHART",
                    "QUOTA_EXCEED",
                    "QUOTA_WARNING",
                    "REPLICATION",
                    "SCANNING_FAILED",
                    "SCANNING_COMPLETED",
                    "TAG_RETENTION")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_harbor as harbor
    
    main_project = harbor.Project("mainProject")
    main_project_webhook = harbor.ProjectWebhook("mainProjectWebhook",
        address="https://webhook.domain.com",
        project_id=main_project.id,
        notify_type="http",
        events_types=[
            "DELETE_ARTIFACT",
            "PULL_ARTIFACT",
            "PUSH_ARTIFACT",
            "DELETE_CHART",
            "DOWNLOAD_CHART",
            "UPLOAD_CHART",
            "QUOTA_EXCEED",
            "QUOTA_WARNING",
            "REPLICATION",
            "SCANNING_FAILED",
            "SCANNING_COMPLETED",
            "TAG_RETENTION",
        ])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harbor from "@pulumiverse/harbor";
    
    const mainProject = new harbor.Project("mainProject", {});
    const mainProjectWebhook = new harbor.ProjectWebhook("mainProjectWebhook", {
        address: "https://webhook.domain.com",
        projectId: mainProject.id,
        notifyType: "http",
        eventsTypes: [
            "DELETE_ARTIFACT",
            "PULL_ARTIFACT",
            "PUSH_ARTIFACT",
            "DELETE_CHART",
            "DOWNLOAD_CHART",
            "UPLOAD_CHART",
            "QUOTA_EXCEED",
            "QUOTA_WARNING",
            "REPLICATION",
            "SCANNING_FAILED",
            "SCANNING_COMPLETED",
            "TAG_RETENTION",
        ],
    });
    
    resources:
      mainProjectWebhook:
        type: harbor:ProjectWebhook
        properties:
          address: https://webhook.domain.com
          projectId: ${mainProject.id}
          notifyType: http
          eventsTypes:
            - DELETE_ARTIFACT
            - PULL_ARTIFACT
            - PUSH_ARTIFACT
            - DELETE_CHART
            - DOWNLOAD_CHART
            - UPLOAD_CHART
            - QUOTA_EXCEED
            - QUOTA_WARNING
            - REPLICATION
            - SCANNING_FAILED
            - SCANNING_COMPLETED
            - TAG_RETENTION
      mainProject:
        type: harbor:Project
    

    Create ProjectWebhook Resource

    new ProjectWebhook(name: string, args: ProjectWebhookArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectWebhook(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       address: Optional[str] = None,
                       auth_header: Optional[str] = None,
                       description: Optional[str] = None,
                       enabled: Optional[bool] = None,
                       events_types: Optional[Sequence[str]] = None,
                       name: Optional[str] = None,
                       notify_type: Optional[str] = None,
                       project_id: Optional[str] = None,
                       skip_cert_verify: Optional[bool] = None)
    @overload
    def ProjectWebhook(resource_name: str,
                       args: ProjectWebhookArgs,
                       opts: Optional[ResourceOptions] = None)
    func NewProjectWebhook(ctx *Context, name string, args ProjectWebhookArgs, opts ...ResourceOption) (*ProjectWebhook, error)
    public ProjectWebhook(string name, ProjectWebhookArgs args, CustomResourceOptions? opts = null)
    public ProjectWebhook(String name, ProjectWebhookArgs args)
    public ProjectWebhook(String name, ProjectWebhookArgs args, CustomResourceOptions options)
    
    type: harbor:ProjectWebhook
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ProjectWebhookArgs
    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 ProjectWebhookArgs
    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 ProjectWebhookArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectWebhookArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectWebhookArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ProjectWebhook 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 ProjectWebhook resource accepts the following input properties:

    Address string

    The address of the webhook

    EventsTypes List<string>

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    NotifyType string

    The notification type either http or slack

    ProjectId string

    The project id of the harbor that webhook related to.

    AuthHeader string

    authentication header for you the webhook

    Description string

    _ (Optional, string) A description of the webhook

    Enabled bool

    , To enable / disable the webhook. Default true

    Name string

    The name of the webhook that will be created in harbor.

    SkipCertVerify bool

    checks the for validate SSL certificate.

    Address string

    The address of the webhook

    EventsTypes []string

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    NotifyType string

    The notification type either http or slack

    ProjectId string

    The project id of the harbor that webhook related to.

    AuthHeader string

    authentication header for you the webhook

    Description string

    _ (Optional, string) A description of the webhook

    Enabled bool

    , To enable / disable the webhook. Default true

    Name string

    The name of the webhook that will be created in harbor.

    SkipCertVerify bool

    checks the for validate SSL certificate.

    address String

    The address of the webhook

    eventsTypes List<String>

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    notifyType String

    The notification type either http or slack

    projectId String

    The project id of the harbor that webhook related to.

    authHeader String

    authentication header for you the webhook

    description String

    _ (Optional, string) A description of the webhook

    enabled Boolean

    , To enable / disable the webhook. Default true

    name String

    The name of the webhook that will be created in harbor.

    skipCertVerify Boolean

    checks the for validate SSL certificate.

    address string

    The address of the webhook

    eventsTypes string[]

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    notifyType string

    The notification type either http or slack

    projectId string

    The project id of the harbor that webhook related to.

    authHeader string

    authentication header for you the webhook

    description string

    _ (Optional, string) A description of the webhook

    enabled boolean

    , To enable / disable the webhook. Default true

    name string

    The name of the webhook that will be created in harbor.

    skipCertVerify boolean

    checks the for validate SSL certificate.

    address str

    The address of the webhook

    events_types Sequence[str]

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    notify_type str

    The notification type either http or slack

    project_id str

    The project id of the harbor that webhook related to.

    auth_header str

    authentication header for you the webhook

    description str

    _ (Optional, string) A description of the webhook

    enabled bool

    , To enable / disable the webhook. Default true

    name str

    The name of the webhook that will be created in harbor.

    skip_cert_verify bool

    checks the for validate SSL certificate.

    address String

    The address of the webhook

    eventsTypes List<String>

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    notifyType String

    The notification type either http or slack

    projectId String

    The project id of the harbor that webhook related to.

    authHeader String

    authentication header for you the webhook

    description String

    _ (Optional, string) A description of the webhook

    enabled Boolean

    , To enable / disable the webhook. Default true

    name String

    The name of the webhook that will be created in harbor.

    skipCertVerify Boolean

    checks the for validate SSL certificate.

    Outputs

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

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing ProjectWebhook Resource

    Get an existing ProjectWebhook 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?: ProjectWebhookState, opts?: CustomResourceOptions): ProjectWebhook
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            address: Optional[str] = None,
            auth_header: Optional[str] = None,
            description: Optional[str] = None,
            enabled: Optional[bool] = None,
            events_types: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            notify_type: Optional[str] = None,
            project_id: Optional[str] = None,
            skip_cert_verify: Optional[bool] = None) -> ProjectWebhook
    func GetProjectWebhook(ctx *Context, name string, id IDInput, state *ProjectWebhookState, opts ...ResourceOption) (*ProjectWebhook, error)
    public static ProjectWebhook Get(string name, Input<string> id, ProjectWebhookState? state, CustomResourceOptions? opts = null)
    public static ProjectWebhook get(String name, Output<String> id, ProjectWebhookState 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:
    Address string

    The address of the webhook

    AuthHeader string

    authentication header for you the webhook

    Description string

    _ (Optional, string) A description of the webhook

    Enabled bool

    , To enable / disable the webhook. Default true

    EventsTypes List<string>

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    Name string

    The name of the webhook that will be created in harbor.

    NotifyType string

    The notification type either http or slack

    ProjectId string

    The project id of the harbor that webhook related to.

    SkipCertVerify bool

    checks the for validate SSL certificate.

    Address string

    The address of the webhook

    AuthHeader string

    authentication header for you the webhook

    Description string

    _ (Optional, string) A description of the webhook

    Enabled bool

    , To enable / disable the webhook. Default true

    EventsTypes []string

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    Name string

    The name of the webhook that will be created in harbor.

    NotifyType string

    The notification type either http or slack

    ProjectId string

    The project id of the harbor that webhook related to.

    SkipCertVerify bool

    checks the for validate SSL certificate.

    address String

    The address of the webhook

    authHeader String

    authentication header for you the webhook

    description String

    _ (Optional, string) A description of the webhook

    enabled Boolean

    , To enable / disable the webhook. Default true

    eventsTypes List<String>

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    name String

    The name of the webhook that will be created in harbor.

    notifyType String

    The notification type either http or slack

    projectId String

    The project id of the harbor that webhook related to.

    skipCertVerify Boolean

    checks the for validate SSL certificate.

    address string

    The address of the webhook

    authHeader string

    authentication header for you the webhook

    description string

    _ (Optional, string) A description of the webhook

    enabled boolean

    , To enable / disable the webhook. Default true

    eventsTypes string[]

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    name string

    The name of the webhook that will be created in harbor.

    notifyType string

    The notification type either http or slack

    projectId string

    The project id of the harbor that webhook related to.

    skipCertVerify boolean

    checks the for validate SSL certificate.

    address str

    The address of the webhook

    auth_header str

    authentication header for you the webhook

    description str

    _ (Optional, string) A description of the webhook

    enabled bool

    , To enable / disable the webhook. Default true

    events_types Sequence[str]

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    name str

    The name of the webhook that will be created in harbor.

    notify_type str

    The notification type either http or slack

    project_id str

    The project id of the harbor that webhook related to.

    skip_cert_verify bool

    checks the for validate SSL certificate.

    address String

    The address of the webhook

    authHeader String

    authentication header for you the webhook

    description String

    _ (Optional, string) A description of the webhook

    enabled Boolean

    , To enable / disable the webhook. Default true

    eventsTypes List<String>

    ) The type events you want to subscript to can be DELETE_ARTIFACT, PULL_ARTIFACT, PUSH_ARTIFACT, DELETE_CHART, DOWNLOAD_CHART, UPLOAD_CHART, QUOTA_EXCEED, QUOTA_WARNING, REPLICATION, SCANNING_FAILED, SCANNING_COMPLETED, TAG_RETENTION

    name String

    The name of the webhook that will be created in harbor.

    notifyType String

    The notification type either http or slack

    projectId String

    The project id of the harbor that webhook related to.

    skipCertVerify Boolean

    checks the for validate SSL certificate.

    Package Details

    Repository
    harbor pulumiverse/pulumi-harbor
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the harbor Terraform Provider.

    harbor logo
    Harbor v3.9.1 published on Tuesday, May 30, 2023 by Pulumiverse