@pulumi/snowflake 0.2.1-alpha.1632763694

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 (255) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +83 -0
  3. package/accountGrant.d.ts +97 -0
  4. package/accountGrant.js +80 -0
  5. package/accountGrant.js.map +1 -0
  6. package/apiIntegration.d.ts +181 -0
  7. package/apiIntegration.js +102 -0
  8. package/apiIntegration.js.map +1 -0
  9. package/config/index.d.ts +1 -0
  10. package/config/index.js +17 -0
  11. package/config/index.js.map +1 -0
  12. package/config/vars.d.ts +19 -0
  13. package/config/vars.js +97 -0
  14. package/config/vars.js.map +1 -0
  15. package/database.d.ts +97 -0
  16. package/database.js +81 -0
  17. package/database.js.map +1 -0
  18. package/databaseGrant.d.ts +126 -0
  19. package/databaseGrant.js +92 -0
  20. package/databaseGrant.js.map +1 -0
  21. package/externalFunction.d.ts +260 -0
  22. package/externalFunction.js +134 -0
  23. package/externalFunction.js.map +1 -0
  24. package/externalTable.d.ts +233 -0
  25. package/externalTable.js +124 -0
  26. package/externalTable.js.map +1 -0
  27. package/externalTableGrant.d.ts +165 -0
  28. package/externalTableGrant.js +104 -0
  29. package/externalTableGrant.js.map +1 -0
  30. package/fileFormat.d.ts +490 -0
  31. package/fileFormat.js +152 -0
  32. package/fileFormat.js.map +1 -0
  33. package/fileFormatGrant.d.ts +149 -0
  34. package/fileFormatGrant.js +98 -0
  35. package/fileFormatGrant.js.map +1 -0
  36. package/function.d.ts +157 -0
  37. package/function.js +81 -0
  38. package/function.js.map +1 -0
  39. package/functionGrant.d.ts +201 -0
  40. package/functionGrant.js +119 -0
  41. package/functionGrant.js.map +1 -0
  42. package/getCurrentAccount.d.ts +38 -0
  43. package/getCurrentAccount.js +33 -0
  44. package/getCurrentAccount.js.map +1 -0
  45. package/getExternalFunctions.d.ts +50 -0
  46. package/getExternalFunctions.js +34 -0
  47. package/getExternalFunctions.js.map +1 -0
  48. package/getExternalTables.d.ts +50 -0
  49. package/getExternalTables.js +34 -0
  50. package/getExternalTables.js.map +1 -0
  51. package/getFileFormats.d.ts +50 -0
  52. package/getFileFormats.js +34 -0
  53. package/getFileFormats.js.map +1 -0
  54. package/getFunctions.d.ts +50 -0
  55. package/getFunctions.js +34 -0
  56. package/getFunctions.js.map +1 -0
  57. package/getMaskingPolicies.d.ts +50 -0
  58. package/getMaskingPolicies.js +34 -0
  59. package/getMaskingPolicies.js.map +1 -0
  60. package/getMaterializedViews.d.ts +50 -0
  61. package/getMaterializedViews.js +34 -0
  62. package/getMaterializedViews.js.map +1 -0
  63. package/getPipes.d.ts +50 -0
  64. package/getPipes.js +34 -0
  65. package/getPipes.js.map +1 -0
  66. package/getProcedures.d.ts +50 -0
  67. package/getProcedures.js +34 -0
  68. package/getProcedures.js.map +1 -0
  69. package/getResourceMonitors.d.ts +26 -0
  70. package/getResourceMonitors.js +28 -0
  71. package/getResourceMonitors.js.map +1 -0
  72. package/getRowAccessPolicies.d.ts +50 -0
  73. package/getRowAccessPolicies.js +34 -0
  74. package/getRowAccessPolicies.js.map +1 -0
  75. package/getSchemas.d.ts +41 -0
  76. package/getSchemas.js +32 -0
  77. package/getSchemas.js.map +1 -0
  78. package/getSequences.d.ts +50 -0
  79. package/getSequences.js +34 -0
  80. package/getSequences.js.map +1 -0
  81. package/getStages.d.ts +50 -0
  82. package/getStages.js +34 -0
  83. package/getStages.js.map +1 -0
  84. package/getStorageIntegrations.d.ts +26 -0
  85. package/getStorageIntegrations.js +28 -0
  86. package/getStorageIntegrations.js.map +1 -0
  87. package/getStreams.d.ts +50 -0
  88. package/getStreams.js +34 -0
  89. package/getStreams.js.map +1 -0
  90. package/getSystemGenerateScimAccessToken.d.ts +40 -0
  91. package/getSystemGenerateScimAccessToken.js +32 -0
  92. package/getSystemGenerateScimAccessToken.js.map +1 -0
  93. package/getSystemGetAwsSnsIamPolicy.d.ts +28 -0
  94. package/getSystemGetAwsSnsIamPolicy.js +20 -0
  95. package/getSystemGetAwsSnsIamPolicy.js.map +1 -0
  96. package/getSystemGetPrivateLinkConfig.d.ts +31 -0
  97. package/getSystemGetPrivateLinkConfig.js +18 -0
  98. package/getSystemGetPrivateLinkConfig.js.map +1 -0
  99. package/getSystemGetSnowflakePlatformInfo.d.ts +19 -0
  100. package/getSystemGetSnowflakePlatformInfo.js +18 -0
  101. package/getSystemGetSnowflakePlatformInfo.js.map +1 -0
  102. package/getTables.d.ts +50 -0
  103. package/getTables.js +34 -0
  104. package/getTables.js.map +1 -0
  105. package/getTasks.d.ts +50 -0
  106. package/getTasks.js +34 -0
  107. package/getTasks.js.map +1 -0
  108. package/getViews.d.ts +50 -0
  109. package/getViews.js +34 -0
  110. package/getViews.js.map +1 -0
  111. package/getWarehouses.d.ts +26 -0
  112. package/getWarehouses.js +28 -0
  113. package/getWarehouses.js.map +1 -0
  114. package/index.d.ts +79 -0
  115. package/index.js +324 -0
  116. package/index.js.map +1 -0
  117. package/integrationGrant.d.ts +110 -0
  118. package/integrationGrant.js +86 -0
  119. package/integrationGrant.js.map +1 -0
  120. package/managedAccount.d.ts +160 -0
  121. package/managedAccount.js +99 -0
  122. package/managedAccount.js.map +1 -0
  123. package/maskingPolicy.d.ts +144 -0
  124. package/maskingPolicy.js +102 -0
  125. package/maskingPolicy.js.map +1 -0
  126. package/maskingPolicyGrant.d.ts +108 -0
  127. package/maskingPolicyGrant.js +70 -0
  128. package/maskingPolicyGrant.js.map +1 -0
  129. package/materializedView.d.ts +158 -0
  130. package/materializedView.js +103 -0
  131. package/materializedView.js.map +1 -0
  132. package/materializedViewGrant.d.ts +165 -0
  133. package/materializedViewGrant.js +101 -0
  134. package/materializedViewGrant.js.map +1 -0
  135. package/networkPolicy.d.ts +104 -0
  136. package/networkPolicy.js +80 -0
  137. package/networkPolicy.js.map +1 -0
  138. package/networkPolicyAttachment.d.ts +110 -0
  139. package/networkPolicyAttachment.js +81 -0
  140. package/networkPolicyAttachment.js.map +1 -0
  141. package/notificationIntegration.d.ts +191 -0
  142. package/notificationIntegration.js +103 -0
  143. package/notificationIntegration.js.map +1 -0
  144. package/package.json +27 -0
  145. package/package.json.bak +26 -0
  146. package/package.json.dev +26 -0
  147. package/pipe.d.ts +187 -0
  148. package/pipe.js +107 -0
  149. package/pipe.js.map +1 -0
  150. package/pipeGrant.d.ts +149 -0
  151. package/pipeGrant.js +98 -0
  152. package/pipeGrant.js.map +1 -0
  153. package/procedure.d.ts +201 -0
  154. package/procedure.js +125 -0
  155. package/procedure.js.map +1 -0
  156. package/procedureGrant.d.ts +201 -0
  157. package/procedureGrant.js +119 -0
  158. package/procedureGrant.js.map +1 -0
  159. package/provider.d.ts +64 -0
  160. package/provider.js +70 -0
  161. package/provider.js.map +1 -0
  162. package/resourceMonitor.d.ts +156 -0
  163. package/resourceMonitor.js +89 -0
  164. package/resourceMonitor.js.map +1 -0
  165. package/resourceMonitorGrant.d.ts +105 -0
  166. package/resourceMonitorGrant.js +81 -0
  167. package/resourceMonitorGrant.js.map +1 -0
  168. package/role.d.ts +60 -0
  169. package/role.js +71 -0
  170. package/role.js.map +1 -0
  171. package/roleGrants.d.ts +105 -0
  172. package/roleGrants.js +91 -0
  173. package/roleGrants.js.map +1 -0
  174. package/rowAccessPolicy.d.ts +140 -0
  175. package/rowAccessPolicy.js +99 -0
  176. package/rowAccessPolicy.js.map +1 -0
  177. package/rowAccessPolicyGrant.d.ts +136 -0
  178. package/rowAccessPolicyGrant.js +98 -0
  179. package/rowAccessPolicyGrant.js.map +1 -0
  180. package/schema.d.ts +132 -0
  181. package/schema.js +88 -0
  182. package/schema.js.map +1 -0
  183. package/schemaGrant.d.ts +155 -0
  184. package/schemaGrant.js +98 -0
  185. package/schemaGrant.js.map +1 -0
  186. package/scimIntegration.d.ts +112 -0
  187. package/scimIntegration.js +85 -0
  188. package/scimIntegration.js.map +1 -0
  189. package/scripts/install-pulumi-plugin.js +21 -0
  190. package/sequence.d.ts +127 -0
  191. package/sequence.js +84 -0
  192. package/sequence.js.map +1 -0
  193. package/sequenceGrant.d.ts +149 -0
  194. package/sequenceGrant.js +98 -0
  195. package/sequenceGrant.js.map +1 -0
  196. package/share.d.ts +90 -0
  197. package/share.js +73 -0
  198. package/share.js.map +1 -0
  199. package/stage.d.ts +192 -0
  200. package/stage.js +109 -0
  201. package/stage.js.map +1 -0
  202. package/stageGrant.d.ts +165 -0
  203. package/stageGrant.js +104 -0
  204. package/stageGrant.js.map +1 -0
  205. package/storageIntegration.d.ts +153 -0
  206. package/storageIntegration.js +109 -0
  207. package/storageIntegration.js.map +1 -0
  208. package/stream.d.ts +166 -0
  209. package/stream.js +99 -0
  210. package/stream.js.map +1 -0
  211. package/streamGrant.d.ts +149 -0
  212. package/streamGrant.js +98 -0
  213. package/streamGrant.js.map +1 -0
  214. package/table.d.ts +214 -0
  215. package/table.js +139 -0
  216. package/table.js.map +1 -0
  217. package/tableGrant.d.ts +159 -0
  218. package/tableGrant.js +95 -0
  219. package/tableGrant.js.map +1 -0
  220. package/task.d.ts +218 -0
  221. package/task.js +117 -0
  222. package/task.js.map +1 -0
  223. package/taskGrant.d.ts +149 -0
  224. package/taskGrant.js +98 -0
  225. package/taskGrant.js.map +1 -0
  226. package/types/index.d.ts +3 -0
  227. package/types/index.js +11 -0
  228. package/types/index.js.map +1 -0
  229. package/types/input.d.ts +113 -0
  230. package/types/input.js +5 -0
  231. package/types/input.js.map +1 -0
  232. package/types/output.d.ts +331 -0
  233. package/types/output.js +5 -0
  234. package/types/output.js.map +1 -0
  235. package/user.d.ts +236 -0
  236. package/user.js +111 -0
  237. package/user.js.map +1 -0
  238. package/userPublicKeys.d.ts +72 -0
  239. package/userPublicKeys.js +55 -0
  240. package/userPublicKeys.js.map +1 -0
  241. package/utilities.d.ts +4 -0
  242. package/utilities.js +52 -0
  243. package/utilities.js.map +1 -0
  244. package/view.d.ts +145 -0
  245. package/view.js +97 -0
  246. package/view.js.map +1 -0
  247. package/viewGrant.d.ts +165 -0
  248. package/viewGrant.js +101 -0
  249. package/viewGrant.js.map +1 -0
  250. package/warehouse.d.ts +214 -0
  251. package/warehouse.js +96 -0
  252. package/warehouse.js.map +1 -0
  253. package/warehouseGrant.d.ts +107 -0
  254. package/warehouseGrant.js +83 -0
  255. package/warehouseGrant.js.map +1 -0
@@ -0,0 +1,89 @@
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.ResourceMonitor = 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 snowflake from "@pulumi/snowflake";
14
+ *
15
+ * const monitor = new snowflake.ResourceMonitor("monitor", {
16
+ * creditQuota: 100,
17
+ * endTimestamp: "2021-12-07 00:00",
18
+ * frequency: "DAILY",
19
+ * notifyTriggers: [40],
20
+ * startTimestamp: "2020-12-07 00:00",
21
+ * suspendImmediateTriggers: [90],
22
+ * suspendTriggers: [50],
23
+ * });
24
+ * ```
25
+ *
26
+ * ## Import
27
+ *
28
+ * ```sh
29
+ * $ pulumi import snowflake:index/resourceMonitor:ResourceMonitor example
30
+ * ```
31
+ */
32
+ class ResourceMonitor extends pulumi.CustomResource {
33
+ constructor(name, argsOrState, opts) {
34
+ let inputs = {};
35
+ opts = opts || {};
36
+ if (opts.id) {
37
+ const state = argsOrState;
38
+ inputs["creditQuota"] = state ? state.creditQuota : undefined;
39
+ inputs["endTimestamp"] = state ? state.endTimestamp : undefined;
40
+ inputs["frequency"] = state ? state.frequency : undefined;
41
+ inputs["name"] = state ? state.name : undefined;
42
+ inputs["notifyTriggers"] = state ? state.notifyTriggers : undefined;
43
+ inputs["startTimestamp"] = state ? state.startTimestamp : undefined;
44
+ inputs["suspendImmediateTriggers"] = state ? state.suspendImmediateTriggers : undefined;
45
+ inputs["suspendTriggers"] = state ? state.suspendTriggers : undefined;
46
+ }
47
+ else {
48
+ const args = argsOrState;
49
+ inputs["creditQuota"] = args ? args.creditQuota : undefined;
50
+ inputs["endTimestamp"] = args ? args.endTimestamp : undefined;
51
+ inputs["frequency"] = args ? args.frequency : undefined;
52
+ inputs["name"] = args ? args.name : undefined;
53
+ inputs["notifyTriggers"] = args ? args.notifyTriggers : undefined;
54
+ inputs["startTimestamp"] = args ? args.startTimestamp : undefined;
55
+ inputs["suspendImmediateTriggers"] = args ? args.suspendImmediateTriggers : undefined;
56
+ inputs["suspendTriggers"] = args ? args.suspendTriggers : undefined;
57
+ }
58
+ if (!opts.version) {
59
+ opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
60
+ }
61
+ super(ResourceMonitor.__pulumiType, name, inputs, opts);
62
+ }
63
+ /**
64
+ * Get an existing ResourceMonitor resource's state with the given name, ID, and optional extra
65
+ * properties used to qualify the lookup.
66
+ *
67
+ * @param name The _unique_ name of the resulting resource.
68
+ * @param id The _unique_ provider ID of the resource to lookup.
69
+ * @param state Any extra arguments used during the lookup.
70
+ * @param opts Optional settings to control the behavior of the CustomResource.
71
+ */
72
+ static get(name, id, state, opts) {
73
+ return new ResourceMonitor(name, state, Object.assign(Object.assign({}, opts), { id: id }));
74
+ }
75
+ /**
76
+ * Returns true if the given object is an instance of ResourceMonitor. This is designed to work even
77
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
78
+ */
79
+ static isInstance(obj) {
80
+ if (obj === undefined || obj === null) {
81
+ return false;
82
+ }
83
+ return obj['__pulumiType'] === ResourceMonitor.__pulumiType;
84
+ }
85
+ }
86
+ exports.ResourceMonitor = ResourceMonitor;
87
+ /** @internal */
88
+ ResourceMonitor.__pulumiType = 'snowflake:index/resourceMonitor:ResourceMonitor';
89
+ //# sourceMappingURL=resourceMonitor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceMonitor.js","sourceRoot":"","sources":["../resourceMonit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ACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAA4B,EAAE,IAAmC;QAC1H,OAAO,IAAI,eAAe,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IACtE,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,eAAe,CAAC,YAAY,CAAC;IAChE,CAAC;;AA1BL,0CAkGC;AApFG,gBAAgB;AACO,4BAAY,GAAG,iDAAiD,CAAC"}
@@ -0,0 +1,105 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * ## Example Usage
4
+ *
5
+ * ```typescript
6
+ * import * as pulumi from "@pulumi/pulumi";
7
+ * import * as snowflake from "@pulumi/snowflake";
8
+ *
9
+ * const grant = new snowflake.MonitorGrant("grant", {
10
+ * monitorName: "monitor",
11
+ * privilege: "MODIFY",
12
+ * roles: ["role1"],
13
+ * withGrantOption: false,
14
+ * });
15
+ * ```
16
+ *
17
+ * ## Import
18
+ *
19
+ * ```sh
20
+ * $ pulumi import snowflake:index/resourceMonitorGrant:ResourceMonitorGrant example name
21
+ * ```
22
+ */
23
+ export declare class ResourceMonitorGrant extends pulumi.CustomResource {
24
+ /**
25
+ * Get an existing ResourceMonitorGrant resource's state with the given name, ID, and optional extra
26
+ * properties used to qualify the lookup.
27
+ *
28
+ * @param name The _unique_ name of the resulting resource.
29
+ * @param id The _unique_ provider ID of the resource to lookup.
30
+ * @param state Any extra arguments used during the lookup.
31
+ * @param opts Optional settings to control the behavior of the CustomResource.
32
+ */
33
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ResourceMonitorGrantState, opts?: pulumi.CustomResourceOptions): ResourceMonitorGrant;
34
+ /**
35
+ * Returns true if the given object is an instance of ResourceMonitorGrant. This is designed to work even
36
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
37
+ */
38
+ static isInstance(obj: any): obj is ResourceMonitorGrant;
39
+ /**
40
+ * Identifier for the resource monitor; must be unique for your account.
41
+ */
42
+ readonly monitorName: pulumi.Output<string>;
43
+ /**
44
+ * The privilege to grant on the resource monitor.
45
+ */
46
+ readonly privilege: pulumi.Output<string | undefined>;
47
+ /**
48
+ * Grants privilege to these roles.
49
+ */
50
+ readonly roles: pulumi.Output<string[] | undefined>;
51
+ /**
52
+ * When this is set to true, allows the recipient role to grant the privileges to other roles.
53
+ */
54
+ readonly withGrantOption: pulumi.Output<boolean | undefined>;
55
+ /**
56
+ * Create a ResourceMonitorGrant resource with the given unique name, arguments, and options.
57
+ *
58
+ * @param name The _unique_ name of the resource.
59
+ * @param args The arguments to use to populate this resource's properties.
60
+ * @param opts A bag of options that control this resource's behavior.
61
+ */
62
+ constructor(name: string, args: ResourceMonitorGrantArgs, opts?: pulumi.CustomResourceOptions);
63
+ }
64
+ /**
65
+ * Input properties used for looking up and filtering ResourceMonitorGrant resources.
66
+ */
67
+ export interface ResourceMonitorGrantState {
68
+ /**
69
+ * Identifier for the resource monitor; must be unique for your account.
70
+ */
71
+ monitorName?: pulumi.Input<string>;
72
+ /**
73
+ * The privilege to grant on the resource monitor.
74
+ */
75
+ privilege?: pulumi.Input<string>;
76
+ /**
77
+ * Grants privilege to these roles.
78
+ */
79
+ roles?: pulumi.Input<pulumi.Input<string>[]>;
80
+ /**
81
+ * When this is set to true, allows the recipient role to grant the privileges to other roles.
82
+ */
83
+ withGrantOption?: pulumi.Input<boolean>;
84
+ }
85
+ /**
86
+ * The set of arguments for constructing a ResourceMonitorGrant resource.
87
+ */
88
+ export interface ResourceMonitorGrantArgs {
89
+ /**
90
+ * Identifier for the resource monitor; must be unique for your account.
91
+ */
92
+ monitorName: pulumi.Input<string>;
93
+ /**
94
+ * The privilege to grant on the resource monitor.
95
+ */
96
+ privilege?: pulumi.Input<string>;
97
+ /**
98
+ * Grants privilege to these roles.
99
+ */
100
+ roles?: pulumi.Input<pulumi.Input<string>[]>;
101
+ /**
102
+ * When this is set to true, allows the recipient role to grant the privileges to other roles.
103
+ */
104
+ withGrantOption?: pulumi.Input<boolean>;
105
+ }
@@ -0,0 +1,81 @@
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.ResourceMonitorGrant = 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 snowflake from "@pulumi/snowflake";
14
+ *
15
+ * const grant = new snowflake.MonitorGrant("grant", {
16
+ * monitorName: "monitor",
17
+ * privilege: "MODIFY",
18
+ * roles: ["role1"],
19
+ * withGrantOption: false,
20
+ * });
21
+ * ```
22
+ *
23
+ * ## Import
24
+ *
25
+ * ```sh
26
+ * $ pulumi import snowflake:index/resourceMonitorGrant:ResourceMonitorGrant example name
27
+ * ```
28
+ */
29
+ class ResourceMonitorGrant extends pulumi.CustomResource {
30
+ constructor(name, argsOrState, opts) {
31
+ let inputs = {};
32
+ opts = opts || {};
33
+ if (opts.id) {
34
+ const state = argsOrState;
35
+ inputs["monitorName"] = state ? state.monitorName : undefined;
36
+ inputs["privilege"] = state ? state.privilege : undefined;
37
+ inputs["roles"] = state ? state.roles : undefined;
38
+ inputs["withGrantOption"] = state ? state.withGrantOption : undefined;
39
+ }
40
+ else {
41
+ const args = argsOrState;
42
+ if ((!args || args.monitorName === undefined) && !opts.urn) {
43
+ throw new Error("Missing required property 'monitorName'");
44
+ }
45
+ inputs["monitorName"] = args ? args.monitorName : undefined;
46
+ inputs["privilege"] = args ? args.privilege : undefined;
47
+ inputs["roles"] = args ? args.roles : undefined;
48
+ inputs["withGrantOption"] = args ? args.withGrantOption : undefined;
49
+ }
50
+ if (!opts.version) {
51
+ opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
52
+ }
53
+ super(ResourceMonitorGrant.__pulumiType, name, inputs, opts);
54
+ }
55
+ /**
56
+ * Get an existing ResourceMonitorGrant resource's state with the given name, ID, and optional extra
57
+ * properties used to qualify the lookup.
58
+ *
59
+ * @param name The _unique_ name of the resulting resource.
60
+ * @param id The _unique_ provider ID of the resource to lookup.
61
+ * @param state Any extra arguments used during the lookup.
62
+ * @param opts Optional settings to control the behavior of the CustomResource.
63
+ */
64
+ static get(name, id, state, opts) {
65
+ return new ResourceMonitorGrant(name, state, Object.assign(Object.assign({}, opts), { id: id }));
66
+ }
67
+ /**
68
+ * Returns true if the given object is an instance of ResourceMonitorGrant. This is designed to work even
69
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
70
+ */
71
+ static isInstance(obj) {
72
+ if (obj === undefined || obj === null) {
73
+ return false;
74
+ }
75
+ return obj['__pulumiType'] === ResourceMonitorGrant.__pulumiType;
76
+ }
77
+ }
78
+ exports.ResourceMonitorGrant = ResourceMonitorGrant;
79
+ /** @internal */
80
+ ResourceMonitorGrant.__pulumiType = 'snowflake:index/resourceMonitorGrant:ResourceMonitorGrant';
81
+ //# sourceMappingURL=resourceMonitorGrant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceMonitorGrant.js","sourceRoot":"","sources":["../resourceMonitorGrant.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAa,oBAAqB,SAAQ,MAAM,CAAC,cAAc;IAqD3D,YAAY,IAAY,EAAE,WAAkE,EAAE,IAAmC;QAC7H,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB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YAAY,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,CAAC,UAAU,EAAE,EAAC,CAAC,CAAC;SACxE;QACD,KAAK,CAAC,oBAAoB,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;IA3ED;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAiC,EAAE,IAAmC;QAC/H,OAAO,IAAI,oBAAoB,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAC3E,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,oBAAoB,CAAC,YAAY,CAAC;IACrE,CAAC;;AA1BL,oDA6EC;AA/DG,gBAAgB;AACO,iCAAY,GAAG,2DAA2D,CAAC"}
package/role.d.ts ADDED
@@ -0,0 +1,60 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * ## Example Usage
4
+ *
5
+ * ```typescript
6
+ * import * as pulumi from "@pulumi/pulumi";
7
+ * import * as snowflake from "@pulumi/snowflake";
8
+ *
9
+ * const role = new snowflake.Role("role", {
10
+ * comment: "A role.",
11
+ * });
12
+ * ```
13
+ *
14
+ * ## Import
15
+ *
16
+ * ```sh
17
+ * $ pulumi import snowflake:index/role:Role example roleName
18
+ * ```
19
+ */
20
+ export declare class Role extends pulumi.CustomResource {
21
+ /**
22
+ * Get an existing Role resource's state with the given name, ID, and optional extra
23
+ * properties used to qualify the lookup.
24
+ *
25
+ * @param name The _unique_ name of the resulting resource.
26
+ * @param id The _unique_ provider ID of the resource to lookup.
27
+ * @param state Any extra arguments used during the lookup.
28
+ * @param opts Optional settings to control the behavior of the CustomResource.
29
+ */
30
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RoleState, opts?: pulumi.CustomResourceOptions): Role;
31
+ /**
32
+ * Returns true if the given object is an instance of Role. This is designed to work even
33
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
34
+ */
35
+ static isInstance(obj: any): obj is Role;
36
+ readonly comment: pulumi.Output<string | undefined>;
37
+ readonly name: pulumi.Output<string>;
38
+ /**
39
+ * Create a Role resource with the given unique name, arguments, and options.
40
+ *
41
+ * @param name The _unique_ name of the resource.
42
+ * @param args The arguments to use to populate this resource's properties.
43
+ * @param opts A bag of options that control this resource's behavior.
44
+ */
45
+ constructor(name: string, args?: RoleArgs, opts?: pulumi.CustomResourceOptions);
46
+ }
47
+ /**
48
+ * Input properties used for looking up and filtering Role resources.
49
+ */
50
+ export interface RoleState {
51
+ comment?: pulumi.Input<string>;
52
+ name?: pulumi.Input<string>;
53
+ }
54
+ /**
55
+ * The set of arguments for constructing a Role resource.
56
+ */
57
+ export interface RoleArgs {
58
+ comment?: pulumi.Input<string>;
59
+ name?: pulumi.Input<string>;
60
+ }
package/role.js ADDED
@@ -0,0 +1,71 @@
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.Role = 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 snowflake from "@pulumi/snowflake";
14
+ *
15
+ * const role = new snowflake.Role("role", {
16
+ * comment: "A role.",
17
+ * });
18
+ * ```
19
+ *
20
+ * ## Import
21
+ *
22
+ * ```sh
23
+ * $ pulumi import snowflake:index/role:Role example roleName
24
+ * ```
25
+ */
26
+ class Role extends pulumi.CustomResource {
27
+ constructor(name, argsOrState, opts) {
28
+ let inputs = {};
29
+ opts = opts || {};
30
+ if (opts.id) {
31
+ const state = argsOrState;
32
+ inputs["comment"] = state ? state.comment : undefined;
33
+ inputs["name"] = state ? state.name : undefined;
34
+ }
35
+ else {
36
+ const args = argsOrState;
37
+ inputs["comment"] = args ? args.comment : undefined;
38
+ inputs["name"] = args ? args.name : undefined;
39
+ }
40
+ if (!opts.version) {
41
+ opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
42
+ }
43
+ super(Role.__pulumiType, name, inputs, opts);
44
+ }
45
+ /**
46
+ * Get an existing Role 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 Role(name, state, Object.assign(Object.assign({}, opts), { id: id }));
56
+ }
57
+ /**
58
+ * Returns true if the given object is an instance of Role. 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'] === Role.__pulumiType;
66
+ }
67
+ }
68
+ exports.Role = Role;
69
+ /** @internal */
70
+ Role.__pulumiType = 'snowflake:index/role:Role';
71
+ //# sourceMappingURL=role.js.map
package/role.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role.js","sourceRoot":"","sources":["../role.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAuC3C,YAAY,IAAY,EAAE,WAAkC,EAAE,IAAmC;QAC7F,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GA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,IAAI,CAAC,YAAY,CAAC;IACrD,CAAC;;AA1BL,oBAwDC;AA1CG,gBAAgB;AACO,iBAAY,GAAG,2BAA2B,CAAC"}
@@ -0,0 +1,105 @@
1
+ import * as pulumi from "@pulumi/pulumi";
2
+ /**
3
+ * ## Example Usage
4
+ *
5
+ * ```typescript
6
+ * import * as pulumi from "@pulumi/pulumi";
7
+ * import * as snowflake from "@pulumi/snowflake";
8
+ *
9
+ * const role = new snowflake.Role("role", {
10
+ * comment: "for testing",
11
+ * });
12
+ * const user = new snowflake.User("user", {
13
+ * comment: "for testing",
14
+ * });
15
+ * const user2 = new snowflake.User("user2", {
16
+ * comment: "for testing",
17
+ * });
18
+ * const otherRole = new snowflake.Role("other_role", {});
19
+ * const grants = new snowflake.RoleGrants("grants", {
20
+ * roleName: role.name,
21
+ * roles: [otherRole.name],
22
+ * users: [
23
+ * user.name,
24
+ * user2.name,
25
+ * ],
26
+ * });
27
+ * ```
28
+ *
29
+ * ## Import
30
+ *
31
+ * ```sh
32
+ * $ pulumi import snowflake:index/roleGrants:RoleGrants example rolename
33
+ * ```
34
+ */
35
+ export declare class RoleGrants extends pulumi.CustomResource {
36
+ /**
37
+ * Get an existing RoleGrants resource's state with the given name, ID, and optional extra
38
+ * properties used to qualify the lookup.
39
+ *
40
+ * @param name The _unique_ name of the resulting resource.
41
+ * @param id The _unique_ provider ID of the resource to lookup.
42
+ * @param state Any extra arguments used during the lookup.
43
+ * @param opts Optional settings to control the behavior of the CustomResource.
44
+ */
45
+ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: RoleGrantsState, opts?: pulumi.CustomResourceOptions): RoleGrants;
46
+ /**
47
+ * Returns true if the given object is an instance of RoleGrants. This is designed to work even
48
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
49
+ */
50
+ static isInstance(obj: any): obj is RoleGrants;
51
+ /**
52
+ * The name of the role we are granting.
53
+ */
54
+ readonly roleName: pulumi.Output<string>;
55
+ /**
56
+ * Grants role to this specified role.
57
+ */
58
+ readonly roles: pulumi.Output<string[] | undefined>;
59
+ /**
60
+ * Grants role to this specified user.
61
+ */
62
+ readonly users: pulumi.Output<string[] | undefined>;
63
+ /**
64
+ * Create a RoleGrants resource with the given unique name, arguments, and options.
65
+ *
66
+ * @param name The _unique_ name of the resource.
67
+ * @param args The arguments to use to populate this resource's properties.
68
+ * @param opts A bag of options that control this resource's behavior.
69
+ */
70
+ constructor(name: string, args: RoleGrantsArgs, opts?: pulumi.CustomResourceOptions);
71
+ }
72
+ /**
73
+ * Input properties used for looking up and filtering RoleGrants resources.
74
+ */
75
+ export interface RoleGrantsState {
76
+ /**
77
+ * The name of the role we are granting.
78
+ */
79
+ roleName?: pulumi.Input<string>;
80
+ /**
81
+ * Grants role to this specified role.
82
+ */
83
+ roles?: pulumi.Input<pulumi.Input<string>[]>;
84
+ /**
85
+ * Grants role to this specified user.
86
+ */
87
+ users?: pulumi.Input<pulumi.Input<string>[]>;
88
+ }
89
+ /**
90
+ * The set of arguments for constructing a RoleGrants resource.
91
+ */
92
+ export interface RoleGrantsArgs {
93
+ /**
94
+ * The name of the role we are granting.
95
+ */
96
+ roleName: pulumi.Input<string>;
97
+ /**
98
+ * Grants role to this specified role.
99
+ */
100
+ roles?: pulumi.Input<pulumi.Input<string>[]>;
101
+ /**
102
+ * Grants role to this specified user.
103
+ */
104
+ users?: pulumi.Input<pulumi.Input<string>[]>;
105
+ }
package/roleGrants.js ADDED
@@ -0,0 +1,91 @@
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.RoleGrants = 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 snowflake from "@pulumi/snowflake";
14
+ *
15
+ * const role = new snowflake.Role("role", {
16
+ * comment: "for testing",
17
+ * });
18
+ * const user = new snowflake.User("user", {
19
+ * comment: "for testing",
20
+ * });
21
+ * const user2 = new snowflake.User("user2", {
22
+ * comment: "for testing",
23
+ * });
24
+ * const otherRole = new snowflake.Role("other_role", {});
25
+ * const grants = new snowflake.RoleGrants("grants", {
26
+ * roleName: role.name,
27
+ * roles: [otherRole.name],
28
+ * users: [
29
+ * user.name,
30
+ * user2.name,
31
+ * ],
32
+ * });
33
+ * ```
34
+ *
35
+ * ## Import
36
+ *
37
+ * ```sh
38
+ * $ pulumi import snowflake:index/roleGrants:RoleGrants example rolename
39
+ * ```
40
+ */
41
+ class RoleGrants extends pulumi.CustomResource {
42
+ constructor(name, argsOrState, opts) {
43
+ let inputs = {};
44
+ opts = opts || {};
45
+ if (opts.id) {
46
+ const state = argsOrState;
47
+ inputs["roleName"] = state ? state.roleName : undefined;
48
+ inputs["roles"] = state ? state.roles : undefined;
49
+ inputs["users"] = state ? state.users : undefined;
50
+ }
51
+ else {
52
+ const args = argsOrState;
53
+ if ((!args || args.roleName === undefined) && !opts.urn) {
54
+ throw new Error("Missing required property 'roleName'");
55
+ }
56
+ inputs["roleName"] = args ? args.roleName : undefined;
57
+ inputs["roles"] = args ? args.roles : undefined;
58
+ inputs["users"] = args ? args.users : undefined;
59
+ }
60
+ if (!opts.version) {
61
+ opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
62
+ }
63
+ super(RoleGrants.__pulumiType, name, inputs, opts);
64
+ }
65
+ /**
66
+ * Get an existing RoleGrants resource's state with the given name, ID, and optional extra
67
+ * properties used to qualify the lookup.
68
+ *
69
+ * @param name The _unique_ name of the resulting resource.
70
+ * @param id The _unique_ provider ID of the resource to lookup.
71
+ * @param state Any extra arguments used during the lookup.
72
+ * @param opts Optional settings to control the behavior of the CustomResource.
73
+ */
74
+ static get(name, id, state, opts) {
75
+ return new RoleGrants(name, state, Object.assign(Object.assign({}, opts), { id: id }));
76
+ }
77
+ /**
78
+ * Returns true if the given object is an instance of RoleGrants. This is designed to work even
79
+ * when multiple copies of the Pulumi SDK have been loaded into the same process.
80
+ */
81
+ static isInstance(obj) {
82
+ if (obj === undefined || obj === null) {
83
+ return false;
84
+ }
85
+ return obj['__pulumiType'] === RoleGrants.__pulumiType;
86
+ }
87
+ }
88
+ exports.RoleGrants = RoleGrants;
89
+ /** @internal */
90
+ RoleGrants.__pulumiType = 'snowflake:index/roleGrants:RoleGrants';
91
+ //# sourceMappingURL=roleGrants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roleGrants.js","sourceRoot":"","sources":["../roleGrants.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAa,UAAW,SAAQ,MAAM,CAAC,cAAc;IAiDjD,YAAY,IAAY,EAAE,WAA8C,EAAE,IAAmC;QACzG,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAA0C,CAAC;YACzD,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;YACxD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YAClD,MAAM,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;SACrD;aAAM;YACH,MAAM,IAAI,GAAG,WAAyC,CAAC;YACvD,IAAI,CAAC,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,CAAC,IAAI,CAAC,IAAI,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