@checkly/pulumi 0.0.1-alpha.0
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.
- package/Pulumi.yaml +0 -0
- package/README.md +4 -0
- package/alertChannel.ts +321 -0
- package/bin/LICENSE +21 -0
- package/bin/README.md +90 -0
- package/bin/alertChannel.d.ts +266 -0
- package/bin/alertChannel.js +204 -0
- package/bin/alertChannel.js.map +1 -0
- package/bin/check.d.ts +328 -0
- package/bin/check.js +110 -0
- package/bin/check.js.map +1 -0
- package/bin/checkGroup.d.ts +238 -0
- package/bin/checkGroup.js +93 -0
- package/bin/checkGroup.js.map +1 -0
- package/bin/config/index.d.ts +1 -0
- package/bin/config/index.js +21 -0
- package/bin/config/index.js.map +1 -0
- package/bin/config/vars.d.ts +3 -0
- package/bin/config/vars.js +25 -0
- package/bin/config/vars.js.map +1 -0
- package/bin/dashboard.d.ts +66 -0
- package/bin/dashboard.js +93 -0
- package/bin/dashboard.js.map +1 -0
- package/bin/index.d.ts +12 -0
- package/bin/index.js +89 -0
- package/bin/index.js.map +1 -0
- package/bin/maintenanceWindow.d.ts +157 -0
- package/bin/maintenanceWindow.js +115 -0
- package/bin/maintenanceWindow.js.map +1 -0
- package/bin/package.json +28 -0
- package/bin/package.json.bak +28 -0
- package/bin/provider.d.ts +33 -0
- package/bin/provider.js +52 -0
- package/bin/provider.js.map +1 -0
- package/bin/snippet.d.ts +60 -0
- package/bin/snippet.js +56 -0
- package/bin/snippet.js.map +1 -0
- package/bin/triggerCheck.d.ts +71 -0
- package/bin/triggerCheck.js +75 -0
- package/bin/triggerCheck.js.map +1 -0
- package/bin/triggerCheckGroup.d.ts +71 -0
- package/bin/triggerCheckGroup.js +75 -0
- package/bin/triggerCheckGroup.js.map +1 -0
- package/bin/types/index.d.ts +3 -0
- package/bin/types/index.js +11 -0
- package/bin/types/index.js.map +1 -0
- package/bin/types/input.d.ts +330 -0
- package/bin/types/input.js +14 -0
- package/bin/types/input.js.map +1 -0
- package/bin/types/output.d.ts +329 -0
- package/bin/types/output.js +14 -0
- package/bin/types/output.js.map +1 -0
- package/bin/utilities.d.ts +4 -0
- package/bin/utilities.js +52 -0
- package/bin/utilities.js.map +1 -0
- package/bin/yarn.lock +743 -0
- package/check.ts +416 -0
- package/checkGroup.ts +308 -0
- package/config/index.ts +5 -0
- package/config/vars.ts +33 -0
- package/dashboard.ts +143 -0
- package/index.ts +81 -0
- package/maintenanceWindow.ts +219 -0
- package/package.json +28 -0
- package/provider.ts +64 -0
- package/snippet.ts +100 -0
- package/triggerCheck.ts +113 -0
- package/triggerCheckGroup.ts +113 -0
- package/tsconfig.json +33 -0
- package/types/index.ts +11 -0
- package/types/input.ts +352 -0
- package/types/output.ts +353 -0
- package/utilities.ts +49 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "./utilities";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* ## # checkly.MaintenanceWindow
|
|
9
|
+
*
|
|
10
|
+
* `checkly.MaintenanceWindow` allows users to manage Checkly maintenance windows. Add a `checkly.MaintenanceWindow` resource to your resource file.
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* Minimal maintenance windows example
|
|
15
|
+
*
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
+
* import * as checkly from "@pulumi/checkly";
|
|
19
|
+
*
|
|
20
|
+
* const maintenance_1 = new checkly.MaintenanceWindow("maintenance-1", {
|
|
21
|
+
* endsAt: "2014-08-25T00:00:00.000Z",
|
|
22
|
+
* repeatUnit: "MONTH",
|
|
23
|
+
* startsAt: "2014-08-24T00:00:00.000Z",
|
|
24
|
+
* tags: ["auto"],
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* Full maintenance windows example (includes optional fields)
|
|
29
|
+
*
|
|
30
|
+
* ```typescript
|
|
31
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
32
|
+
* import * as checkly from "@pulumi/checkly";
|
|
33
|
+
*
|
|
34
|
+
* const maintenance_1 = new checkly.MaintenanceWindow("maintenance-1", {
|
|
35
|
+
* endsAt: "2014-08-25T00:00:00.000Z",
|
|
36
|
+
* repeatEndsAt: "2014-08-24T00:00:00.000Z",
|
|
37
|
+
* repeatInterval: 1,
|
|
38
|
+
* repeatUnit: "MONTH",
|
|
39
|
+
* startsAt: "2014-08-24T00:00:00.000Z",
|
|
40
|
+
* tags: ["auto"],
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export class MaintenanceWindow extends pulumi.CustomResource {
|
|
45
|
+
/**
|
|
46
|
+
* Get an existing MaintenanceWindow 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
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: MaintenanceWindowState, opts?: pulumi.CustomResourceOptions): MaintenanceWindow {
|
|
55
|
+
return new MaintenanceWindow(name, <any>state, { ...opts, id: id });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
public static readonly __pulumiType = 'checkly:index/maintenanceWindow:MaintenanceWindow';
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Returns true if the given object is an instance of MaintenanceWindow. This is designed to work even
|
|
63
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
64
|
+
*/
|
|
65
|
+
public static isInstance(obj: any): obj is MaintenanceWindow {
|
|
66
|
+
if (obj === undefined || obj === null) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return obj['__pulumiType'] === MaintenanceWindow.__pulumiType;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The end date of the maintenance window.
|
|
74
|
+
*/
|
|
75
|
+
public readonly endsAt!: pulumi.Output<string>;
|
|
76
|
+
/**
|
|
77
|
+
* The maintenance window name.
|
|
78
|
+
*/
|
|
79
|
+
public readonly name!: pulumi.Output<string>;
|
|
80
|
+
/**
|
|
81
|
+
* The end date where the maintenance window should stop repeating.
|
|
82
|
+
*/
|
|
83
|
+
public readonly repeatEndsAt!: pulumi.Output<string>;
|
|
84
|
+
/**
|
|
85
|
+
* The repeat interval of the maintenance window from the first occurance.
|
|
86
|
+
*/
|
|
87
|
+
public readonly repeatInterval!: pulumi.Output<number>;
|
|
88
|
+
/**
|
|
89
|
+
* The repeat strategy for the maintenance window. Possible values `DAY`, `WEEK` and `MONTH`.
|
|
90
|
+
*/
|
|
91
|
+
public readonly repeatUnit!: pulumi.Output<string>;
|
|
92
|
+
/**
|
|
93
|
+
* The start date of the maintenance window.
|
|
94
|
+
*/
|
|
95
|
+
public readonly startsAt!: pulumi.Output<string>;
|
|
96
|
+
/**
|
|
97
|
+
* The names of the checks and groups maintenance window should apply to.
|
|
98
|
+
*/
|
|
99
|
+
public readonly tags!: pulumi.Output<string[] | undefined>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Create a MaintenanceWindow resource with the given unique name, arguments, and options.
|
|
103
|
+
*
|
|
104
|
+
* @param name The _unique_ name of the resource.
|
|
105
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
106
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
107
|
+
*/
|
|
108
|
+
constructor(name: string, args: MaintenanceWindowArgs, opts?: pulumi.CustomResourceOptions)
|
|
109
|
+
constructor(name: string, argsOrState?: MaintenanceWindowArgs | MaintenanceWindowState, opts?: pulumi.CustomResourceOptions) {
|
|
110
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
111
|
+
opts = opts || {};
|
|
112
|
+
if (opts.id) {
|
|
113
|
+
const state = argsOrState as MaintenanceWindowState | undefined;
|
|
114
|
+
resourceInputs["endsAt"] = state ? state.endsAt : undefined;
|
|
115
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
116
|
+
resourceInputs["repeatEndsAt"] = state ? state.repeatEndsAt : undefined;
|
|
117
|
+
resourceInputs["repeatInterval"] = state ? state.repeatInterval : undefined;
|
|
118
|
+
resourceInputs["repeatUnit"] = state ? state.repeatUnit : undefined;
|
|
119
|
+
resourceInputs["startsAt"] = state ? state.startsAt : undefined;
|
|
120
|
+
resourceInputs["tags"] = state ? state.tags : undefined;
|
|
121
|
+
} else {
|
|
122
|
+
const args = argsOrState as MaintenanceWindowArgs | undefined;
|
|
123
|
+
if ((!args || args.endsAt === undefined) && !opts.urn) {
|
|
124
|
+
throw new Error("Missing required property 'endsAt'");
|
|
125
|
+
}
|
|
126
|
+
if ((!args || args.repeatEndsAt === undefined) && !opts.urn) {
|
|
127
|
+
throw new Error("Missing required property 'repeatEndsAt'");
|
|
128
|
+
}
|
|
129
|
+
if ((!args || args.repeatInterval === undefined) && !opts.urn) {
|
|
130
|
+
throw new Error("Missing required property 'repeatInterval'");
|
|
131
|
+
}
|
|
132
|
+
if ((!args || args.repeatUnit === undefined) && !opts.urn) {
|
|
133
|
+
throw new Error("Missing required property 'repeatUnit'");
|
|
134
|
+
}
|
|
135
|
+
if ((!args || args.startsAt === undefined) && !opts.urn) {
|
|
136
|
+
throw new Error("Missing required property 'startsAt'");
|
|
137
|
+
}
|
|
138
|
+
resourceInputs["endsAt"] = args ? args.endsAt : undefined;
|
|
139
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
140
|
+
resourceInputs["repeatEndsAt"] = args ? args.repeatEndsAt : undefined;
|
|
141
|
+
resourceInputs["repeatInterval"] = args ? args.repeatInterval : undefined;
|
|
142
|
+
resourceInputs["repeatUnit"] = args ? args.repeatUnit : undefined;
|
|
143
|
+
resourceInputs["startsAt"] = args ? args.startsAt : undefined;
|
|
144
|
+
resourceInputs["tags"] = args ? args.tags : undefined;
|
|
145
|
+
}
|
|
146
|
+
if (!opts.version) {
|
|
147
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
148
|
+
}
|
|
149
|
+
super(MaintenanceWindow.__pulumiType, name, resourceInputs, opts);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Input properties used for looking up and filtering MaintenanceWindow resources.
|
|
155
|
+
*/
|
|
156
|
+
export interface MaintenanceWindowState {
|
|
157
|
+
/**
|
|
158
|
+
* The end date of the maintenance window.
|
|
159
|
+
*/
|
|
160
|
+
endsAt?: pulumi.Input<string>;
|
|
161
|
+
/**
|
|
162
|
+
* The maintenance window name.
|
|
163
|
+
*/
|
|
164
|
+
name?: pulumi.Input<string>;
|
|
165
|
+
/**
|
|
166
|
+
* The end date where the maintenance window should stop repeating.
|
|
167
|
+
*/
|
|
168
|
+
repeatEndsAt?: pulumi.Input<string>;
|
|
169
|
+
/**
|
|
170
|
+
* The repeat interval of the maintenance window from the first occurance.
|
|
171
|
+
*/
|
|
172
|
+
repeatInterval?: pulumi.Input<number>;
|
|
173
|
+
/**
|
|
174
|
+
* The repeat strategy for the maintenance window. Possible values `DAY`, `WEEK` and `MONTH`.
|
|
175
|
+
*/
|
|
176
|
+
repeatUnit?: pulumi.Input<string>;
|
|
177
|
+
/**
|
|
178
|
+
* The start date of the maintenance window.
|
|
179
|
+
*/
|
|
180
|
+
startsAt?: pulumi.Input<string>;
|
|
181
|
+
/**
|
|
182
|
+
* The names of the checks and groups maintenance window should apply to.
|
|
183
|
+
*/
|
|
184
|
+
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* The set of arguments for constructing a MaintenanceWindow resource.
|
|
189
|
+
*/
|
|
190
|
+
export interface MaintenanceWindowArgs {
|
|
191
|
+
/**
|
|
192
|
+
* The end date of the maintenance window.
|
|
193
|
+
*/
|
|
194
|
+
endsAt: pulumi.Input<string>;
|
|
195
|
+
/**
|
|
196
|
+
* The maintenance window name.
|
|
197
|
+
*/
|
|
198
|
+
name?: pulumi.Input<string>;
|
|
199
|
+
/**
|
|
200
|
+
* The end date where the maintenance window should stop repeating.
|
|
201
|
+
*/
|
|
202
|
+
repeatEndsAt: pulumi.Input<string>;
|
|
203
|
+
/**
|
|
204
|
+
* The repeat interval of the maintenance window from the first occurance.
|
|
205
|
+
*/
|
|
206
|
+
repeatInterval: pulumi.Input<number>;
|
|
207
|
+
/**
|
|
208
|
+
* The repeat strategy for the maintenance window. Possible values `DAY`, `WEEK` and `MONTH`.
|
|
209
|
+
*/
|
|
210
|
+
repeatUnit: pulumi.Input<string>;
|
|
211
|
+
/**
|
|
212
|
+
* The start date of the maintenance window.
|
|
213
|
+
*/
|
|
214
|
+
startsAt: pulumi.Input<string>;
|
|
215
|
+
/**
|
|
216
|
+
* The names of the checks and groups maintenance window should apply to.
|
|
217
|
+
*/
|
|
218
|
+
tags?: pulumi.Input<pulumi.Input<string>[]>;
|
|
219
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@checkly/pulumi",
|
|
3
|
+
"version": "0.0.1-alpha.0",
|
|
4
|
+
"description": "A Pulumi package for creating and managing Checkly monitoring resources.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pulumi",
|
|
7
|
+
"checkly",
|
|
8
|
+
"category/monitoring"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://www.pulumi.com",
|
|
11
|
+
"repository": "https://github.com/checkly/pulumi-checkly",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@pulumi/pulumi": "^3.0.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/mime": "^2.0.0",
|
|
21
|
+
"@types/node": "^10.0.0",
|
|
22
|
+
"typescript": "^4.3.5"
|
|
23
|
+
},
|
|
24
|
+
"pulumi": {
|
|
25
|
+
"resource": true,
|
|
26
|
+
"pluginDownloadURL": "0.0.1-alpha.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
package/provider.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "./utilities";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The provider type for the checkly package. By default, resources use package-wide configuration
|
|
9
|
+
* settings, however an explicit `Provider` instance may be created and passed during resource
|
|
10
|
+
* construction to achieve fine-grained programmatic control over provider settings. See the
|
|
11
|
+
* [documentation](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
|
|
12
|
+
*/
|
|
13
|
+
export class Provider extends pulumi.ProviderResource {
|
|
14
|
+
/** @internal */
|
|
15
|
+
public static readonly __pulumiType = 'checkly';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Returns true if the given object is an instance of Provider. This is designed to work even
|
|
19
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
20
|
+
*/
|
|
21
|
+
public static isInstance(obj: any): obj is Provider {
|
|
22
|
+
if (obj === undefined || obj === null) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
return obj['__pulumiType'] === Provider.__pulumiType;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public readonly accountId!: pulumi.Output<string | undefined>;
|
|
29
|
+
public readonly apiKey!: pulumi.Output<string>;
|
|
30
|
+
public readonly apiUrl!: pulumi.Output<string | undefined>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Create a Provider resource with the given unique name, arguments, and options.
|
|
34
|
+
*
|
|
35
|
+
* @param name The _unique_ name of the resource.
|
|
36
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
37
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
38
|
+
*/
|
|
39
|
+
constructor(name: string, args: ProviderArgs, opts?: pulumi.ResourceOptions) {
|
|
40
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
41
|
+
opts = opts || {};
|
|
42
|
+
{
|
|
43
|
+
if ((!args || args.apiKey === undefined) && !opts.urn) {
|
|
44
|
+
throw new Error("Missing required property 'apiKey'");
|
|
45
|
+
}
|
|
46
|
+
resourceInputs["accountId"] = args ? args.accountId : undefined;
|
|
47
|
+
resourceInputs["apiKey"] = args ? args.apiKey : undefined;
|
|
48
|
+
resourceInputs["apiUrl"] = args ? args.apiUrl : undefined;
|
|
49
|
+
}
|
|
50
|
+
if (!opts.version) {
|
|
51
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
52
|
+
}
|
|
53
|
+
super(Provider.__pulumiType, name, resourceInputs, opts);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The set of arguments for constructing a Provider resource.
|
|
59
|
+
*/
|
|
60
|
+
export interface ProviderArgs {
|
|
61
|
+
accountId?: pulumi.Input<string>;
|
|
62
|
+
apiKey: pulumi.Input<string>;
|
|
63
|
+
apiUrl?: pulumi.Input<string>;
|
|
64
|
+
}
|
package/snippet.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "./utilities";
|
|
6
|
+
|
|
7
|
+
export class Snippet extends pulumi.CustomResource {
|
|
8
|
+
/**
|
|
9
|
+
* Get an existing Snippet resource's state with the given name, ID, and optional extra
|
|
10
|
+
* properties used to qualify the lookup.
|
|
11
|
+
*
|
|
12
|
+
* @param name The _unique_ name of the resulting resource.
|
|
13
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
14
|
+
* @param state Any extra arguments used during the lookup.
|
|
15
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
16
|
+
*/
|
|
17
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SnippetState, opts?: pulumi.CustomResourceOptions): Snippet {
|
|
18
|
+
return new Snippet(name, <any>state, { ...opts, id: id });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
public static readonly __pulumiType = 'checkly:index/snippet:Snippet';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Returns true if the given object is an instance of Snippet. This is designed to work even
|
|
26
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
27
|
+
*/
|
|
28
|
+
public static isInstance(obj: any): obj is Snippet {
|
|
29
|
+
if (obj === undefined || obj === null) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
return obj['__pulumiType'] === Snippet.__pulumiType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The name of the snippet.
|
|
37
|
+
*/
|
|
38
|
+
public readonly name!: pulumi.Output<string>;
|
|
39
|
+
/**
|
|
40
|
+
* Your Node.js code that interacts with the API check lifecycle, or functions as a partial for browser checks.
|
|
41
|
+
*/
|
|
42
|
+
public readonly script!: pulumi.Output<string>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Create a Snippet resource with the given unique name, arguments, and options.
|
|
46
|
+
*
|
|
47
|
+
* @param name The _unique_ name of the resource.
|
|
48
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
49
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
50
|
+
*/
|
|
51
|
+
constructor(name: string, args: SnippetArgs, opts?: pulumi.CustomResourceOptions)
|
|
52
|
+
constructor(name: string, argsOrState?: SnippetArgs | SnippetState, opts?: pulumi.CustomResourceOptions) {
|
|
53
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
54
|
+
opts = opts || {};
|
|
55
|
+
if (opts.id) {
|
|
56
|
+
const state = argsOrState as SnippetState | undefined;
|
|
57
|
+
resourceInputs["name"] = state ? state.name : undefined;
|
|
58
|
+
resourceInputs["script"] = state ? state.script : undefined;
|
|
59
|
+
} else {
|
|
60
|
+
const args = argsOrState as SnippetArgs | undefined;
|
|
61
|
+
if ((!args || args.script === undefined) && !opts.urn) {
|
|
62
|
+
throw new Error("Missing required property 'script'");
|
|
63
|
+
}
|
|
64
|
+
resourceInputs["name"] = args ? args.name : undefined;
|
|
65
|
+
resourceInputs["script"] = args ? args.script : undefined;
|
|
66
|
+
}
|
|
67
|
+
if (!opts.version) {
|
|
68
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
69
|
+
}
|
|
70
|
+
super(Snippet.__pulumiType, name, resourceInputs, opts);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Input properties used for looking up and filtering Snippet resources.
|
|
76
|
+
*/
|
|
77
|
+
export interface SnippetState {
|
|
78
|
+
/**
|
|
79
|
+
* The name of the snippet.
|
|
80
|
+
*/
|
|
81
|
+
name?: pulumi.Input<string>;
|
|
82
|
+
/**
|
|
83
|
+
* Your Node.js code that interacts with the API check lifecycle, or functions as a partial for browser checks.
|
|
84
|
+
*/
|
|
85
|
+
script?: pulumi.Input<string>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The set of arguments for constructing a Snippet resource.
|
|
90
|
+
*/
|
|
91
|
+
export interface SnippetArgs {
|
|
92
|
+
/**
|
|
93
|
+
* The name of the snippet.
|
|
94
|
+
*/
|
|
95
|
+
name?: pulumi.Input<string>;
|
|
96
|
+
/**
|
|
97
|
+
* Your Node.js code that interacts with the API check lifecycle, or functions as a partial for browser checks.
|
|
98
|
+
*/
|
|
99
|
+
script: pulumi.Input<string>;
|
|
100
|
+
}
|
package/triggerCheck.ts
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "./utilities";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* ## # checkly.TriggerCheck
|
|
9
|
+
*
|
|
10
|
+
* `checkly.TriggerCheck` allows users to manage Checkly trigger checks. Add a `checkly.TriggerCheck` resource to your resource file.
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* Trigger check example
|
|
15
|
+
*
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
+
* import * as checkly from "@pulumi/checkly";
|
|
19
|
+
*
|
|
20
|
+
* const test_trigger_check = new checkly.TriggerCheck("test-trigger-check", {checkId: "c1ff95c5-d7f6-4a90-9ce2-1e605f117592"});
|
|
21
|
+
* export const test_trigger_check_url = test_trigger_check.url;
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export class TriggerCheck extends pulumi.CustomResource {
|
|
25
|
+
/**
|
|
26
|
+
* Get an existing TriggerCheck resource's state with the given name, ID, and optional extra
|
|
27
|
+
* properties used to qualify the lookup.
|
|
28
|
+
*
|
|
29
|
+
* @param name The _unique_ name of the resulting resource.
|
|
30
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
31
|
+
* @param state Any extra arguments used during the lookup.
|
|
32
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
33
|
+
*/
|
|
34
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TriggerCheckState, opts?: pulumi.CustomResourceOptions): TriggerCheck {
|
|
35
|
+
return new TriggerCheck(name, <any>state, { ...opts, id: id });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
public static readonly __pulumiType = 'checkly:index/triggerCheck:TriggerCheck';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns true if the given object is an instance of TriggerCheck. This is designed to work even
|
|
43
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
44
|
+
*/
|
|
45
|
+
public static isInstance(obj: any): obj is TriggerCheck {
|
|
46
|
+
if (obj === undefined || obj === null) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return obj['__pulumiType'] === TriggerCheck.__pulumiType;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The id of the check that you want to attach the trigger to.
|
|
54
|
+
*/
|
|
55
|
+
public readonly checkId!: pulumi.Output<string>;
|
|
56
|
+
public readonly token!: pulumi.Output<string>;
|
|
57
|
+
public readonly url!: pulumi.Output<string>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Create a TriggerCheck resource with the given unique name, arguments, and options.
|
|
61
|
+
*
|
|
62
|
+
* @param name The _unique_ name of the resource.
|
|
63
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
64
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
65
|
+
*/
|
|
66
|
+
constructor(name: string, args: TriggerCheckArgs, opts?: pulumi.CustomResourceOptions)
|
|
67
|
+
constructor(name: string, argsOrState?: TriggerCheckArgs | TriggerCheckState, opts?: pulumi.CustomResourceOptions) {
|
|
68
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
69
|
+
opts = opts || {};
|
|
70
|
+
if (opts.id) {
|
|
71
|
+
const state = argsOrState as TriggerCheckState | undefined;
|
|
72
|
+
resourceInputs["checkId"] = state ? state.checkId : undefined;
|
|
73
|
+
resourceInputs["token"] = state ? state.token : undefined;
|
|
74
|
+
resourceInputs["url"] = state ? state.url : undefined;
|
|
75
|
+
} else {
|
|
76
|
+
const args = argsOrState as TriggerCheckArgs | undefined;
|
|
77
|
+
if ((!args || args.checkId === undefined) && !opts.urn) {
|
|
78
|
+
throw new Error("Missing required property 'checkId'");
|
|
79
|
+
}
|
|
80
|
+
resourceInputs["checkId"] = args ? args.checkId : undefined;
|
|
81
|
+
resourceInputs["token"] = args ? args.token : undefined;
|
|
82
|
+
resourceInputs["url"] = args ? args.url : undefined;
|
|
83
|
+
}
|
|
84
|
+
if (!opts.version) {
|
|
85
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
86
|
+
}
|
|
87
|
+
super(TriggerCheck.__pulumiType, name, resourceInputs, opts);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Input properties used for looking up and filtering TriggerCheck resources.
|
|
93
|
+
*/
|
|
94
|
+
export interface TriggerCheckState {
|
|
95
|
+
/**
|
|
96
|
+
* The id of the check that you want to attach the trigger to.
|
|
97
|
+
*/
|
|
98
|
+
checkId?: pulumi.Input<string>;
|
|
99
|
+
token?: pulumi.Input<string>;
|
|
100
|
+
url?: pulumi.Input<string>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The set of arguments for constructing a TriggerCheck resource.
|
|
105
|
+
*/
|
|
106
|
+
export interface TriggerCheckArgs {
|
|
107
|
+
/**
|
|
108
|
+
* The id of the check that you want to attach the trigger to.
|
|
109
|
+
*/
|
|
110
|
+
checkId: pulumi.Input<string>;
|
|
111
|
+
token?: pulumi.Input<string>;
|
|
112
|
+
url?: pulumi.Input<string>;
|
|
113
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
5
|
+
import * as utilities from "./utilities";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* ## # checkly.TriggerCheckGroup
|
|
9
|
+
*
|
|
10
|
+
* `checkly.TriggerCheckGroup` allows users to manage Checkly trigger groups. Add a `checkly.TriggerCheckGroup` resource to your resource file.
|
|
11
|
+
*
|
|
12
|
+
* ## Example Usage
|
|
13
|
+
*
|
|
14
|
+
* Trigger group example
|
|
15
|
+
*
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
18
|
+
* import * as checkly from "@pulumi/checkly";
|
|
19
|
+
*
|
|
20
|
+
* const test_trigger_group = new checkly.TriggerCheckGroup("test-trigger-group", {groupId: "215"});
|
|
21
|
+
* export const test_trigger_group_url = test_trigger_group.url;
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export class TriggerCheckGroup extends pulumi.CustomResource {
|
|
25
|
+
/**
|
|
26
|
+
* Get an existing TriggerCheckGroup resource's state with the given name, ID, and optional extra
|
|
27
|
+
* properties used to qualify the lookup.
|
|
28
|
+
*
|
|
29
|
+
* @param name The _unique_ name of the resulting resource.
|
|
30
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
31
|
+
* @param state Any extra arguments used during the lookup.
|
|
32
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
33
|
+
*/
|
|
34
|
+
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: TriggerCheckGroupState, opts?: pulumi.CustomResourceOptions): TriggerCheckGroup {
|
|
35
|
+
return new TriggerCheckGroup(name, <any>state, { ...opts, id: id });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
public static readonly __pulumiType = 'checkly:index/triggerCheckGroup:TriggerCheckGroup';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Returns true if the given object is an instance of TriggerCheckGroup. This is designed to work even
|
|
43
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
44
|
+
*/
|
|
45
|
+
public static isInstance(obj: any): obj is TriggerCheckGroup {
|
|
46
|
+
if (obj === undefined || obj === null) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
return obj['__pulumiType'] === TriggerCheckGroup.__pulumiType;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The id of the group that you want to attach the trigger to.
|
|
54
|
+
*/
|
|
55
|
+
public readonly groupId!: pulumi.Output<number>;
|
|
56
|
+
public readonly token!: pulumi.Output<string>;
|
|
57
|
+
public readonly url!: pulumi.Output<string>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Create a TriggerCheckGroup resource with the given unique name, arguments, and options.
|
|
61
|
+
*
|
|
62
|
+
* @param name The _unique_ name of the resource.
|
|
63
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
64
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
65
|
+
*/
|
|
66
|
+
constructor(name: string, args: TriggerCheckGroupArgs, opts?: pulumi.CustomResourceOptions)
|
|
67
|
+
constructor(name: string, argsOrState?: TriggerCheckGroupArgs | TriggerCheckGroupState, opts?: pulumi.CustomResourceOptions) {
|
|
68
|
+
let resourceInputs: pulumi.Inputs = {};
|
|
69
|
+
opts = opts || {};
|
|
70
|
+
if (opts.id) {
|
|
71
|
+
const state = argsOrState as TriggerCheckGroupState | undefined;
|
|
72
|
+
resourceInputs["groupId"] = state ? state.groupId : undefined;
|
|
73
|
+
resourceInputs["token"] = state ? state.token : undefined;
|
|
74
|
+
resourceInputs["url"] = state ? state.url : undefined;
|
|
75
|
+
} else {
|
|
76
|
+
const args = argsOrState as TriggerCheckGroupArgs | undefined;
|
|
77
|
+
if ((!args || args.groupId === undefined) && !opts.urn) {
|
|
78
|
+
throw new Error("Missing required property 'groupId'");
|
|
79
|
+
}
|
|
80
|
+
resourceInputs["groupId"] = args ? args.groupId : undefined;
|
|
81
|
+
resourceInputs["token"] = args ? args.token : undefined;
|
|
82
|
+
resourceInputs["url"] = args ? args.url : undefined;
|
|
83
|
+
}
|
|
84
|
+
if (!opts.version) {
|
|
85
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion()});
|
|
86
|
+
}
|
|
87
|
+
super(TriggerCheckGroup.__pulumiType, name, resourceInputs, opts);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Input properties used for looking up and filtering TriggerCheckGroup resources.
|
|
93
|
+
*/
|
|
94
|
+
export interface TriggerCheckGroupState {
|
|
95
|
+
/**
|
|
96
|
+
* The id of the group that you want to attach the trigger to.
|
|
97
|
+
*/
|
|
98
|
+
groupId?: pulumi.Input<number>;
|
|
99
|
+
token?: pulumi.Input<string>;
|
|
100
|
+
url?: pulumi.Input<string>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The set of arguments for constructing a TriggerCheckGroup resource.
|
|
105
|
+
*/
|
|
106
|
+
export interface TriggerCheckGroupArgs {
|
|
107
|
+
/**
|
|
108
|
+
* The id of the group that you want to attach the trigger to.
|
|
109
|
+
*/
|
|
110
|
+
groupId: pulumi.Input<number>;
|
|
111
|
+
token?: pulumi.Input<string>;
|
|
112
|
+
url?: pulumi.Input<string>;
|
|
113
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "bin",
|
|
4
|
+
"target": "es2016",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"sourceMap": true,
|
|
9
|
+
"stripInternal": true,
|
|
10
|
+
"experimentalDecorators": true,
|
|
11
|
+
"noFallthroughCasesInSwitch": true,
|
|
12
|
+
"forceConsistentCasingInFileNames": true,
|
|
13
|
+
"strict": true
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"alertChannel.ts",
|
|
17
|
+
"check.ts",
|
|
18
|
+
"checkGroup.ts",
|
|
19
|
+
"config/index.ts",
|
|
20
|
+
"config/vars.ts",
|
|
21
|
+
"dashboard.ts",
|
|
22
|
+
"index.ts",
|
|
23
|
+
"maintenanceWindow.ts",
|
|
24
|
+
"provider.ts",
|
|
25
|
+
"snippet.ts",
|
|
26
|
+
"triggerCheck.ts",
|
|
27
|
+
"triggerCheckGroup.ts",
|
|
28
|
+
"types/index.ts",
|
|
29
|
+
"types/input.ts",
|
|
30
|
+
"types/output.ts",
|
|
31
|
+
"utilities.ts"
|
|
32
|
+
]
|
|
33
|
+
}
|
package/types/index.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
|
|
2
|
+
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
|
+
|
|
4
|
+
// Export sub-modules:
|
|
5
|
+
import * as input from "./input";
|
|
6
|
+
import * as output from "./output";
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
input,
|
|
10
|
+
output,
|
|
11
|
+
};
|