artifactory.DistributionWebhook
Explore with Pulumi AI
Provides an Artifactory webhook resource. This can be used to register and manage Artifactory webhook subscription which enables you to be notified or notify other users when such events take place in Artifactory.
Example Usage
.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Artifactory = Pulumi.Artifactory;
return await Deployment.RunAsync(() =>
{
var distribution_webhook = new Artifactory.DistributionWebhook("distribution-webhook", new()
{
Criteria = new Artifactory.Inputs.DistributionWebhookCriteriaArgs
{
AnyReleaseBundle = false,
ExcludePatterns = new[]
{
"bar/**",
},
IncludePatterns = new[]
{
"foo/**",
},
RegisteredReleaseBundleNames = new[]
{
"bundle-name",
},
},
EventTypes = new[]
{
"distribute_started",
"distribute_completed",
"distribute_aborted",
"distribute_failed",
"delete_started",
"delete_completed",
"delete_failed",
},
Handlers = new[]
{
new Artifactory.Inputs.DistributionWebhookHandlerArgs
{
CustomHttpHeaders =
{
{ "header-1", "value-1" },
{ "header-2", "value-2" },
},
Proxy = "proxy-key",
Secret = "some-secret",
Url = "http://tempurl.org/webhook",
},
},
Key = "distribution-webhook",
});
});
package main
import (
"github.com/pulumi/pulumi-artifactory/sdk/v3/go/artifactory"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := artifactory.NewDistributionWebhook(ctx, "distribution-webhook", &artifactory.DistributionWebhookArgs{
Criteria: &artifactory.DistributionWebhookCriteriaArgs{
AnyReleaseBundle: pulumi.Bool(false),
ExcludePatterns: pulumi.StringArray{
pulumi.String("bar/**"),
},
IncludePatterns: pulumi.StringArray{
pulumi.String("foo/**"),
},
RegisteredReleaseBundleNames: pulumi.StringArray{
pulumi.String("bundle-name"),
},
},
EventTypes: pulumi.StringArray{
pulumi.String("distribute_started"),
pulumi.String("distribute_completed"),
pulumi.String("distribute_aborted"),
pulumi.String("distribute_failed"),
pulumi.String("delete_started"),
pulumi.String("delete_completed"),
pulumi.String("delete_failed"),
},
Handlers: artifactory.DistributionWebhookHandlerArray{
&artifactory.DistributionWebhookHandlerArgs{
CustomHttpHeaders: pulumi.StringMap{
"header-1": pulumi.String("value-1"),
"header-2": pulumi.String("value-2"),
},
Proxy: pulumi.String("proxy-key"),
Secret: pulumi.String("some-secret"),
Url: pulumi.String("http://tempurl.org/webhook"),
},
},
Key: pulumi.String("distribution-webhook"),
})
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.artifactory.DistributionWebhook;
import com.pulumi.artifactory.DistributionWebhookArgs;
import com.pulumi.artifactory.inputs.DistributionWebhookCriteriaArgs;
import com.pulumi.artifactory.inputs.DistributionWebhookHandlerArgs;
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 distribution_webhook = new DistributionWebhook("distribution-webhook", DistributionWebhookArgs.builder()
.criteria(DistributionWebhookCriteriaArgs.builder()
.anyReleaseBundle(false)
.excludePatterns("bar/**")
.includePatterns("foo/**")
.registeredReleaseBundleNames("bundle-name")
.build())
.eventTypes(
"distribute_started",
"distribute_completed",
"distribute_aborted",
"distribute_failed",
"delete_started",
"delete_completed",
"delete_failed")
.handlers(DistributionWebhookHandlerArgs.builder()
.customHttpHeaders(Map.ofEntries(
Map.entry("header-1", "value-1"),
Map.entry("header-2", "value-2")
))
.proxy("proxy-key")
.secret("some-secret")
.url("http://tempurl.org/webhook")
.build())
.key("distribution-webhook")
.build());
}
}
import pulumi
import pulumi_artifactory as artifactory
distribution_webhook = artifactory.DistributionWebhook("distribution-webhook",
criteria=artifactory.DistributionWebhookCriteriaArgs(
any_release_bundle=False,
exclude_patterns=["bar/**"],
include_patterns=["foo/**"],
registered_release_bundle_names=["bundle-name"],
),
event_types=[
"distribute_started",
"distribute_completed",
"distribute_aborted",
"distribute_failed",
"delete_started",
"delete_completed",
"delete_failed",
],
handlers=[artifactory.DistributionWebhookHandlerArgs(
custom_http_headers={
"header-1": "value-1",
"header-2": "value-2",
},
proxy="proxy-key",
secret="some-secret",
url="http://tempurl.org/webhook",
)],
key="distribution-webhook")
import * as pulumi from "@pulumi/pulumi";
import * as artifactory from "@pulumi/artifactory";
const distribution_webhook = new artifactory.DistributionWebhook("distribution-webhook", {
criteria: {
anyReleaseBundle: false,
excludePatterns: ["bar/**"],
includePatterns: ["foo/**"],
registeredReleaseBundleNames: ["bundle-name"],
},
eventTypes: [
"distribute_started",
"distribute_completed",
"distribute_aborted",
"distribute_failed",
"delete_started",
"delete_completed",
"delete_failed",
],
handlers: [{
customHttpHeaders: {
"header-1": "value-1",
"header-2": "value-2",
},
proxy: "proxy-key",
secret: "some-secret",
url: "http://tempurl.org/webhook",
}],
key: "distribution-webhook",
});
resources:
distribution-webhook:
type: artifactory:DistributionWebhook
properties:
criteria:
anyReleaseBundle: false
excludePatterns:
- bar/**
includePatterns:
- foo/**
registeredReleaseBundleNames:
- bundle-name
eventTypes:
- distribute_started
- distribute_completed
- distribute_aborted
- distribute_failed
- delete_started
- delete_completed
- delete_failed
handlers:
- customHttpHeaders:
header-1: value-1
header-2: value-2
proxy: proxy-key
secret: some-secret
url: http://tempurl.org/webhook
key: distribution-webhook
Create DistributionWebhook Resource
new DistributionWebhook(name: string, args: DistributionWebhookArgs, opts?: CustomResourceOptions);
@overload
def DistributionWebhook(resource_name: str,
opts: Optional[ResourceOptions] = None,
criteria: Optional[DistributionWebhookCriteriaArgs] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
event_types: Optional[Sequence[str]] = None,
handlers: Optional[Sequence[DistributionWebhookHandlerArgs]] = None,
key: Optional[str] = None)
@overload
def DistributionWebhook(resource_name: str,
args: DistributionWebhookArgs,
opts: Optional[ResourceOptions] = None)
func NewDistributionWebhook(ctx *Context, name string, args DistributionWebhookArgs, opts ...ResourceOption) (*DistributionWebhook, error)
public DistributionWebhook(string name, DistributionWebhookArgs args, CustomResourceOptions? opts = null)
public DistributionWebhook(String name, DistributionWebhookArgs args)
public DistributionWebhook(String name, DistributionWebhookArgs args, CustomResourceOptions options)
type: artifactory:DistributionWebhook
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DistributionWebhookArgs
- 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 DistributionWebhookArgs
- 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 DistributionWebhookArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DistributionWebhookArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DistributionWebhookArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
DistributionWebhook 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 DistributionWebhook resource accepts the following input properties:
- Criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- Event
Types List<string> List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- Handlers
List<Distribution
Webhook Handler Args> At least one is required.
- Key string
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- Description string
Webhook description. Max length 1000 characters.
- Enabled bool
Status of webhook. Default to
true
.
- Criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- Event
Types []string List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- Handlers
[]Distribution
Webhook Handler Args At least one is required.
- Key string
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- Description string
Webhook description. Max length 1000 characters.
- Enabled bool
Status of webhook. Default to
true
.
- criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- event
Types List<String> List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- handlers
List<Distribution
Webhook Handler Args> At least one is required.
- key String
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- description String
Webhook description. Max length 1000 characters.
- enabled Boolean
Status of webhook. Default to
true
.
- criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- event
Types string[] List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- handlers
Distribution
Webhook Handler Args[] At least one is required.
- key string
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- description string
Webhook description. Max length 1000 characters.
- enabled boolean
Status of webhook. Default to
true
.
- criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- event_
types Sequence[str] List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- handlers
Sequence[Distribution
Webhook Handler Args] At least one is required.
- key str
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- description str
Webhook description. Max length 1000 characters.
- enabled bool
Status of webhook. Default to
true
.
- criteria Property Map
Specifies where the webhook will be applied on which repositories.
- event
Types List<String> List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- handlers List<Property Map>
At least one is required.
- key String
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- description String
Webhook description. Max length 1000 characters.
- enabled Boolean
Status of webhook. Default to
true
.
Outputs
All input properties are implicitly available as output properties. Additionally, the DistributionWebhook 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 DistributionWebhook Resource
Get an existing DistributionWebhook 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?: DistributionWebhookState, opts?: CustomResourceOptions): DistributionWebhook
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
criteria: Optional[DistributionWebhookCriteriaArgs] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
event_types: Optional[Sequence[str]] = None,
handlers: Optional[Sequence[DistributionWebhookHandlerArgs]] = None,
key: Optional[str] = None) -> DistributionWebhook
func GetDistributionWebhook(ctx *Context, name string, id IDInput, state *DistributionWebhookState, opts ...ResourceOption) (*DistributionWebhook, error)
public static DistributionWebhook Get(string name, Input<string> id, DistributionWebhookState? state, CustomResourceOptions? opts = null)
public static DistributionWebhook get(String name, Output<String> id, DistributionWebhookState 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.
- Criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- Description string
Webhook description. Max length 1000 characters.
- Enabled bool
Status of webhook. Default to
true
.- Event
Types List<string> List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- Handlers
List<Distribution
Webhook Handler Args> At least one is required.
- Key string
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- Criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- Description string
Webhook description. Max length 1000 characters.
- Enabled bool
Status of webhook. Default to
true
.- Event
Types []string List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- Handlers
[]Distribution
Webhook Handler Args At least one is required.
- Key string
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- description String
Webhook description. Max length 1000 characters.
- enabled Boolean
Status of webhook. Default to
true
.- event
Types List<String> List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- handlers
List<Distribution
Webhook Handler Args> At least one is required.
- key String
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- description string
Webhook description. Max length 1000 characters.
- enabled boolean
Status of webhook. Default to
true
.- event
Types string[] List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- handlers
Distribution
Webhook Handler Args[] At least one is required.
- key string
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- criteria
Distribution
Webhook Criteria Args Specifies where the webhook will be applied on which repositories.
- description str
Webhook description. Max length 1000 characters.
- enabled bool
Status of webhook. Default to
true
.- event_
types Sequence[str] List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- handlers
Sequence[Distribution
Webhook Handler Args] At least one is required.
- key str
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
- criteria Property Map
Specifies where the webhook will be applied on which repositories.
- description String
Webhook description. Max length 1000 characters.
- enabled Boolean
Status of webhook. Default to
true
.- event
Types List<String> List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values:
distribute_started
,distribute_completed
,distribute_aborted
,distribute_failed,
delete_started,
delete_completed,
delete_failed`- handlers List<Property Map>
At least one is required.
- key String
The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
Supporting Types
DistributionWebhookCriteria
- Any
Release boolBundle Trigger on any release bundle.
- Registered
Release List<string>Bundle Names Trigger on this list of release bundle names.
- Exclude
Patterns List<string> Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.- Include
Patterns List<string> Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.
- Any
Release boolBundle Trigger on any release bundle.
- Registered
Release []stringBundle Names Trigger on this list of release bundle names.
- Exclude
Patterns []string Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.- Include
Patterns []string Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.
- any
Release BooleanBundle Trigger on any release bundle.
- registered
Release List<String>Bundle Names Trigger on this list of release bundle names.
- exclude
Patterns List<String> Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.- include
Patterns List<String> Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.
- any
Release booleanBundle Trigger on any release bundle.
- registered
Release string[]Bundle Names Trigger on this list of release bundle names.
- exclude
Patterns string[] Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.- include
Patterns string[] Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.
- any_
release_ boolbundle Trigger on any release bundle.
- registered_
release_ Sequence[str]bundle_ names Trigger on this list of release bundle names.
- exclude_
patterns Sequence[str] Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.- include_
patterns Sequence[str] Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.
- any
Release BooleanBundle Trigger on any release bundle.
- registered
Release List<String>Bundle Names Trigger on this list of release bundle names.
- exclude
Patterns List<String> Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.- include
Patterns List<String> Simple comma separated wildcard patterns for repository artifact paths (with no leading slash). Ant-style path expressions are supported (*, **, ?). For example:
org/apache/**
.
DistributionWebhookHandler
- Url string
Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
- Custom
Http Dictionary<string, string>Headers Custom HTTP headers you wish to use to invoke the Webhook, comprise of key/value pair.
- Proxy string
Proxy key from Artifactory UI (Administration > Proxies > Configuration).
- Secret string
Secret authentication token that will be sent to the configured URL. The value will be sent as
x-jfrog-event-auth
header.
- Url string
Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
- Custom
Http map[string]stringHeaders Custom HTTP headers you wish to use to invoke the Webhook, comprise of key/value pair.
- Proxy string
Proxy key from Artifactory UI (Administration > Proxies > Configuration).
- Secret string
Secret authentication token that will be sent to the configured URL. The value will be sent as
x-jfrog-event-auth
header.
- url String
Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
- custom
Http Map<String,String>Headers Custom HTTP headers you wish to use to invoke the Webhook, comprise of key/value pair.
- proxy String
Proxy key from Artifactory UI (Administration > Proxies > Configuration).
- secret String
Secret authentication token that will be sent to the configured URL. The value will be sent as
x-jfrog-event-auth
header.
- url string
Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
- custom
Http {[key: string]: string}Headers Custom HTTP headers you wish to use to invoke the Webhook, comprise of key/value pair.
- proxy string
Proxy key from Artifactory UI (Administration > Proxies > Configuration).
- secret string
Secret authentication token that will be sent to the configured URL. The value will be sent as
x-jfrog-event-auth
header.
- url str
Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
- custom_
http_ Mapping[str, str]headers Custom HTTP headers you wish to use to invoke the Webhook, comprise of key/value pair.
- proxy str
Proxy key from Artifactory UI (Administration > Proxies > Configuration).
- secret str
Secret authentication token that will be sent to the configured URL. The value will be sent as
x-jfrog-event-auth
header.
- url String
Specifies the URL that the Webhook invokes. This will be the URL that Artifactory will send an HTTP POST request to.
- custom
Http Map<String>Headers Custom HTTP headers you wish to use to invoke the Webhook, comprise of key/value pair.
- proxy String
Proxy key from Artifactory UI (Administration > Proxies > Configuration).
- secret String
Secret authentication token that will be sent to the configured URL. The value will be sent as
x-jfrog-event-auth
header.
Package Details
- Repository
- artifactory pulumi/pulumi-artifactory
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
artifactory
Terraform Provider.