@pulumi/dbtcloud 0.1.0-alpha.1715944408

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.
Files changed (166) hide show
  1. package/LICENSE +177 -0
  2. package/README.md +70 -0
  3. package/bigQueryConnection.d.ts +399 -0
  4. package/bigQueryConnection.js +196 -0
  5. package/bigQueryConnection.js.map +1 -0
  6. package/bigQueryCredential.d.ts +117 -0
  7. package/bigQueryCredential.js +91 -0
  8. package/bigQueryCredential.js.map +1 -0
  9. package/config/index.d.ts +1 -0
  10. package/config/index.js +21 -0
  11. package/config/index.js.map +1 -0
  12. package/config/vars.d.ts +14 -0
  13. package/config/vars.js +29 -0
  14. package/config/vars.js.map +1 -0
  15. package/connection.d.ts +321 -0
  16. package/connection.js +149 -0
  17. package/connection.js.map +1 -0
  18. package/databricksCredential.d.ts +168 -0
  19. package/databricksCredential.js +120 -0
  20. package/databricksCredential.js.map +1 -0
  21. package/environment.d.ts +209 -0
  22. package/environment.js +123 -0
  23. package/environment.js.map +1 -0
  24. package/environmentVariable.d.ts +120 -0
  25. package/environmentVariable.js +101 -0
  26. package/environmentVariable.js.map +1 -0
  27. package/environmentVariableJobOverride.d.ts +119 -0
  28. package/environmentVariableJobOverride.js +93 -0
  29. package/environmentVariableJobOverride.js.map +1 -0
  30. package/extendedAttributes.d.ts +135 -0
  31. package/extendedAttributes.js +107 -0
  32. package/extendedAttributes.js.map +1 -0
  33. package/fabricConnection.d.ts +177 -0
  34. package/fabricConnection.js +108 -0
  35. package/fabricConnection.js.map +1 -0
  36. package/fabricCredential.d.ts +167 -0
  37. package/fabricCredential.js +93 -0
  38. package/fabricCredential.js.map +1 -0
  39. package/getAzureDevOpsProject.d.ts +72 -0
  40. package/getAzureDevOpsProject.js +53 -0
  41. package/getAzureDevOpsProject.js.map +1 -0
  42. package/getAzureDevOpsRepository.d.ts +98 -0
  43. package/getAzureDevOpsRepository.js +56 -0
  44. package/getAzureDevOpsRepository.js.map +1 -0
  45. package/getBigQueryConnection.d.ts +134 -0
  46. package/getBigQueryConnection.js +20 -0
  47. package/getBigQueryConnection.js.map +1 -0
  48. package/getBigQueryCredential.d.ts +58 -0
  49. package/getBigQueryCredential.js +20 -0
  50. package/getBigQueryCredential.js.map +1 -0
  51. package/getConnection.d.ts +86 -0
  52. package/getConnection.js +20 -0
  53. package/getConnection.js.map +1 -0
  54. package/getDatabricksCredential.d.ts +66 -0
  55. package/getDatabricksCredential.js +20 -0
  56. package/getDatabricksCredential.js.map +1 -0
  57. package/getEnvironment.d.ts +82 -0
  58. package/getEnvironment.js +20 -0
  59. package/getEnvironment.js.map +1 -0
  60. package/getEnvironmentVariable.d.ts +52 -0
  61. package/getEnvironmentVariable.js +20 -0
  62. package/getEnvironmentVariable.js.map +1 -0
  63. package/getExtendedAttributes.d.ts +80 -0
  64. package/getExtendedAttributes.js +46 -0
  65. package/getExtendedAttributes.js.map +1 -0
  66. package/getGroup.d.ts +50 -0
  67. package/getGroup.js +19 -0
  68. package/getGroup.js.map +1 -0
  69. package/getGroupUsers.d.ts +67 -0
  70. package/getGroupUsers.js +47 -0
  71. package/getGroupUsers.js.map +1 -0
  72. package/getJob.d.ts +89 -0
  73. package/getJob.js +20 -0
  74. package/getJob.js.map +1 -0
  75. package/getNotification.d.ts +82 -0
  76. package/getNotification.js +43 -0
  77. package/getNotification.js.map +1 -0
  78. package/getPostgresCredential.d.ts +62 -0
  79. package/getPostgresCredential.js +20 -0
  80. package/getPostgresCredential.js.map +1 -0
  81. package/getPrivatelinkEndpoint.d.ts +98 -0
  82. package/getPrivatelinkEndpoint.js +61 -0
  83. package/getPrivatelinkEndpoint.js.map +1 -0
  84. package/getProject.d.ts +102 -0
  85. package/getProject.js +57 -0
  86. package/getProject.js.map +1 -0
  87. package/getRepository.d.ts +86 -0
  88. package/getRepository.js +21 -0
  89. package/getRepository.js.map +1 -0
  90. package/getServiceToken.d.ts +47 -0
  91. package/getServiceToken.js +19 -0
  92. package/getServiceToken.js.map +1 -0
  93. package/getSnowflakeCredential.d.ts +66 -0
  94. package/getSnowflakeCredential.js +20 -0
  95. package/getSnowflakeCredential.js.map +1 -0
  96. package/getUser.d.ts +58 -0
  97. package/getUser.js +43 -0
  98. package/getUser.js.map +1 -0
  99. package/getUserGroups.d.ts +62 -0
  100. package/getUserGroups.js +43 -0
  101. package/getUserGroups.js.map +1 -0
  102. package/getWebhook.d.ts +66 -0
  103. package/getWebhook.js +19 -0
  104. package/getWebhook.js.map +1 -0
  105. package/group.d.ts +127 -0
  106. package/group.js +95 -0
  107. package/group.js.map +1 -0
  108. package/index.d.ts +144 -0
  109. package/index.js +220 -0
  110. package/index.js.map +1 -0
  111. package/job.d.ts +443 -0
  112. package/job.js +228 -0
  113. package/job.js.map +1 -0
  114. package/licenseMap.d.ts +96 -0
  115. package/licenseMap.js +90 -0
  116. package/licenseMap.js.map +1 -0
  117. package/notification.d.ts +202 -0
  118. package/notification.js +126 -0
  119. package/notification.js.map +1 -0
  120. package/package.json +31 -0
  121. package/package.json.bak +31 -0
  122. package/postgresCredential.d.ts +171 -0
  123. package/postgresCredential.js +110 -0
  124. package/postgresCredential.js.map +1 -0
  125. package/project.d.ts +87 -0
  126. package/project.js +78 -0
  127. package/project.js.map +1 -0
  128. package/projectArtefacts.d.ts +99 -0
  129. package/projectArtefacts.js +83 -0
  130. package/projectArtefacts.js.map +1 -0
  131. package/projectConnection.d.ts +86 -0
  132. package/projectConnection.js +83 -0
  133. package/projectConnection.js.map +1 -0
  134. package/projectRepository.d.ts +86 -0
  135. package/projectRepository.js +83 -0
  136. package/projectRepository.js.map +1 -0
  137. package/provider.d.ts +50 -0
  138. package/provider.js +48 -0
  139. package/provider.js.map +1 -0
  140. package/repository.d.ts +204 -0
  141. package/repository.js +103 -0
  142. package/repository.js.map +1 -0
  143. package/serviceToken.d.ts +126 -0
  144. package/serviceToken.js +95 -0
  145. package/serviceToken.js.map +1 -0
  146. package/snowflakeCredential.d.ts +218 -0
  147. package/snowflakeCredential.js +120 -0
  148. package/snowflakeCredential.js.map +1 -0
  149. package/types/index.d.ts +3 -0
  150. package/types/index.js +11 -0
  151. package/types/index.js.map +1 -0
  152. package/types/input.d.ts +43 -0
  153. package/types/input.js +5 -0
  154. package/types/input.js.map +1 -0
  155. package/types/output.d.ts +74 -0
  156. package/types/output.js +5 -0
  157. package/types/output.js.map +1 -0
  158. package/userGroups.d.ts +105 -0
  159. package/userGroups.js +102 -0
  160. package/userGroups.js.map +1 -0
  161. package/utilities.d.ts +8 -0
  162. package/utilities.js +101 -0
  163. package/utilities.js.map +1 -0
  164. package/webhook.d.ts +175 -0
  165. package/webhook.js +110 -0
  166. package/webhook.js.map +1 -0
@@ -0,0 +1,96 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * ## Example Usage
4
+ *
5
+ * ```typescript
6
+ * import * as pulumi from "@pulumi/pulumi";
7
+ * import * as dbtcloud from "@pulumi/dbtcloud";
8
+ *
9
+ * // Developer license group mapping
10
+ * const devLicenseMap = new dbtcloud.LicenseMap("dev_license_map", {
11
+ * licenseType: "developer",
12
+ * ssoLicenseMappingGroups: ["DEV-SSO-GROUP"],
13
+ * });
14
+ * // Read-only license mapping
15
+ * const readOnlyLicenseMap = new dbtcloud.LicenseMap("read_only_license_map", {
16
+ * licenseType: "read_only",
17
+ * ssoLicenseMappingGroups: ["READ-ONLY-SSO-GROUP"],
18
+ * });
19
+ * // IT license mapping
20
+ * const itLicenseMap = new dbtcloud.LicenseMap("it_license_map", {
21
+ * licenseType: "it",
22
+ * ssoLicenseMappingGroups: ["IT-SSO-GROUP"],
23
+ * });
24
+ * ```
25
+ *
26
+ * ## Import
27
+ *
28
+ * Import using a license map ID found in the URL or via the API.
29
+ *
30
+ * ```sh
31
+ * $ pulumi import dbtcloud:index/licenseMap:LicenseMap test_license_map "license_map_id"
32
+ * ```
33
+ *
34
+ * ```sh
35
+ * $ pulumi import dbtcloud:index/licenseMap:LicenseMap test_license_map 12345
36
+ * ```
37
+ */
38
+ export declare class LicenseMap extends pulumi.CustomResource {
39
+ /**
40
+ * Get an existing LicenseMap resource's state with the given name, ID, and optional extra
41
+ * properties used to qualify the lookup.
42
+ *
43
+ * @param name The _unique_ name of the resulting resource.
44
+ * @param id The _unique_ provider ID of the resource to lookup.
45
+ * @param state Any extra arguments used during the lookup.
46
+ * @param opts Optional settings to control the behavior of the CustomResource.
47
+ */
48
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: LicenseMapState, opts?: pulumi.CustomResourceOptions): LicenseMap;
49
+ /**
50
+ * Returns true if the given object is an instance of LicenseMap. This is designed to work even
51
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
52
+ */
53
+ static isInstance(obj: any): obj is LicenseMap;
54
+ /**
55
+ * License type
56
+ */
57
+ readonly licenseType: pulumi.Output<string>;
58
+ /**
59
+ * SSO license mapping group names for this group
60
+ */
61
+ readonly ssoLicenseMappingGroups: pulumi.Output<string[] | undefined>;
62
+ /**
63
+ * Create a LicenseMap resource with the given unique name, arguments, and options.
64
+ *
65
+ * @param name The _unique_ name of the resource.
66
+ * @param args The arguments to use to populate this resource's properties.
67
+ * @param opts A bag of options that control this resource's behavior.
68
+ */
69
+ constructor(name: string, args: LicenseMapArgs, opts?: pulumi.CustomResourceOptions);
70
+ }
71
+ /**
72
+ * Input properties used for looking up and filtering LicenseMap resources.
73
+ */
74
+ export interface LicenseMapState {
75
+ /**
76
+ * License type
77
+ */
78
+ licenseType?: pulumi.Input<string>;
79
+ /**
80
+ * SSO license mapping group names for this group
81
+ */
82
+ ssoLicenseMappingGroups?: pulumi.Input<pulumi.Input<string>[]>;
83
+ }
84
+ /**
85
+ * The set of arguments for constructing a LicenseMap resource.
86
+ */
87
+ export interface LicenseMapArgs {
88
+ /**
89
+ * License type
90
+ */
91
+ licenseType: pulumi.Input<string>;
92
+ /**
93
+ * SSO license mapping group names for this group
94
+ */
95
+ ssoLicenseMappingGroups?: pulumi.Input<pulumi.Input<string>[]>;
96
+ }
package/licenseMap.js ADDED
@@ -0,0 +1,90 @@
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.LicenseMap = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * ## Example Usage
10
+ *
11
+ * ```typescript
12
+ * import * as pulumi from "@pulumi/pulumi";
13
+ * import * as dbtcloud from "@pulumi/dbtcloud";
14
+ *
15
+ * // Developer license group mapping
16
+ * const devLicenseMap = new dbtcloud.LicenseMap("dev_license_map", {
17
+ * licenseType: "developer",
18
+ * ssoLicenseMappingGroups: ["DEV-SSO-GROUP"],
19
+ * });
20
+ * // Read-only license mapping
21
+ * const readOnlyLicenseMap = new dbtcloud.LicenseMap("read_only_license_map", {
22
+ * licenseType: "read_only",
23
+ * ssoLicenseMappingGroups: ["READ-ONLY-SSO-GROUP"],
24
+ * });
25
+ * // IT license mapping
26
+ * const itLicenseMap = new dbtcloud.LicenseMap("it_license_map", {
27
+ * licenseType: "it",
28
+ * ssoLicenseMappingGroups: ["IT-SSO-GROUP"],
29
+ * });
30
+ * ```
31
+ *
32
+ * ## Import
33
+ *
34
+ * Import using a license map ID found in the URL or via the API.
35
+ *
36
+ * ```sh
37
+ * $ pulumi import dbtcloud:index/licenseMap:LicenseMap test_license_map "license_map_id"
38
+ * ```
39
+ *
40
+ * ```sh
41
+ * $ pulumi import dbtcloud:index/licenseMap:LicenseMap test_license_map 12345
42
+ * ```
43
+ */
44
+ class LicenseMap extends pulumi.CustomResource {
45
+ /**
46
+ * Get an existing LicenseMap 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, id, state, opts) {
55
+ return new LicenseMap(name, state, Object.assign(Object.assign({}, opts), { id: id }));
56
+ }
57
+ /**
58
+ * Returns true if the given object is an instance of LicenseMap. 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) {
62
+ if (obj === undefined || obj === null) {
63
+ return false;
64
+ }
65
+ return obj['__pulumiType'] === LicenseMap.__pulumiType;
66
+ }
67
+ constructor(name, argsOrState, opts) {
68
+ let resourceInputs = {};
69
+ opts = opts || {};
70
+ if (opts.id) {
71
+ const state = argsOrState;
72
+ resourceInputs["licenseType"] = state ? state.licenseType : undefined;
73
+ resourceInputs["ssoLicenseMappingGroups"] = state ? state.ssoLicenseMappingGroups : undefined;
74
+ }
75
+ else {
76
+ const args = argsOrState;
77
+ if ((!args || args.licenseType === undefined) && !opts.urn) {
78
+ throw new Error("Missing required property 'licenseType'");
79
+ }
80
+ resourceInputs["licenseType"] = args ? args.licenseType : undefined;
81
+ resourceInputs["ssoLicenseMappingGroups"] = args ? args.ssoLicenseMappingGroups : undefined;
82
+ }
83
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
84
+ super(LicenseMap.__pulumiType, name, resourceInputs, opts);
85
+ }
86
+ }
87
+ exports.LicenseMap = LicenseMap;
88
+ /** @internal */
89
+ LicenseMap.__pulumiType = 'dbtcloud:index/licenseMap:LicenseMap';
90
+ //# sourceMappingURL=licenseMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"licenseMap.js","sourceRoot":"","sources":["../licenseMap.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IACjD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2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AAG,MAAM,CAAC,YAAY,CAAC,SAAS,CAAC,oBAAoB,EAAE,EAAE,IAAI,CAAC,CAAC;QACnE,KAAK,CAAC,UAAU,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,CAAC;IAC/D,CAAC;;AA9DL,gCA+DC;AAjDG,gBAAgB;AACO,uBAAY,GAAG,sCAAsC,CAAC"}
@@ -0,0 +1,202 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * ## Example Usage
4
+ *
5
+ * ```typescript
6
+ * import * as pulumi from "@pulumi/pulumi";
7
+ * import * as dbtcloud from "@pulumi/dbtcloud";
8
+ *
9
+ * // dbt Cloud allows us to create internal and external notifications
10
+ * // an internal notification will send emails to the user mentioned in `user_id`
11
+ * //
12
+ * // NOTE: If internal notification settings already exist for a user, currently you MUST import
13
+ * // those first into the state file before you can create a new internal notification for that user.
14
+ * // Failure to do so, will result in the user losing access to existing notifications and dbt
15
+ * // support will need to be contacted to restore access.
16
+ * // cmd: terraform import dbtcloud_notification.prod_job_internal_notification <user_id>
17
+ * const prodJobInternalNotification = new dbtcloud.Notification("prod_job_internal_notification", {
18
+ * userId: 100,
19
+ * onSuccesses: [prodJob.id],
20
+ * onFailures: [12345],
21
+ * notificationType: 1,
22
+ * });
23
+ * // we can also send "external" email notifications to emails to related to dbt Cloud users
24
+ * const prodJobExternalNotification = new dbtcloud.Notification("prod_job_external_notification", {
25
+ * userId: 100,
26
+ * onFailures: [
27
+ * 23456,
28
+ * 56788,
29
+ * ],
30
+ * onCancels: [prodJob.id],
31
+ * notificationType: 4,
32
+ * externalEmail: "my_email@mail.com",
33
+ * });
34
+ * // and finally, we can set up Slack notifications
35
+ * const prodJobSlackNotifications = new dbtcloud.Notification("prod_job_slack_notifications", {
36
+ * userId: 100,
37
+ * onFailures: [
38
+ * 23456,
39
+ * 56788,
40
+ * ],
41
+ * onCancels: [prodJob.id],
42
+ * notificationType: 2,
43
+ * slackChannelId: "C12345ABCDE",
44
+ * slackChannelName: "#my-awesome-channel",
45
+ * });
46
+ * ```
47
+ *
48
+ * ## Import
49
+ *
50
+ * Import using a notification ID
51
+ *
52
+ * ```sh
53
+ * $ pulumi import dbtcloud:index/notification:Notification my_notification "notification_id"
54
+ * ```
55
+ *
56
+ * ```sh
57
+ * $ pulumi import dbtcloud:index/notification:Notification my_notification 12345
58
+ * ```
59
+ */
60
+ export declare class Notification extends pulumi.CustomResource {
61
+ /**
62
+ * Get an existing Notification resource's state with the given name, ID, and optional extra
63
+ * properties used to qualify the lookup.
64
+ *
65
+ * @param name The _unique_ name of the resulting resource.
66
+ * @param id The _unique_ provider ID of the resource to lookup.
67
+ * @param state Any extra arguments used during the lookup.
68
+ * @param opts Optional settings to control the behavior of the CustomResource.
69
+ */
70
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: NotificationState, opts?: pulumi.CustomResourceOptions): Notification;
71
+ /**
72
+ * Returns true if the given object is an instance of Notification. This is designed to work even
73
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
74
+ */
75
+ static isInstance(obj: any): obj is Notification;
76
+ /**
77
+ * The external email to receive the notification
78
+ */
79
+ readonly externalEmail: pulumi.Output<string | undefined>;
80
+ /**
81
+ * Type of notification (1 = dbt Cloud user email (default): does not require an externalEmail ; 2 = Slack channel: requires `slackChannelId` and `slackChannelName` ; 4 = external email: requires setting an `externalEmail`)
82
+ */
83
+ readonly notificationType: pulumi.Output<number | undefined>;
84
+ /**
85
+ * List of job IDs to trigger the webhook on cancel
86
+ */
87
+ readonly onCancels: pulumi.Output<number[] | undefined>;
88
+ /**
89
+ * List of job IDs to trigger the webhook on failure
90
+ */
91
+ readonly onFailures: pulumi.Output<number[] | undefined>;
92
+ /**
93
+ * List of job IDs to trigger the webhook on success
94
+ */
95
+ readonly onSuccesses: pulumi.Output<number[] | undefined>;
96
+ /**
97
+ * The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
98
+ */
99
+ readonly slackChannelId: pulumi.Output<string | undefined>;
100
+ /**
101
+ * The name of the slack channel
102
+ */
103
+ readonly slackChannelName: pulumi.Output<string | undefined>;
104
+ /**
105
+ * State of the notification (1 = active (default), 2 = inactive)
106
+ */
107
+ readonly state: pulumi.Output<number | undefined>;
108
+ /**
109
+ * Internal dbt Cloud User ID. Must be the userId for an existing user even if the notification is an external one
110
+ */
111
+ readonly userId: pulumi.Output<number>;
112
+ /**
113
+ * Create a Notification resource with the given unique name, arguments, and options.
114
+ *
115
+ * @param name The _unique_ name of the resource.
116
+ * @param args The arguments to use to populate this resource's properties.
117
+ * @param opts A bag of options that control this resource's behavior.
118
+ */
119
+ constructor(name: string, args: NotificationArgs, opts?: pulumi.CustomResourceOptions);
120
+ }
121
+ /**
122
+ * Input properties used for looking up and filtering Notification resources.
123
+ */
124
+ export interface NotificationState {
125
+ /**
126
+ * The external email to receive the notification
127
+ */
128
+ externalEmail?: pulumi.Input<string>;
129
+ /**
130
+ * Type of notification (1 = dbt Cloud user email (default): does not require an externalEmail ; 2 = Slack channel: requires `slackChannelId` and `slackChannelName` ; 4 = external email: requires setting an `externalEmail`)
131
+ */
132
+ notificationType?: pulumi.Input<number>;
133
+ /**
134
+ * List of job IDs to trigger the webhook on cancel
135
+ */
136
+ onCancels?: pulumi.Input<pulumi.Input<number>[]>;
137
+ /**
138
+ * List of job IDs to trigger the webhook on failure
139
+ */
140
+ onFailures?: pulumi.Input<pulumi.Input<number>[]>;
141
+ /**
142
+ * List of job IDs to trigger the webhook on success
143
+ */
144
+ onSuccesses?: pulumi.Input<pulumi.Input<number>[]>;
145
+ /**
146
+ * The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
147
+ */
148
+ slackChannelId?: pulumi.Input<string>;
149
+ /**
150
+ * The name of the slack channel
151
+ */
152
+ slackChannelName?: pulumi.Input<string>;
153
+ /**
154
+ * State of the notification (1 = active (default), 2 = inactive)
155
+ */
156
+ state?: pulumi.Input<number>;
157
+ /**
158
+ * Internal dbt Cloud User ID. Must be the userId for an existing user even if the notification is an external one
159
+ */
160
+ userId?: pulumi.Input<number>;
161
+ }
162
+ /**
163
+ * The set of arguments for constructing a Notification resource.
164
+ */
165
+ export interface NotificationArgs {
166
+ /**
167
+ * The external email to receive the notification
168
+ */
169
+ externalEmail?: pulumi.Input<string>;
170
+ /**
171
+ * Type of notification (1 = dbt Cloud user email (default): does not require an externalEmail ; 2 = Slack channel: requires `slackChannelId` and `slackChannelName` ; 4 = external email: requires setting an `externalEmail`)
172
+ */
173
+ notificationType?: pulumi.Input<number>;
174
+ /**
175
+ * List of job IDs to trigger the webhook on cancel
176
+ */
177
+ onCancels?: pulumi.Input<pulumi.Input<number>[]>;
178
+ /**
179
+ * List of job IDs to trigger the webhook on failure
180
+ */
181
+ onFailures?: pulumi.Input<pulumi.Input<number>[]>;
182
+ /**
183
+ * List of job IDs to trigger the webhook on success
184
+ */
185
+ onSuccesses?: pulumi.Input<pulumi.Input<number>[]>;
186
+ /**
187
+ * The ID of the Slack channel to receive the notification. It can be found at the bottom of the Slack channel settings
188
+ */
189
+ slackChannelId?: pulumi.Input<string>;
190
+ /**
191
+ * The name of the slack channel
192
+ */
193
+ slackChannelName?: pulumi.Input<string>;
194
+ /**
195
+ * State of the notification (1 = active (default), 2 = inactive)
196
+ */
197
+ state?: pulumi.Input<number>;
198
+ /**
199
+ * Internal dbt Cloud User ID. Must be the userId for an existing user even if the notification is an external one
200
+ */
201
+ userId: pulumi.Input<number>;
202
+ }
@@ -0,0 +1,126 @@
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.Notification = void 0;
6
+ const pulumi = require("@pulumi/pulumi");
7
+ const utilities = require("./utilities");
8
+ /**
9
+ * ## Example Usage
10
+ *
11
+ * ```typescript
12
+ * import * as pulumi from "@pulumi/pulumi";
13
+ * import * as dbtcloud from "@pulumi/dbtcloud";
14
+ *
15
+ * // dbt Cloud allows us to create internal and external notifications
16
+ * // an internal notification will send emails to the user mentioned in `user_id`
17
+ * //
18
+ * // NOTE: If internal notification settings already exist for a user, currently you MUST import
19
+ * // those first into the state file before you can create a new internal notification for that user.
20
+ * // Failure to do so, will result in the user losing access to existing notifications and dbt
21
+ * // support will need to be contacted to restore access.
22
+ * // cmd: terraform import dbtcloud_notification.prod_job_internal_notification <user_id>
23
+ * const prodJobInternalNotification = new dbtcloud.Notification("prod_job_internal_notification", {
24
+ * userId: 100,
25
+ * onSuccesses: [prodJob.id],
26
+ * onFailures: [12345],
27
+ * notificationType: 1,
28
+ * });
29
+ * // we can also send "external" email notifications to emails to related to dbt Cloud users
30
+ * const prodJobExternalNotification = new dbtcloud.Notification("prod_job_external_notification", {
31
+ * userId: 100,
32
+ * onFailures: [
33
+ * 23456,
34
+ * 56788,
35
+ * ],
36
+ * onCancels: [prodJob.id],
37
+ * notificationType: 4,
38
+ * externalEmail: "my_email@mail.com",
39
+ * });
40
+ * // and finally, we can set up Slack notifications
41
+ * const prodJobSlackNotifications = new dbtcloud.Notification("prod_job_slack_notifications", {
42
+ * userId: 100,
43
+ * onFailures: [
44
+ * 23456,
45
+ * 56788,
46
+ * ],
47
+ * onCancels: [prodJob.id],
48
+ * notificationType: 2,
49
+ * slackChannelId: "C12345ABCDE",
50
+ * slackChannelName: "#my-awesome-channel",
51
+ * });
52
+ * ```
53
+ *
54
+ * ## Import
55
+ *
56
+ * Import using a notification ID
57
+ *
58
+ * ```sh
59
+ * $ pulumi import dbtcloud:index/notification:Notification my_notification "notification_id"
60
+ * ```
61
+ *
62
+ * ```sh
63
+ * $ pulumi import dbtcloud:index/notification:Notification my_notification 12345
64
+ * ```
65
+ */
66
+ class Notification extends pulumi.CustomResource {
67
+ /**
68
+ * Get an existing Notification resource's state with the given name, ID, and optional extra
69
+ * properties used to qualify the lookup.
70
+ *
71
+ * @param name The _unique_ name of the resulting resource.
72
+ * @param id The _unique_ provider ID of the resource to lookup.
73
+ * @param state Any extra arguments used during the lookup.
74
+ * @param opts Optional settings to control the behavior of the CustomResource.
75
+ */
76
+ static get(name, id, state, opts) {
77
+ return new Notification(name, state, Object.assign(Object.assign({}, opts), { id: id }));
78
+ }
79
+ /**
80
+ * Returns true if the given object is an instance of Notification. This is designed to work even
81
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
82
+ */
83
+ static isInstance(obj) {
84
+ if (obj === undefined || obj === null) {
85
+ return false;
86
+ }
87
+ return obj['__pulumiType'] === Notification.__pulumiType;
88
+ }
89
+ constructor(name, argsOrState, opts) {
90
+ let resourceInputs = {};
91
+ opts = opts || {};
92
+ if (opts.id) {
93
+ const state = argsOrState;
94
+ resourceInputs["externalEmail"] = state ? state.externalEmail : undefined;
95
+ resourceInputs["notificationType"] = state ? state.notificationType : undefined;
96
+ resourceInputs["onCancels"] = state ? state.onCancels : undefined;
97
+ resourceInputs["onFailures"] = state ? state.onFailures : undefined;
98
+ resourceInputs["onSuccesses"] = state ? state.onSuccesses : undefined;
99
+ resourceInputs["slackChannelId"] = state ? state.slackChannelId : undefined;
100
+ resourceInputs["slackChannelName"] = state ? state.slackChannelName : undefined;
101
+ resourceInputs["state"] = state ? state.state : undefined;
102
+ resourceInputs["userId"] = state ? state.userId : undefined;
103
+ }
104
+ else {
105
+ const args = argsOrState;
106
+ if ((!args || args.userId === undefined) && !opts.urn) {
107
+ throw new Error("Missing required property 'userId'");
108
+ }
109
+ resourceInputs["externalEmail"] = args ? args.externalEmail : undefined;
110
+ resourceInputs["notificationType"] = args ? args.notificationType : undefined;
111
+ resourceInputs["onCancels"] = args ? args.onCancels : undefined;
112
+ resourceInputs["onFailures"] = args ? args.onFailures : undefined;
113
+ resourceInputs["onSuccesses"] = args ? args.onSuccesses : undefined;
114
+ resourceInputs["slackChannelId"] = args ? args.slackChannelId : undefined;
115
+ resourceInputs["slackChannelName"] = args ? args.slackChannelName : undefined;
116
+ resourceInputs["state"] = args ? args.state : undefined;
117
+ resourceInputs["userId"] = args ? args.userId : undefined;
118
+ }
119
+ opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
120
+ super(Notification.__pulumiType, name, resourceInputs, opts);
121
+ }
122
+ }
123
+ exports.Notification = Notification;
124
+ /** @internal */
125
+ Notification.__pulumiType = 'dbtcloud:index/notification:Notification';
126
+ //# sourceMappingURL=notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.js","sourceRoot":"","sources":["../notification.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,MAAa,YAAa,SAAQ,MAAM,CAAC,cAAc;IACnD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAyB,EAAE,IAAmC;QACvH,OAAO,IAAI,YAAY,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACnE,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,YAAY,CAAC,YAAY,CAAC;IAC7D,CAAC;IA+CD,YAAY,IAAY,EAAE,WAAkD,EAAE,IAAmC;QAC7G,IAAI,cAAc,GAAkB,EAAE,CAAC;QACvC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA4C,CAAC;YAC3D,cAAc,CAAC,eAAe,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,SA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"A Pulumi package for creating and managing dbt Cloud resources.",
5
+ "keywords": [
6
+ "pulumi",
7
+ "dbtcloud",
8
+ "dbt",
9
+ "cloud",
10
+ "category/cloud"
11
+ ],
12
+ "homepage": "https://www.pulumi.com",
13
+ "repository": "https://github.com/pulumi/pulumi-dbtcloud",
14
+ "license": "Apache-2.0",
15
+ "scripts": {
16
+ "build": "tsc"
17
+ },
18
+ "dependencies": {
19
+ "@pulumi/pulumi": "^3.0.0"
20
+ },
21
+ "devDependencies": {
22
+ "@types/mime": "^2.0.0",
23
+ "@types/node": "^10.0.0",
24
+ "typescript": "^4.3.5"
25
+ },
26
+ "pulumi": {
27
+ "resource": true,
28
+ "name": "dbtcloud",
29
+ "server": "github://api.github.com/pulumi/pulumi-dbtcloud"
30
+ }
31
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@pulumi/dbtcloud",
3
+ "version": "${VERSION}",
4
+ "description": "A Pulumi package for creating and managing dbt Cloud resources.",
5
+ "keywords": [
6
+ "pulumi",
7
+ "dbtcloud",
8
+ "dbt",
9
+ "cloud",
10
+ "category/cloud"
11
+ ],
12
+ "homepage": "https://www.pulumi.com",
13
+ "repository": "https://github.com/pulumi/pulumi-dbtcloud",
14
+ "license": "Apache-2.0",
15
+ "scripts": {
16
+ "build": "tsc"
17
+ },
18
+ "dependencies": {
19
+ "@pulumi/pulumi": "^3.0.0"
20
+ },
21
+ "devDependencies": {
22
+ "@types/mime": "^2.0.0",
23
+ "@types/node": "^10.0.0",
24
+ "typescript": "^4.3.5"
25
+ },
26
+ "pulumi": {
27
+ "resource": true,
28
+ "name": "dbtcloud",
29
+ "server": "github://api.github.com/pulumi/pulumi-dbtcloud"
30
+ }
31
+ }