@pulumi/artifactory 4.1.0 → 4.2.0-alpha.1688687344

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,152 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ /**
5
+ * Provides an Artifactory custom 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.
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as artifactory from "@pulumi/artifactory";
12
+ *
13
+ * const my_generic_local = new artifactory.LocalGenericRepository("my-generic-local", {key: "my-generic-local"});
14
+ * const artifact_custom_webhook = new artifactory.ArtifactCustomWebhook("artifact-custom-webhook", {
15
+ * key: "artifact-custom-webhook",
16
+ * eventTypes: [
17
+ * "deployed",
18
+ * "deleted",
19
+ * "moved",
20
+ * "copied",
21
+ * ],
22
+ * criteria: {
23
+ * anyLocal: true,
24
+ * anyRemote: false,
25
+ * repoKeys: [my_generic_local.key],
26
+ * includePatterns: ["foo/**"],
27
+ * excludePatterns: ["bar/**"],
28
+ * },
29
+ * handlers: [{
30
+ * url: "https://tempurl.org",
31
+ * secrets: {
32
+ * secretName1: "value1",
33
+ * secretName2: "value2",
34
+ * },
35
+ * httpHeaders: {
36
+ * headerName1: "value1",
37
+ * headerName2: "value2",
38
+ * },
39
+ * payload: "{ \"ref\": \"main\" , \"inputs\": { \"artifact_path\": \"test-repo/repo-path\" } }",
40
+ * }],
41
+ * }, {
42
+ * dependsOn: [my_generic_local],
43
+ * });
44
+ * ```
45
+ */
46
+ export declare class ArtifactCustomWebhook extends pulumi.CustomResource {
47
+ /**
48
+ * Get an existing ArtifactCustomWebhook resource's state with the given name, ID, and optional extra
49
+ * properties used to qualify the lookup.
50
+ *
51
+ * @param name The _unique_ name of the resulting resource.
52
+ * @param id The _unique_ provider ID of the resource to lookup.
53
+ * @param state Any extra arguments used during the lookup.
54
+ * @param opts Optional settings to control the behavior of the CustomResource.
55
+ */
56
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ArtifactCustomWebhookState, opts?: pulumi.CustomResourceOptions): ArtifactCustomWebhook;
57
+ /**
58
+ * Returns true if the given object is an instance of ArtifactCustomWebhook. This is designed to work even
59
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
60
+ */
61
+ static isInstance(obj: any): obj is ArtifactCustomWebhook;
62
+ /**
63
+ * Specifies where the webhook will be applied on which repositories.
64
+ */
65
+ readonly criteria: pulumi.Output<outputs.ArtifactCustomWebhookCriteria>;
66
+ /**
67
+ * Webhook description. Max length 1000 characters.
68
+ */
69
+ readonly description: pulumi.Output<string | undefined>;
70
+ /**
71
+ * Status of webhook. Default to `true`.
72
+ */
73
+ readonly enabled: pulumi.Output<boolean | undefined>;
74
+ /**
75
+ * List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values: `deployed`, `deleted`, `moved`, `copied`, `cached`.
76
+ */
77
+ readonly eventTypes: pulumi.Output<string[]>;
78
+ /**
79
+ * At least one is required.
80
+ */
81
+ readonly handlers: pulumi.Output<outputs.ArtifactCustomWebhookHandler[]>;
82
+ /**
83
+ * The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
84
+ */
85
+ readonly key: pulumi.Output<string>;
86
+ /**
87
+ * Create a ArtifactCustomWebhook resource with the given unique name, arguments, and options.
88
+ *
89
+ * @param name The _unique_ name of the resource.
90
+ * @param args The arguments to use to populate this resource's properties.
91
+ * @param opts A bag of options that control this resource's behavior.
92
+ */
93
+ constructor(name: string, args: ArtifactCustomWebhookArgs, opts?: pulumi.CustomResourceOptions);
94
+ }
95
+ /**
96
+ * Input properties used for looking up and filtering ArtifactCustomWebhook resources.
97
+ */
98
+ export interface ArtifactCustomWebhookState {
99
+ /**
100
+ * Specifies where the webhook will be applied on which repositories.
101
+ */
102
+ criteria?: pulumi.Input<inputs.ArtifactCustomWebhookCriteria>;
103
+ /**
104
+ * Webhook description. Max length 1000 characters.
105
+ */
106
+ description?: pulumi.Input<string>;
107
+ /**
108
+ * Status of webhook. Default to `true`.
109
+ */
110
+ enabled?: pulumi.Input<boolean>;
111
+ /**
112
+ * List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values: `deployed`, `deleted`, `moved`, `copied`, `cached`.
113
+ */
114
+ eventTypes?: pulumi.Input<pulumi.Input<string>[]>;
115
+ /**
116
+ * At least one is required.
117
+ */
118
+ handlers?: pulumi.Input<pulumi.Input<inputs.ArtifactCustomWebhookHandler>[]>;
119
+ /**
120
+ * The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
121
+ */
122
+ key?: pulumi.Input<string>;
123
+ }
124
+ /**
125
+ * The set of arguments for constructing a ArtifactCustomWebhook resource.
126
+ */
127
+ export interface ArtifactCustomWebhookArgs {
128
+ /**
129
+ * Specifies where the webhook will be applied on which repositories.
130
+ */
131
+ criteria: pulumi.Input<inputs.ArtifactCustomWebhookCriteria>;
132
+ /**
133
+ * Webhook description. Max length 1000 characters.
134
+ */
135
+ description?: pulumi.Input<string>;
136
+ /**
137
+ * Status of webhook. Default to `true`.
138
+ */
139
+ enabled?: pulumi.Input<boolean>;
140
+ /**
141
+ * List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values: `deployed`, `deleted`, `moved`, `copied`, `cached`.
142
+ */
143
+ eventTypes: pulumi.Input<pulumi.Input<string>[]>;
144
+ /**
145
+ * At least one is required.
146
+ */
147
+ handlers: pulumi.Input<pulumi.Input<inputs.ArtifactCustomWebhookHandler>[]>;
148
+ /**
149
+ * The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
150
+ */
151
+ key: pulumi.Input<string>;
152
+ }
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ArtifactCustomWebhook = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Provides an Artifactory custom 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.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as artifactory from "@pulumi/artifactory";
16
+ *
17
+ * const my_generic_local = new artifactory.LocalGenericRepository("my-generic-local", {key: "my-generic-local"});
18
+ * const artifact_custom_webhook = new artifactory.ArtifactCustomWebhook("artifact-custom-webhook", {
19
+ * key: "artifact-custom-webhook",
20
+ * eventTypes: [
21
+ * "deployed",
22
+ * "deleted",
23
+ * "moved",
24
+ * "copied",
25
+ * ],
26
+ * criteria: {
27
+ * anyLocal: true,
28
+ * anyRemote: false,
29
+ * repoKeys: [my_generic_local.key],
30
+ * includePatterns: ["foo/**"],
31
+ * excludePatterns: ["bar/**"],
32
+ * },
33
+ * handlers: [{
34
+ * url: "https://tempurl.org",
35
+ * secrets: {
36
+ * secretName1: "value1",
37
+ * secretName2: "value2",
38
+ * },
39
+ * httpHeaders: {
40
+ * headerName1: "value1",
41
+ * headerName2: "value2",
42
+ * },
43
+ * payload: "{ \"ref\": \"main\" , \"inputs\": { \"artifact_path\": \"test-repo/repo-path\" } }",
44
+ * }],
45
+ * }, {
46
+ * dependsOn: [my_generic_local],
47
+ * });
48
+ * ```
49
+ */
50
+ class ArtifactCustomWebhook extends pulumi.CustomResource {
51
+ /**
52
+ * Get an existing ArtifactCustomWebhook resource's state with the given name, ID, and optional extra
53
+ * properties used to qualify the lookup.
54
+ *
55
+ * @param name The _unique_ name of the resulting resource.
56
+ * @param id The _unique_ provider ID of the resource to lookup.
57
+ * @param state Any extra arguments used during the lookup.
58
+ * @param opts Optional settings to control the behavior of the CustomResource.
59
+ */
60
+ static get(name, id, state, opts) {
61
+ return new ArtifactCustomWebhook(name, state, Object.assign(Object.assign({}, opts), { id: id }));
62
+ }
63
+ /**
64
+ * Returns true if the given object is an instance of ArtifactCustomWebhook. This is designed to work even
65
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
66
+ */
67
+ static isInstance(obj) {
68
+ if (obj === undefined || obj === null) {
69
+ return false;
70
+ }
71
+ return obj['__pulumiType'] === ArtifactCustomWebhook.__pulumiType;
72
+ }
73
+ constructor(name, argsOrState, opts) {
74
+ let resourceInputs = {};
75
+ opts = opts || {};
76
+ if (opts.id) {
77
+ const state = argsOrState;
78
+ resourceInputs["criteria"] = state ? state.criteria : undefined;
79
+ resourceInputs["description"] = state ? state.description : undefined;
80
+ resourceInputs["enabled"] = state ? state.enabled : undefined;
81
+ resourceInputs["eventTypes"] = state ? state.eventTypes : undefined;
82
+ resourceInputs["handlers"] = state ? state.handlers : undefined;
83
+ resourceInputs["key"] = state ? state.key : undefined;
84
+ }
85
+ else {
86
+ const args = argsOrState;
87
+ if ((!args || args.criteria === undefined) && !opts.urn) {
88
+ throw new Error("Missing required property 'criteria'");
89
+ }
90
+ if ((!args || args.eventTypes === undefined) && !opts.urn) {
91
+ throw new Error("Missing required property 'eventTypes'");
92
+ }
93
+ if ((!args || args.handlers === undefined) && !opts.urn) {
94
+ throw new Error("Missing required property 'handlers'");
95
+ }
96
+ if ((!args || args.key === undefined) && !opts.urn) {
97
+ throw new Error("Missing required property 'key'");
98
+ }
99
+ resourceInputs["criteria"] = args ? args.criteria : undefined;
100
+ resourceInputs["description"] = args ? args.description : undefined;
101
+ resourceInputs["enabled"] = args ? args.enabled : undefined;
102
+ resourceInputs["eventTypes"] = args ? args.eventTypes : undefined;
103
+ resourceInputs["handlers"] = args ? args.handlers : undefined;
104
+ resourceInputs["key"] = args ? args.key : undefined;
105
+ }
106
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
107
+ super(ArtifactCustomWebhook.__pulumiType, name, resourceInputs, opts);
108
+ }
109
+ }
110
+ exports.ArtifactCustomWebhook = ArtifactCustomWebhook;
111
+ /** @internal */
112
+ ArtifactCustomWebhook.__pulumiType = 'artifactory:index/artifactCustomWebhook:ArtifactCustomWebhook';
113
+ //# sourceMappingURL=artifactCustomWebhook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifactCustomWebhook.js","sourceRoot":"","sources":["../artifactCustomWebhook.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAa,qBAAsB,SAAQ,MAAM,CAAC,cAAc;IAC5D;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAkC,EAAE,IAAmC;QAChI,OAAO,IAAI,qBAAqB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC5E,CAAC;IAKD;;;OAGG;IACI,MAAM,CAAC,UAAU,CAAC,GAAQ;QAC7B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACnC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,GAAG,CAAC,cAAc,CAAC,KAAK,qBAAqB,CAAC,YAAY,CAAC;IACtE,CAAC;IAmCD,YAAY,IAAY,EAAE,WAAoE,EAAE,IAAmC;QAC/H,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAqD,CAAC;YACpE,cAAc,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,cAAc,CAAC,aAAa,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D;YACD,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,cAAc,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;YAC5D,cAAc,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;YAClE,cAAc,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YAC9D,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;SACvD;QACD,IAAI,GAAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,qBAAqB,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC1E,CAAC;;AA/FL,sDAgGC;AAlFG,gBAAgB;AACO,kCAAY,GAAG,+DAA+D,CAAC"}
@@ -0,0 +1,150 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ import * as inputs from "./types/input";
3
+ import * as outputs from "./types/output";
4
+ /**
5
+ * Provides an Artifactory custom 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.
6
+ *
7
+ * ## Example Usage
8
+ *
9
+ * ```typescript
10
+ * import * as pulumi from "@pulumi/pulumi";
11
+ * import * as artifactory from "@pulumi/artifactory";
12
+ *
13
+ * const my_generic_local = new artifactory.LocalGenericRepository("my-generic-local", {key: "my-generic-local"});
14
+ * const artifact_custom_webhook = new artifactory.ArtifactPropertyCustomWebhook("artifact-custom-webhook", {
15
+ * key: "artifact-property-custom-webhook",
16
+ * eventTypes: [
17
+ * "added",
18
+ * "deleted",
19
+ * ],
20
+ * criteria: {
21
+ * anyLocal: true,
22
+ * anyRemote: false,
23
+ * repoKeys: [my_generic_local.key],
24
+ * includePatterns: ["foo/**"],
25
+ * excludePatterns: ["bar/**"],
26
+ * },
27
+ * handlers: [{
28
+ * url: "https://tempurl.org",
29
+ * secrets: {
30
+ * secretName1: "value1",
31
+ * secretName2: "value2",
32
+ * },
33
+ * httpHeaders: {
34
+ * headerName1: "value1",
35
+ * headerName2: "value2",
36
+ * },
37
+ * payload: "{ \"ref\": \"main\" , \"inputs\": { \"artifact_path\": \"test-repo/repo-path\" } }",
38
+ * }],
39
+ * }, {
40
+ * dependsOn: [my_generic_local],
41
+ * });
42
+ * ```
43
+ */
44
+ export declare class ArtifactPropertyCustomWebhook extends pulumi.CustomResource {
45
+ /**
46
+ * Get an existing ArtifactPropertyCustomWebhook resource's state with the given name, ID, and optional extra
47
+ * properties used to qualify the lookup.
48
+ *
49
+ * @param name The _unique_ name of the resulting resource.
50
+ * @param id The _unique_ provider ID of the resource to lookup.
51
+ * @param state Any extra arguments used during the lookup.
52
+ * @param opts Optional settings to control the behavior of the CustomResource.
53
+ */
54
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ArtifactPropertyCustomWebhookState, opts?: pulumi.CustomResourceOptions): ArtifactPropertyCustomWebhook;
55
+ /**
56
+ * Returns true if the given object is an instance of ArtifactPropertyCustomWebhook. This is designed to work even
57
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
58
+ */
59
+ static isInstance(obj: any): obj is ArtifactPropertyCustomWebhook;
60
+ /**
61
+ * Specifies where the webhook will be applied on which repositories.
62
+ */
63
+ readonly criteria: pulumi.Output<outputs.ArtifactPropertyCustomWebhookCriteria>;
64
+ /**
65
+ * Webhook description. Max length 1000 characters.
66
+ */
67
+ readonly description: pulumi.Output<string | undefined>;
68
+ /**
69
+ * Status of webhook. Default to `true`.
70
+ */
71
+ readonly enabled: pulumi.Output<boolean | undefined>;
72
+ /**
73
+ * List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values: `added`, `deleted`.
74
+ */
75
+ readonly eventTypes: pulumi.Output<string[]>;
76
+ /**
77
+ * At least one is required.
78
+ */
79
+ readonly handlers: pulumi.Output<outputs.ArtifactPropertyCustomWebhookHandler[]>;
80
+ /**
81
+ * The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
82
+ */
83
+ readonly key: pulumi.Output<string>;
84
+ /**
85
+ * Create a ArtifactPropertyCustomWebhook resource with the given unique name, arguments, and options.
86
+ *
87
+ * @param name The _unique_ name of the resource.
88
+ * @param args The arguments to use to populate this resource's properties.
89
+ * @param opts A bag of options that control this resource's behavior.
90
+ */
91
+ constructor(name: string, args: ArtifactPropertyCustomWebhookArgs, opts?: pulumi.CustomResourceOptions);
92
+ }
93
+ /**
94
+ * Input properties used for looking up and filtering ArtifactPropertyCustomWebhook resources.
95
+ */
96
+ export interface ArtifactPropertyCustomWebhookState {
97
+ /**
98
+ * Specifies where the webhook will be applied on which repositories.
99
+ */
100
+ criteria?: pulumi.Input<inputs.ArtifactPropertyCustomWebhookCriteria>;
101
+ /**
102
+ * Webhook description. Max length 1000 characters.
103
+ */
104
+ description?: pulumi.Input<string>;
105
+ /**
106
+ * Status of webhook. Default to `true`.
107
+ */
108
+ enabled?: pulumi.Input<boolean>;
109
+ /**
110
+ * List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values: `added`, `deleted`.
111
+ */
112
+ eventTypes?: pulumi.Input<pulumi.Input<string>[]>;
113
+ /**
114
+ * At least one is required.
115
+ */
116
+ handlers?: pulumi.Input<pulumi.Input<inputs.ArtifactPropertyCustomWebhookHandler>[]>;
117
+ /**
118
+ * The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
119
+ */
120
+ key?: pulumi.Input<string>;
121
+ }
122
+ /**
123
+ * The set of arguments for constructing a ArtifactPropertyCustomWebhook resource.
124
+ */
125
+ export interface ArtifactPropertyCustomWebhookArgs {
126
+ /**
127
+ * Specifies where the webhook will be applied on which repositories.
128
+ */
129
+ criteria: pulumi.Input<inputs.ArtifactPropertyCustomWebhookCriteria>;
130
+ /**
131
+ * Webhook description. Max length 1000 characters.
132
+ */
133
+ description?: pulumi.Input<string>;
134
+ /**
135
+ * Status of webhook. Default to `true`.
136
+ */
137
+ enabled?: pulumi.Input<boolean>;
138
+ /**
139
+ * List of Events in Artifactory, Distribution, Release Bundle that function as the event trigger for the Webhook. Allow values: `added`, `deleted`.
140
+ */
141
+ eventTypes: pulumi.Input<pulumi.Input<string>[]>;
142
+ /**
143
+ * At least one is required.
144
+ */
145
+ handlers: pulumi.Input<pulumi.Input<inputs.ArtifactPropertyCustomWebhookHandler>[]>;
146
+ /**
147
+ * The identity key of the webhook. Must be between 2 and 200 characters. Cannot contain spaces.
148
+ */
149
+ key: pulumi.Input<string>;
150
+ }
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ // *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ // *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ArtifactPropertyCustomWebhook = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * Provides an Artifactory custom 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.
10
+ *
11
+ * ## Example Usage
12
+ *
13
+ * ```typescript
14
+ * import * as pulumi from "@pulumi/pulumi";
15
+ * import * as artifactory from "@pulumi/artifactory";
16
+ *
17
+ * const my_generic_local = new artifactory.LocalGenericRepository("my-generic-local", {key: "my-generic-local"});
18
+ * const artifact_custom_webhook = new artifactory.ArtifactPropertyCustomWebhook("artifact-custom-webhook", {
19
+ * key: "artifact-property-custom-webhook",
20
+ * eventTypes: [
21
+ * "added",
22
+ * "deleted",
23
+ * ],
24
+ * criteria: {
25
+ * anyLocal: true,
26
+ * anyRemote: false,
27
+ * repoKeys: [my_generic_local.key],
28
+ * includePatterns: ["foo/**"],
29
+ * excludePatterns: ["bar/**"],
30
+ * },
31
+ * handlers: [{
32
+ * url: "https://tempurl.org",
33
+ * secrets: {
34
+ * secretName1: "value1",
35
+ * secretName2: "value2",
36
+ * },
37
+ * httpHeaders: {
38
+ * headerName1: "value1",
39
+ * headerName2: "value2",
40
+ * },
41
+ * payload: "{ \"ref\": \"main\" , \"inputs\": { \"artifact_path\": \"test-repo/repo-path\" } }",
42
+ * }],
43
+ * }, {
44
+ * dependsOn: [my_generic_local],
45
+ * });
46
+ * ```
47
+ */
48
+ class ArtifactPropertyCustomWebhook extends pulumi.CustomResource {
49
+ /**
50
+ * Get an existing ArtifactPropertyCustomWebhook resource's state with the given name, ID, and optional extra
51
+ * properties used to qualify the lookup.
52
+ *
53
+ * @param name The _unique_ name of the resulting resource.
54
+ * @param id The _unique_ provider ID of the resource to lookup.
55
+ * @param state Any extra arguments used during the lookup.
56
+ * @param opts Optional settings to control the behavior of the CustomResource.
57
+ */
58
+ static get(name, id, state, opts) {
59
+ return new ArtifactPropertyCustomWebhook(name, state, Object.assign(Object.assign({}, opts), { id: id }));
60
+ }
61
+ /**
62
+ * Returns true if the given object is an instance of ArtifactPropertyCustomWebhook. This is designed to work even
63
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
64
+ */
65
+ static isInstance(obj) {
66
+ if (obj === undefined || obj === null) {
67
+ return false;
68
+ }
69
+ return obj['__pulumiType'] === ArtifactPropertyCustomWebhook.__pulumiType;
70
+ }
71
+ constructor(name, argsOrState, opts) {
72
+ let resourceInputs = {};
73
+ opts = opts || {};
74
+ if (opts.id) {
75
+ const state = argsOrState;
76
+ resourceInputs["criteria"] = state ? state.criteria : undefined;
77
+ resourceInputs["description"] = state ? state.description : undefined;
78
+ resourceInputs["enabled"] = state ? state.enabled : undefined;
79
+ resourceInputs["eventTypes"] = state ? state.eventTypes : undefined;
80
+ resourceInputs["handlers"] = state ? state.handlers : undefined;
81
+ resourceInputs["key"] = state ? state.key : undefined;
82
+ }
83
+ else {
84
+ const args = argsOrState;
85
+ if ((!args || args.criteria === undefined) && !opts.urn) {
86
+ throw new Error("Missing required property 'criteria'");
87
+ }
88
+ if ((!args || args.eventTypes === undefined) && !opts.urn) {
89
+ throw new Error("Missing required property 'eventTypes'");
90
+ }
91
+ if ((!args || args.handlers === undefined) && !opts.urn) {
92
+ throw new Error("Missing required property 'handlers'");
93
+ }
94
+ if ((!args || args.key === undefined) && !opts.urn) {
95
+ throw new Error("Missing required property 'key'");
96
+ }
97
+ resourceInputs["criteria"] = args ? args.criteria : undefined;
98
+ resourceInputs["description"] = args ? args.description : undefined;
99
+ resourceInputs["enabled"] = args ? args.enabled : undefined;
100
+ resourceInputs["eventTypes"] = args ? args.eventTypes : undefined;
101
+ resourceInputs["handlers"] = args ? args.handlers : undefined;
102
+ resourceInputs["key"] = args ? args.key : undefined;
103
+ }
104
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
105
+ super(ArtifactPropertyCustomWebhook.__pulumiType, name, resourceInputs, opts);
106
+ }
107
+ }
108
+ exports.ArtifactPropertyCustomWebhook = ArtifactPropertyCustomWebhook;
109
+ /** @internal */
110
+ ArtifactPropertyCustomWebhook.__pulumiType = 'artifactory:index/artifactPropertyCustomWebhook:ArtifactPropertyCustomWebhook';
111
+ //# sourceMappingURL=artifactPropertyCustomWebhook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"artifactPropertyCustomWebhook.js","sourceRoot":"","sources":["../artifactPropertyCustomWebhook.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AAGzC,yCAAyC;AAEzC;;;;;;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