1. Packages
  2. Harbor
  3. API Docs
  4. ProjectWebhook
Harbor v3.10.11 published on Wednesday, Jun 19, 2024 by Pulumiverse

harbor.ProjectWebhook

Explore with Pulumi AI

harbor logo
Harbor v3.10.11 published on Wednesday, Jun 19, 2024 by Pulumiverse

    Example Usage

    resource "harbor_project" "main" {
      name = "test-project"
    }
    
    resource "harbor_project_webhook" "main" {
      name        = "test_webhook"
      address     = "https://webhook.domain.com"
      project_id  = harbor_project.main.id
      notify_type = "http"
    
      events_types = [
        "DELETE_ARTIFACT",
        "PULL_ARTIFACT",
        "PUSH_ARTIFACT",
        "QUOTA_EXCEED",
        "QUOTA_WARNING",
        "REPLICATION",
        "SCANNING_FAILED",
        "SCANNING_COMPLETED",
        "TAG_RETENTION"
      ]
    
    }
    

    Create ProjectWebhook Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ProjectWebhook(name: string, args: ProjectWebhookArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectWebhook(resource_name: str,
                       args: ProjectWebhookArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectWebhook(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       address: Optional[str] = None,
                       events_types: Optional[Sequence[str]] = None,
                       notify_type: Optional[str] = None,
                       project_id: Optional[str] = None,
                       auth_header: Optional[str] = None,
                       description: Optional[str] = None,
                       enabled: Optional[bool] = None,
                       name: Optional[str] = None,
                       skip_cert_verify: Optional[bool] = 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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var projectWebhookResource = new Harbor.ProjectWebhook("projectWebhookResource", new()
    {
        Address = "string",
        EventsTypes = new[]
        {
            "string",
        },
        NotifyType = "string",
        ProjectId = "string",
        AuthHeader = "string",
        Description = "string",
        Enabled = false,
        Name = "string",
        SkipCertVerify = false,
    });
    
    example, err := harbor.NewProjectWebhook(ctx, "projectWebhookResource", &harbor.ProjectWebhookArgs{
    	Address: pulumi.String("string"),
    	EventsTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	NotifyType:     pulumi.String("string"),
    	ProjectId:      pulumi.String("string"),
    	AuthHeader:     pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	Enabled:        pulumi.Bool(false),
    	Name:           pulumi.String("string"),
    	SkipCertVerify: pulumi.Bool(false),
    })
    
    var projectWebhookResource = new ProjectWebhook("projectWebhookResource", ProjectWebhookArgs.builder()
        .address("string")
        .eventsTypes("string")
        .notifyType("string")
        .projectId("string")
        .authHeader("string")
        .description("string")
        .enabled(false)
        .name("string")
        .skipCertVerify(false)
        .build());
    
    project_webhook_resource = harbor.ProjectWebhook("projectWebhookResource",
        address="string",
        events_types=["string"],
        notify_type="string",
        project_id="string",
        auth_header="string",
        description="string",
        enabled=False,
        name="string",
        skip_cert_verify=False)
    
    const projectWebhookResource = new harbor.ProjectWebhook("projectWebhookResource", {
        address: "string",
        eventsTypes: ["string"],
        notifyType: "string",
        projectId: "string",
        authHeader: "string",
        description: "string",
        enabled: false,
        name: "string",
        skipCertVerify: false,
    });
    
    type: harbor:ProjectWebhook
    properties:
        address: string
        authHeader: string
        description: string
        enabled: false
        eventsTypes:
            - string
        name: string
        notifyType: string
        projectId: string
        skipCertVerify: false
    

    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
    NotifyType string
    The notification type either http or slack.
    ProjectId string
    The project id of the harbor that webhook related to.
    AuthHeader string
    Description string
    Enabled bool
    Name string
    The name of the webhook that will be created in harbor.
    SkipCertVerify bool
    Address string
    The address of the webhook.
    EventsTypes []string
    The type events you want to subscript to can be
    NotifyType string
    The notification type either http or slack.
    ProjectId string
    The project id of the harbor that webhook related to.
    AuthHeader string
    Description string
    Enabled bool
    Name string
    The name of the webhook that will be created in harbor.
    SkipCertVerify bool
    address String
    The address of the webhook.
    eventsTypes List<String>
    The type events you want to subscript to can be
    notifyType String
    The notification type either http or slack.
    projectId String
    The project id of the harbor that webhook related to.
    authHeader String
    description String
    enabled Boolean
    name String
    The name of the webhook that will be created in harbor.
    skipCertVerify Boolean
    address string
    The address of the webhook.
    eventsTypes string[]
    The type events you want to subscript to can be
    notifyType string
    The notification type either http or slack.
    projectId string
    The project id of the harbor that webhook related to.
    authHeader string
    description string
    enabled boolean
    name string
    The name of the webhook that will be created in harbor.
    skipCertVerify boolean
    address str
    The address of the webhook.
    events_types Sequence[str]
    The type events you want to subscript to can be
    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
    description str
    enabled bool
    name str
    The name of the webhook that will be created in harbor.
    skip_cert_verify bool
    address String
    The address of the webhook.
    eventsTypes List<String>
    The type events you want to subscript to can be
    notifyType String
    The notification type either http or slack.
    projectId String
    The project id of the harbor that webhook related to.
    authHeader String
    description String
    enabled Boolean
    name String
    The name of the webhook that will be created in harbor.
    skipCertVerify Boolean

    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
    Description string
    Enabled bool
    EventsTypes List<string>
    The type events you want to subscript to can be
    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
    Address string
    The address of the webhook.
    AuthHeader string
    Description string
    Enabled bool
    EventsTypes []string
    The type events you want to subscript to can be
    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
    address String
    The address of the webhook.
    authHeader String
    description String
    enabled Boolean
    eventsTypes List<String>
    The type events you want to subscript to can be
    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
    address string
    The address of the webhook.
    authHeader string
    description string
    enabled boolean
    eventsTypes string[]
    The type events you want to subscript to can be
    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
    address str
    The address of the webhook.
    auth_header str
    description str
    enabled bool
    events_types Sequence[str]
    The type events you want to subscript to can be
    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
    address String
    The address of the webhook.
    authHeader String
    description String
    enabled Boolean
    eventsTypes List<String>
    The type events you want to subscript to can be
    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

    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.10.11 published on Wednesday, Jun 19, 2024 by Pulumiverse