@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.
- package/LICENSE +202 -0
- package/README.md +83 -0
- package/accountGrant.d.ts +97 -0
- package/accountGrant.js +80 -0
- package/accountGrant.js.map +1 -0
- package/apiIntegration.d.ts +181 -0
- package/apiIntegration.js +102 -0
- package/apiIntegration.js.map +1 -0
- package/config/index.d.ts +1 -0
- package/config/index.js +17 -0
- package/config/index.js.map +1 -0
- package/config/vars.d.ts +19 -0
- package/config/vars.js +97 -0
- package/config/vars.js.map +1 -0
- package/database.d.ts +97 -0
- package/database.js +81 -0
- package/database.js.map +1 -0
- package/databaseGrant.d.ts +126 -0
- package/databaseGrant.js +92 -0
- package/databaseGrant.js.map +1 -0
- package/externalFunction.d.ts +260 -0
- package/externalFunction.js +134 -0
- package/externalFunction.js.map +1 -0
- package/externalTable.d.ts +233 -0
- package/externalTable.js +124 -0
- package/externalTable.js.map +1 -0
- package/externalTableGrant.d.ts +165 -0
- package/externalTableGrant.js +104 -0
- package/externalTableGrant.js.map +1 -0
- package/fileFormat.d.ts +490 -0
- package/fileFormat.js +152 -0
- package/fileFormat.js.map +1 -0
- package/fileFormatGrant.d.ts +149 -0
- package/fileFormatGrant.js +98 -0
- package/fileFormatGrant.js.map +1 -0
- package/function.d.ts +157 -0
- package/function.js +81 -0
- package/function.js.map +1 -0
- package/functionGrant.d.ts +201 -0
- package/functionGrant.js +119 -0
- package/functionGrant.js.map +1 -0
- package/getCurrentAccount.d.ts +38 -0
- package/getCurrentAccount.js +33 -0
- package/getCurrentAccount.js.map +1 -0
- package/getExternalFunctions.d.ts +50 -0
- package/getExternalFunctions.js +34 -0
- package/getExternalFunctions.js.map +1 -0
- package/getExternalTables.d.ts +50 -0
- package/getExternalTables.js +34 -0
- package/getExternalTables.js.map +1 -0
- package/getFileFormats.d.ts +50 -0
- package/getFileFormats.js +34 -0
- package/getFileFormats.js.map +1 -0
- package/getFunctions.d.ts +50 -0
- package/getFunctions.js +34 -0
- package/getFunctions.js.map +1 -0
- package/getMaskingPolicies.d.ts +50 -0
- package/getMaskingPolicies.js +34 -0
- package/getMaskingPolicies.js.map +1 -0
- package/getMaterializedViews.d.ts +50 -0
- package/getMaterializedViews.js +34 -0
- package/getMaterializedViews.js.map +1 -0
- package/getPipes.d.ts +50 -0
- package/getPipes.js +34 -0
- package/getPipes.js.map +1 -0
- package/getProcedures.d.ts +50 -0
- package/getProcedures.js +34 -0
- package/getProcedures.js.map +1 -0
- package/getResourceMonitors.d.ts +26 -0
- package/getResourceMonitors.js +28 -0
- package/getResourceMonitors.js.map +1 -0
- package/getRowAccessPolicies.d.ts +50 -0
- package/getRowAccessPolicies.js +34 -0
- package/getRowAccessPolicies.js.map +1 -0
- package/getSchemas.d.ts +41 -0
- package/getSchemas.js +32 -0
- package/getSchemas.js.map +1 -0
- package/getSequences.d.ts +50 -0
- package/getSequences.js +34 -0
- package/getSequences.js.map +1 -0
- package/getStages.d.ts +50 -0
- package/getStages.js +34 -0
- package/getStages.js.map +1 -0
- package/getStorageIntegrations.d.ts +26 -0
- package/getStorageIntegrations.js +28 -0
- package/getStorageIntegrations.js.map +1 -0
- package/getStreams.d.ts +50 -0
- package/getStreams.js +34 -0
- package/getStreams.js.map +1 -0
- package/getSystemGenerateScimAccessToken.d.ts +40 -0
- package/getSystemGenerateScimAccessToken.js +32 -0
- package/getSystemGenerateScimAccessToken.js.map +1 -0
- package/getSystemGetAwsSnsIamPolicy.d.ts +28 -0
- package/getSystemGetAwsSnsIamPolicy.js +20 -0
- package/getSystemGetAwsSnsIamPolicy.js.map +1 -0
- package/getSystemGetPrivateLinkConfig.d.ts +31 -0
- package/getSystemGetPrivateLinkConfig.js +18 -0
- package/getSystemGetPrivateLinkConfig.js.map +1 -0
- package/getSystemGetSnowflakePlatformInfo.d.ts +19 -0
- package/getSystemGetSnowflakePlatformInfo.js +18 -0
- package/getSystemGetSnowflakePlatformInfo.js.map +1 -0
- package/getTables.d.ts +50 -0
- package/getTables.js +34 -0
- package/getTables.js.map +1 -0
- package/getTasks.d.ts +50 -0
- package/getTasks.js +34 -0
- package/getTasks.js.map +1 -0
- package/getViews.d.ts +50 -0
- package/getViews.js +34 -0
- package/getViews.js.map +1 -0
- package/getWarehouses.d.ts +26 -0
- package/getWarehouses.js +28 -0
- package/getWarehouses.js.map +1 -0
- package/index.d.ts +79 -0
- package/index.js +324 -0
- package/index.js.map +1 -0
- package/integrationGrant.d.ts +110 -0
- package/integrationGrant.js +86 -0
- package/integrationGrant.js.map +1 -0
- package/managedAccount.d.ts +160 -0
- package/managedAccount.js +99 -0
- package/managedAccount.js.map +1 -0
- package/maskingPolicy.d.ts +144 -0
- package/maskingPolicy.js +102 -0
- package/maskingPolicy.js.map +1 -0
- package/maskingPolicyGrant.d.ts +108 -0
- package/maskingPolicyGrant.js +70 -0
- package/maskingPolicyGrant.js.map +1 -0
- package/materializedView.d.ts +158 -0
- package/materializedView.js +103 -0
- package/materializedView.js.map +1 -0
- package/materializedViewGrant.d.ts +165 -0
- package/materializedViewGrant.js +101 -0
- package/materializedViewGrant.js.map +1 -0
- package/networkPolicy.d.ts +104 -0
- package/networkPolicy.js +80 -0
- package/networkPolicy.js.map +1 -0
- package/networkPolicyAttachment.d.ts +110 -0
- package/networkPolicyAttachment.js +81 -0
- package/networkPolicyAttachment.js.map +1 -0
- package/notificationIntegration.d.ts +191 -0
- package/notificationIntegration.js +103 -0
- package/notificationIntegration.js.map +1 -0
- package/package.json +27 -0
- package/package.json.bak +26 -0
- package/package.json.dev +26 -0
- package/pipe.d.ts +187 -0
- package/pipe.js +107 -0
- package/pipe.js.map +1 -0
- package/pipeGrant.d.ts +149 -0
- package/pipeGrant.js +98 -0
- package/pipeGrant.js.map +1 -0
- package/procedure.d.ts +201 -0
- package/procedure.js +125 -0
- package/procedure.js.map +1 -0
- package/procedureGrant.d.ts +201 -0
- package/procedureGrant.js +119 -0
- package/procedureGrant.js.map +1 -0
- package/provider.d.ts +64 -0
- package/provider.js +70 -0
- package/provider.js.map +1 -0
- package/resourceMonitor.d.ts +156 -0
- package/resourceMonitor.js +89 -0
- package/resourceMonitor.js.map +1 -0
- package/resourceMonitorGrant.d.ts +105 -0
- package/resourceMonitorGrant.js +81 -0
- package/resourceMonitorGrant.js.map +1 -0
- package/role.d.ts +60 -0
- package/role.js +71 -0
- package/role.js.map +1 -0
- package/roleGrants.d.ts +105 -0
- package/roleGrants.js +91 -0
- package/roleGrants.js.map +1 -0
- package/rowAccessPolicy.d.ts +140 -0
- package/rowAccessPolicy.js +99 -0
- package/rowAccessPolicy.js.map +1 -0
- package/rowAccessPolicyGrant.d.ts +136 -0
- package/rowAccessPolicyGrant.js +98 -0
- package/rowAccessPolicyGrant.js.map +1 -0
- package/schema.d.ts +132 -0
- package/schema.js +88 -0
- package/schema.js.map +1 -0
- package/schemaGrant.d.ts +155 -0
- package/schemaGrant.js +98 -0
- package/schemaGrant.js.map +1 -0
- package/scimIntegration.d.ts +112 -0
- package/scimIntegration.js +85 -0
- package/scimIntegration.js.map +1 -0
- package/scripts/install-pulumi-plugin.js +21 -0
- package/sequence.d.ts +127 -0
- package/sequence.js +84 -0
- package/sequence.js.map +1 -0
- package/sequenceGrant.d.ts +149 -0
- package/sequenceGrant.js +98 -0
- package/sequenceGrant.js.map +1 -0
- package/share.d.ts +90 -0
- package/share.js +73 -0
- package/share.js.map +1 -0
- package/stage.d.ts +192 -0
- package/stage.js +109 -0
- package/stage.js.map +1 -0
- package/stageGrant.d.ts +165 -0
- package/stageGrant.js +104 -0
- package/stageGrant.js.map +1 -0
- package/storageIntegration.d.ts +153 -0
- package/storageIntegration.js +109 -0
- package/storageIntegration.js.map +1 -0
- package/stream.d.ts +166 -0
- package/stream.js +99 -0
- package/stream.js.map +1 -0
- package/streamGrant.d.ts +149 -0
- package/streamGrant.js +98 -0
- package/streamGrant.js.map +1 -0
- package/table.d.ts +214 -0
- package/table.js +139 -0
- package/table.js.map +1 -0
- package/tableGrant.d.ts +159 -0
- package/tableGrant.js +95 -0
- package/tableGrant.js.map +1 -0
- package/task.d.ts +218 -0
- package/task.js +117 -0
- package/task.js.map +1 -0
- package/taskGrant.d.ts +149 -0
- package/taskGrant.js +98 -0
- package/taskGrant.js.map +1 -0
- package/types/index.d.ts +3 -0
- package/types/index.js +11 -0
- package/types/index.js.map +1 -0
- package/types/input.d.ts +113 -0
- package/types/input.js +5 -0
- package/types/input.js.map +1 -0
- package/types/output.d.ts +331 -0
- package/types/output.js +5 -0
- package/types/output.js.map +1 -0
- package/user.d.ts +236 -0
- package/user.js +111 -0
- package/user.js.map +1 -0
- package/userPublicKeys.d.ts +72 -0
- package/userPublicKeys.js +55 -0
- package/userPublicKeys.js.map +1 -0
- package/utilities.d.ts +4 -0
- package/utilities.js +52 -0
- package/utilities.js.map +1 -0
- package/view.d.ts +145 -0
- package/view.js +97 -0
- package/view.js.map +1 -0
- package/viewGrant.d.ts +165 -0
- package/viewGrant.js +101 -0
- package/viewGrant.js.map +1 -0
- package/warehouse.d.ts +214 -0
- package/warehouse.js +96 -0
- package/warehouse.js.map +1 -0
- package/warehouseGrant.d.ts +107 -0
- package/warehouseGrant.js +83 -0
- package/warehouseGrant.js.map +1 -0
package/pipe.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipe.js","sourceRoot":"","sources":["../pipe.ts"],"names":[],"mappings":";AAAA,wFAAwF;AACxF,iFAAiF;;;AAEjF,yCAAyC;AACzC,yCAAyC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,IAAK,SAAQ,MAAM,CAAC,cAAc;IAiF3C,YAAY,IAAY,EAAE,WAAkC,EAAE,IAAmC;QAC7F,IAAI,MAAM,GAAkB,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QAClB,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,MAAM,KAAK,GAAG,WAAoC,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i 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.PipeGrant("grant", {
|
|
10
|
+
* databaseName: "db",
|
|
11
|
+
* onFuture: false,
|
|
12
|
+
* privilege: "operate",
|
|
13
|
+
* roles: [
|
|
14
|
+
* "role1",
|
|
15
|
+
* "role2",
|
|
16
|
+
* ],
|
|
17
|
+
* schemaName: "schema",
|
|
18
|
+
* sequenceName: "sequence",
|
|
19
|
+
* withGrantOption: false,
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* ## Import
|
|
24
|
+
*
|
|
25
|
+
* # format is database name | schema name | pipe name | privilege | true/false for with_grant_option
|
|
26
|
+
*
|
|
27
|
+
* ```sh
|
|
28
|
+
* $ pulumi import snowflake:index/pipeGrant:PipeGrant example 'dbName|schemaName|pipeName|OPERATE|false'
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare class PipeGrant extends pulumi.CustomResource {
|
|
32
|
+
/**
|
|
33
|
+
* Get an existing PipeGrant resource's state with the given name, ID, and optional extra
|
|
34
|
+
* properties used to qualify the lookup.
|
|
35
|
+
*
|
|
36
|
+
* @param name The _unique_ name of the resulting resource.
|
|
37
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
38
|
+
* @param state Any extra arguments used during the lookup.
|
|
39
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
40
|
+
*/
|
|
41
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PipeGrantState, opts?: pulumi.CustomResourceOptions): PipeGrant;
|
|
42
|
+
/**
|
|
43
|
+
* Returns true if the given object is an instance of PipeGrant. This is designed to work even
|
|
44
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
45
|
+
*/
|
|
46
|
+
static isInstance(obj: any): obj is PipeGrant;
|
|
47
|
+
/**
|
|
48
|
+
* The name of the database containing the current or future pipes on which to grant privileges.
|
|
49
|
+
*/
|
|
50
|
+
readonly databaseName: pulumi.Output<string>;
|
|
51
|
+
/**
|
|
52
|
+
* When this is set to true and a schema*name is provided, apply this grant on all future pipes in the given schema. When this is true and no schema*name is provided apply this grant on all future pipes in the given database. The pipe*name field must be unset in order to use on*future.
|
|
53
|
+
*/
|
|
54
|
+
readonly onFuture: pulumi.Output<boolean | undefined>;
|
|
55
|
+
/**
|
|
56
|
+
* The name of the pipe on which to grant privileges immediately (only valid if onFuture is false).
|
|
57
|
+
*/
|
|
58
|
+
readonly pipeName: pulumi.Output<string | undefined>;
|
|
59
|
+
/**
|
|
60
|
+
* The privilege to grant on the current or future pipe.
|
|
61
|
+
*/
|
|
62
|
+
readonly privilege: pulumi.Output<string | undefined>;
|
|
63
|
+
/**
|
|
64
|
+
* Grants privilege to these roles.
|
|
65
|
+
*/
|
|
66
|
+
readonly roles: pulumi.Output<string[] | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* The name of the schema containing the current or future pipes on which to grant privileges.
|
|
69
|
+
*/
|
|
70
|
+
readonly schemaName: pulumi.Output<string>;
|
|
71
|
+
/**
|
|
72
|
+
* When this is set to true, allows the recipient role to grant the privileges to other roles.
|
|
73
|
+
*/
|
|
74
|
+
readonly withGrantOption: pulumi.Output<boolean | undefined>;
|
|
75
|
+
/**
|
|
76
|
+
* Create a PipeGrant resource with the given unique name, arguments, and options.
|
|
77
|
+
*
|
|
78
|
+
* @param name The _unique_ name of the resource.
|
|
79
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
80
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
81
|
+
*/
|
|
82
|
+
constructor(name: string, args: PipeGrantArgs, opts?: pulumi.CustomResourceOptions);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Input properties used for looking up and filtering PipeGrant resources.
|
|
86
|
+
*/
|
|
87
|
+
export interface PipeGrantState {
|
|
88
|
+
/**
|
|
89
|
+
* The name of the database containing the current or future pipes on which to grant privileges.
|
|
90
|
+
*/
|
|
91
|
+
databaseName?: pulumi.Input<string>;
|
|
92
|
+
/**
|
|
93
|
+
* When this is set to true and a schema*name is provided, apply this grant on all future pipes in the given schema. When this is true and no schema*name is provided apply this grant on all future pipes in the given database. The pipe*name field must be unset in order to use on*future.
|
|
94
|
+
*/
|
|
95
|
+
onFuture?: pulumi.Input<boolean>;
|
|
96
|
+
/**
|
|
97
|
+
* The name of the pipe on which to grant privileges immediately (only valid if onFuture is false).
|
|
98
|
+
*/
|
|
99
|
+
pipeName?: pulumi.Input<string>;
|
|
100
|
+
/**
|
|
101
|
+
* The privilege to grant on the current or future pipe.
|
|
102
|
+
*/
|
|
103
|
+
privilege?: pulumi.Input<string>;
|
|
104
|
+
/**
|
|
105
|
+
* Grants privilege to these roles.
|
|
106
|
+
*/
|
|
107
|
+
roles?: pulumi.Input<pulumi.Input<string>[]>;
|
|
108
|
+
/**
|
|
109
|
+
* The name of the schema containing the current or future pipes on which to grant privileges.
|
|
110
|
+
*/
|
|
111
|
+
schemaName?: pulumi.Input<string>;
|
|
112
|
+
/**
|
|
113
|
+
* When this is set to true, allows the recipient role to grant the privileges to other roles.
|
|
114
|
+
*/
|
|
115
|
+
withGrantOption?: pulumi.Input<boolean>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The set of arguments for constructing a PipeGrant resource.
|
|
119
|
+
*/
|
|
120
|
+
export interface PipeGrantArgs {
|
|
121
|
+
/**
|
|
122
|
+
* The name of the database containing the current or future pipes on which to grant privileges.
|
|
123
|
+
*/
|
|
124
|
+
databaseName: pulumi.Input<string>;
|
|
125
|
+
/**
|
|
126
|
+
* When this is set to true and a schema*name is provided, apply this grant on all future pipes in the given schema. When this is true and no schema*name is provided apply this grant on all future pipes in the given database. The pipe*name field must be unset in order to use on*future.
|
|
127
|
+
*/
|
|
128
|
+
onFuture?: pulumi.Input<boolean>;
|
|
129
|
+
/**
|
|
130
|
+
* The name of the pipe on which to grant privileges immediately (only valid if onFuture is false).
|
|
131
|
+
*/
|
|
132
|
+
pipeName?: pulumi.Input<string>;
|
|
133
|
+
/**
|
|
134
|
+
* The privilege to grant on the current or future pipe.
|
|
135
|
+
*/
|
|
136
|
+
privilege?: pulumi.Input<string>;
|
|
137
|
+
/**
|
|
138
|
+
* Grants privilege to these roles.
|
|
139
|
+
*/
|
|
140
|
+
roles?: pulumi.Input<pulumi.Input<string>[]>;
|
|
141
|
+
/**
|
|
142
|
+
* The name of the schema containing the current or future pipes on which to grant privileges.
|
|
143
|
+
*/
|
|
144
|
+
schemaName: pulumi.Input<string>;
|
|
145
|
+
/**
|
|
146
|
+
* When this is set to true, allows the recipient role to grant the privileges to other roles.
|
|
147
|
+
*/
|
|
148
|
+
withGrantOption?: pulumi.Input<boolean>;
|
|
149
|
+
}
|
package/pipeGrant.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
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.PipeGrant = 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.PipeGrant("grant", {
|
|
16
|
+
* databaseName: "db",
|
|
17
|
+
* onFuture: false,
|
|
18
|
+
* privilege: "operate",
|
|
19
|
+
* roles: [
|
|
20
|
+
* "role1",
|
|
21
|
+
* "role2",
|
|
22
|
+
* ],
|
|
23
|
+
* schemaName: "schema",
|
|
24
|
+
* sequenceName: "sequence",
|
|
25
|
+
* withGrantOption: false,
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* ## Import
|
|
30
|
+
*
|
|
31
|
+
* # format is database name | schema name | pipe name | privilege | true/false for with_grant_option
|
|
32
|
+
*
|
|
33
|
+
* ```sh
|
|
34
|
+
* $ pulumi import snowflake:index/pipeGrant:PipeGrant example 'dbName|schemaName|pipeName|OPERATE|false'
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
class PipeGrant extends pulumi.CustomResource {
|
|
38
|
+
constructor(name, argsOrState, opts) {
|
|
39
|
+
let inputs = {};
|
|
40
|
+
opts = opts || {};
|
|
41
|
+
if (opts.id) {
|
|
42
|
+
const state = argsOrState;
|
|
43
|
+
inputs["databaseName"] = state ? state.databaseName : undefined;
|
|
44
|
+
inputs["onFuture"] = state ? state.onFuture : undefined;
|
|
45
|
+
inputs["pipeName"] = state ? state.pipeName : undefined;
|
|
46
|
+
inputs["privilege"] = state ? state.privilege : undefined;
|
|
47
|
+
inputs["roles"] = state ? state.roles : undefined;
|
|
48
|
+
inputs["schemaName"] = state ? state.schemaName : undefined;
|
|
49
|
+
inputs["withGrantOption"] = state ? state.withGrantOption : undefined;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const args = argsOrState;
|
|
53
|
+
if ((!args || args.databaseName === undefined) && !opts.urn) {
|
|
54
|
+
throw new Error("Missing required property 'databaseName'");
|
|
55
|
+
}
|
|
56
|
+
if ((!args || args.schemaName === undefined) && !opts.urn) {
|
|
57
|
+
throw new Error("Missing required property 'schemaName'");
|
|
58
|
+
}
|
|
59
|
+
inputs["databaseName"] = args ? args.databaseName : undefined;
|
|
60
|
+
inputs["onFuture"] = args ? args.onFuture : undefined;
|
|
61
|
+
inputs["pipeName"] = args ? args.pipeName : undefined;
|
|
62
|
+
inputs["privilege"] = args ? args.privilege : undefined;
|
|
63
|
+
inputs["roles"] = args ? args.roles : undefined;
|
|
64
|
+
inputs["schemaName"] = args ? args.schemaName : undefined;
|
|
65
|
+
inputs["withGrantOption"] = args ? args.withGrantOption : undefined;
|
|
66
|
+
}
|
|
67
|
+
if (!opts.version) {
|
|
68
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
69
|
+
}
|
|
70
|
+
super(PipeGrant.__pulumiType, name, inputs, opts);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get an existing PipeGrant resource's state with the given name, ID, and optional extra
|
|
74
|
+
* properties used to qualify the lookup.
|
|
75
|
+
*
|
|
76
|
+
* @param name The _unique_ name of the resulting resource.
|
|
77
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
78
|
+
* @param state Any extra arguments used during the lookup.
|
|
79
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
80
|
+
*/
|
|
81
|
+
static get(name, id, state, opts) {
|
|
82
|
+
return new PipeGrant(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Returns true if the given object is an instance of PipeGrant. This is designed to work even
|
|
86
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
87
|
+
*/
|
|
88
|
+
static isInstance(obj) {
|
|
89
|
+
if (obj === undefined || obj === null) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
return obj['__pulumiType'] === PipeGrant.__pulumiType;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
exports.PipeGrant = PipeGrant;
|
|
96
|
+
/** @internal */
|
|
97
|
+
PipeGrant.__pulumiType = 'snowflake:index/pipeGrant:PipeGrant';
|
|
98
|
+
//# sourceMappingURL=pipeGrant.js.map
|
package/pipeGrant.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeGrant.js","sourceRoot":"","sources":["../pipeGrant.ts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,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;IAhGD;;;;;;;;OAQG;IACI,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAA2B,EAAE,KAAsB,EAAE,IAAmC;QACpH,OAAO,IAAI,SAAS,CAAC,IAAI,EAAO,KAAK,kCAAO,IAAI,KAAE,EAAE,EAAE,EAAE,IAAG,CAAC;IAChE,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,SAAS,CAAC,YAAY,CAAC;IAC1D,CAAC;;AA1BL,8BAkGC;AApFG,gBAAgB;AACO,sBAAY,GAAG,qCAAqC,CAAC"}
|
package/procedure.d.ts
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import * as pulumi from "@pulumi/pulumi";
|
|
2
|
+
import { input as inputs, output as outputs } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* ## Example Usage
|
|
5
|
+
*
|
|
6
|
+
* ```typescript
|
|
7
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
8
|
+
* import * as snowflake from "@pulumi/snowflake";
|
|
9
|
+
*
|
|
10
|
+
* const db = new snowflake.Schema("db", {dataRetentionDays: 1});
|
|
11
|
+
* const schema = new snowflake.Schema("schema", {
|
|
12
|
+
* database: snowflake_database.db.name,
|
|
13
|
+
* dataRetentionDays: 1,
|
|
14
|
+
* });
|
|
15
|
+
* const proc = new snowflake.Procedure("proc", {
|
|
16
|
+
* database: snowflake_database.db.name,
|
|
17
|
+
* schema: schema.name,
|
|
18
|
+
* arguments: [
|
|
19
|
+
* {
|
|
20
|
+
* name: "arg1",
|
|
21
|
+
* type: "varchar",
|
|
22
|
+
* },
|
|
23
|
+
* {
|
|
24
|
+
* name: "arg2",
|
|
25
|
+
* type: "DATE",
|
|
26
|
+
* },
|
|
27
|
+
* ],
|
|
28
|
+
* comment: "Procedure with 2 arguments",
|
|
29
|
+
* returnType: "VARCHAR",
|
|
30
|
+
* executeAs: "CALLER",
|
|
31
|
+
* returnBehavior: "IMMUTABLE",
|
|
32
|
+
* nullInputBehavior: "RETURNS NULL ON NULL INPUT",
|
|
33
|
+
* statement: `var X=1
|
|
34
|
+
* return X
|
|
35
|
+
* `,
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* ## Import
|
|
40
|
+
*
|
|
41
|
+
* # format is database name | schema name | stored procedure name | <list of arg types, separated with '-'>
|
|
42
|
+
*
|
|
43
|
+
* ```sh
|
|
44
|
+
* $ pulumi import snowflake:index/procedure:Procedure example 'dbName|schemaName|procedureName|varchar-varchar-varchar'
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare class Procedure extends pulumi.CustomResource {
|
|
48
|
+
/**
|
|
49
|
+
* Get an existing Procedure resource's state with the given name, ID, and optional extra
|
|
50
|
+
* properties used to qualify the lookup.
|
|
51
|
+
*
|
|
52
|
+
* @param name The _unique_ name of the resulting resource.
|
|
53
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
54
|
+
* @param state Any extra arguments used during the lookup.
|
|
55
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
56
|
+
*/
|
|
57
|
+
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ProcedureState, opts?: pulumi.CustomResourceOptions): Procedure;
|
|
58
|
+
/**
|
|
59
|
+
* Returns true if the given object is an instance of Procedure. This is designed to work even
|
|
60
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
61
|
+
*/
|
|
62
|
+
static isInstance(obj: any): obj is Procedure;
|
|
63
|
+
/**
|
|
64
|
+
* List of the arguments for the procedure
|
|
65
|
+
*/
|
|
66
|
+
readonly arguments: pulumi.Output<outputs.ProcedureArgument[] | undefined>;
|
|
67
|
+
/**
|
|
68
|
+
* Specifies a comment for the procedure.
|
|
69
|
+
*/
|
|
70
|
+
readonly comment: pulumi.Output<string | undefined>;
|
|
71
|
+
/**
|
|
72
|
+
* The database in which to create the procedure. Don't use the | character.
|
|
73
|
+
*/
|
|
74
|
+
readonly database: pulumi.Output<string>;
|
|
75
|
+
/**
|
|
76
|
+
* Sets execute context - see caller's rights and owner's rights
|
|
77
|
+
*/
|
|
78
|
+
readonly executeAs: pulumi.Output<string | undefined>;
|
|
79
|
+
/**
|
|
80
|
+
* Specifies the identifier for the procedure; does not have to be unique for the schema in which the procedure is created. Don't use the | character.
|
|
81
|
+
*/
|
|
82
|
+
readonly name: pulumi.Output<string>;
|
|
83
|
+
/**
|
|
84
|
+
* Specifies the behavior of the procedure when called with null inputs.
|
|
85
|
+
*/
|
|
86
|
+
readonly nullInputBehavior: pulumi.Output<string | undefined>;
|
|
87
|
+
/**
|
|
88
|
+
* Specifies the behavior of the function when returning results
|
|
89
|
+
*/
|
|
90
|
+
readonly returnBehavior: pulumi.Output<string | undefined>;
|
|
91
|
+
/**
|
|
92
|
+
* The return type of the procedure
|
|
93
|
+
*/
|
|
94
|
+
readonly returnType: pulumi.Output<string>;
|
|
95
|
+
/**
|
|
96
|
+
* The schema in which to create the procedure. Don't use the | character.
|
|
97
|
+
*/
|
|
98
|
+
readonly schema: pulumi.Output<string>;
|
|
99
|
+
/**
|
|
100
|
+
* Specifies the javascript code used to create the procedure.
|
|
101
|
+
*/
|
|
102
|
+
readonly statement: pulumi.Output<string>;
|
|
103
|
+
/**
|
|
104
|
+
* Create a Procedure resource with the given unique name, arguments, and options.
|
|
105
|
+
*
|
|
106
|
+
* @param name The _unique_ name of the resource.
|
|
107
|
+
* @param args The arguments to use to populate this resource's properties.
|
|
108
|
+
* @param opts A bag of options that control this resource's behavior.
|
|
109
|
+
*/
|
|
110
|
+
constructor(name: string, args: ProcedureArgs, opts?: pulumi.CustomResourceOptions);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Input properties used for looking up and filtering Procedure resources.
|
|
114
|
+
*/
|
|
115
|
+
export interface ProcedureState {
|
|
116
|
+
/**
|
|
117
|
+
* List of the arguments for the procedure
|
|
118
|
+
*/
|
|
119
|
+
arguments?: pulumi.Input<pulumi.Input<inputs.ProcedureArgument>[]>;
|
|
120
|
+
/**
|
|
121
|
+
* Specifies a comment for the procedure.
|
|
122
|
+
*/
|
|
123
|
+
comment?: pulumi.Input<string>;
|
|
124
|
+
/**
|
|
125
|
+
* The database in which to create the procedure. Don't use the | character.
|
|
126
|
+
*/
|
|
127
|
+
database?: pulumi.Input<string>;
|
|
128
|
+
/**
|
|
129
|
+
* Sets execute context - see caller's rights and owner's rights
|
|
130
|
+
*/
|
|
131
|
+
executeAs?: pulumi.Input<string>;
|
|
132
|
+
/**
|
|
133
|
+
* Specifies the identifier for the procedure; does not have to be unique for the schema in which the procedure is created. Don't use the | character.
|
|
134
|
+
*/
|
|
135
|
+
name?: pulumi.Input<string>;
|
|
136
|
+
/**
|
|
137
|
+
* Specifies the behavior of the procedure when called with null inputs.
|
|
138
|
+
*/
|
|
139
|
+
nullInputBehavior?: pulumi.Input<string>;
|
|
140
|
+
/**
|
|
141
|
+
* Specifies the behavior of the function when returning results
|
|
142
|
+
*/
|
|
143
|
+
returnBehavior?: pulumi.Input<string>;
|
|
144
|
+
/**
|
|
145
|
+
* The return type of the procedure
|
|
146
|
+
*/
|
|
147
|
+
returnType?: pulumi.Input<string>;
|
|
148
|
+
/**
|
|
149
|
+
* The schema in which to create the procedure. Don't use the | character.
|
|
150
|
+
*/
|
|
151
|
+
schema?: pulumi.Input<string>;
|
|
152
|
+
/**
|
|
153
|
+
* Specifies the javascript code used to create the procedure.
|
|
154
|
+
*/
|
|
155
|
+
statement?: pulumi.Input<string>;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* The set of arguments for constructing a Procedure resource.
|
|
159
|
+
*/
|
|
160
|
+
export interface ProcedureArgs {
|
|
161
|
+
/**
|
|
162
|
+
* List of the arguments for the procedure
|
|
163
|
+
*/
|
|
164
|
+
arguments?: pulumi.Input<pulumi.Input<inputs.ProcedureArgument>[]>;
|
|
165
|
+
/**
|
|
166
|
+
* Specifies a comment for the procedure.
|
|
167
|
+
*/
|
|
168
|
+
comment?: pulumi.Input<string>;
|
|
169
|
+
/**
|
|
170
|
+
* The database in which to create the procedure. Don't use the | character.
|
|
171
|
+
*/
|
|
172
|
+
database: pulumi.Input<string>;
|
|
173
|
+
/**
|
|
174
|
+
* Sets execute context - see caller's rights and owner's rights
|
|
175
|
+
*/
|
|
176
|
+
executeAs?: pulumi.Input<string>;
|
|
177
|
+
/**
|
|
178
|
+
* Specifies the identifier for the procedure; does not have to be unique for the schema in which the procedure is created. Don't use the | character.
|
|
179
|
+
*/
|
|
180
|
+
name?: pulumi.Input<string>;
|
|
181
|
+
/**
|
|
182
|
+
* Specifies the behavior of the procedure when called with null inputs.
|
|
183
|
+
*/
|
|
184
|
+
nullInputBehavior?: pulumi.Input<string>;
|
|
185
|
+
/**
|
|
186
|
+
* Specifies the behavior of the function when returning results
|
|
187
|
+
*/
|
|
188
|
+
returnBehavior?: pulumi.Input<string>;
|
|
189
|
+
/**
|
|
190
|
+
* The return type of the procedure
|
|
191
|
+
*/
|
|
192
|
+
returnType: pulumi.Input<string>;
|
|
193
|
+
/**
|
|
194
|
+
* The schema in which to create the procedure. Don't use the | character.
|
|
195
|
+
*/
|
|
196
|
+
schema: pulumi.Input<string>;
|
|
197
|
+
/**
|
|
198
|
+
* Specifies the javascript code used to create the procedure.
|
|
199
|
+
*/
|
|
200
|
+
statement: pulumi.Input<string>;
|
|
201
|
+
}
|
package/procedure.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
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.Procedure = 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 db = new snowflake.Schema("db", {dataRetentionDays: 1});
|
|
16
|
+
* const schema = new snowflake.Schema("schema", {
|
|
17
|
+
* database: snowflake_database.db.name,
|
|
18
|
+
* dataRetentionDays: 1,
|
|
19
|
+
* });
|
|
20
|
+
* const proc = new snowflake.Procedure("proc", {
|
|
21
|
+
* database: snowflake_database.db.name,
|
|
22
|
+
* schema: schema.name,
|
|
23
|
+
* arguments: [
|
|
24
|
+
* {
|
|
25
|
+
* name: "arg1",
|
|
26
|
+
* type: "varchar",
|
|
27
|
+
* },
|
|
28
|
+
* {
|
|
29
|
+
* name: "arg2",
|
|
30
|
+
* type: "DATE",
|
|
31
|
+
* },
|
|
32
|
+
* ],
|
|
33
|
+
* comment: "Procedure with 2 arguments",
|
|
34
|
+
* returnType: "VARCHAR",
|
|
35
|
+
* executeAs: "CALLER",
|
|
36
|
+
* returnBehavior: "IMMUTABLE",
|
|
37
|
+
* nullInputBehavior: "RETURNS NULL ON NULL INPUT",
|
|
38
|
+
* statement: `var X=1
|
|
39
|
+
* return X
|
|
40
|
+
* `,
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* ## Import
|
|
45
|
+
*
|
|
46
|
+
* # format is database name | schema name | stored procedure name | <list of arg types, separated with '-'>
|
|
47
|
+
*
|
|
48
|
+
* ```sh
|
|
49
|
+
* $ pulumi import snowflake:index/procedure:Procedure example 'dbName|schemaName|procedureName|varchar-varchar-varchar'
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
class Procedure extends pulumi.CustomResource {
|
|
53
|
+
constructor(name, argsOrState, opts) {
|
|
54
|
+
let inputs = {};
|
|
55
|
+
opts = opts || {};
|
|
56
|
+
if (opts.id) {
|
|
57
|
+
const state = argsOrState;
|
|
58
|
+
inputs["arguments"] = state ? state.arguments : undefined;
|
|
59
|
+
inputs["comment"] = state ? state.comment : undefined;
|
|
60
|
+
inputs["database"] = state ? state.database : undefined;
|
|
61
|
+
inputs["executeAs"] = state ? state.executeAs : undefined;
|
|
62
|
+
inputs["name"] = state ? state.name : undefined;
|
|
63
|
+
inputs["nullInputBehavior"] = state ? state.nullInputBehavior : undefined;
|
|
64
|
+
inputs["returnBehavior"] = state ? state.returnBehavior : undefined;
|
|
65
|
+
inputs["returnType"] = state ? state.returnType : undefined;
|
|
66
|
+
inputs["schema"] = state ? state.schema : undefined;
|
|
67
|
+
inputs["statement"] = state ? state.statement : undefined;
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
const args = argsOrState;
|
|
71
|
+
if ((!args || args.database === undefined) && !opts.urn) {
|
|
72
|
+
throw new Error("Missing required property 'database'");
|
|
73
|
+
}
|
|
74
|
+
if ((!args || args.returnType === undefined) && !opts.urn) {
|
|
75
|
+
throw new Error("Missing required property 'returnType'");
|
|
76
|
+
}
|
|
77
|
+
if ((!args || args.schema === undefined) && !opts.urn) {
|
|
78
|
+
throw new Error("Missing required property 'schema'");
|
|
79
|
+
}
|
|
80
|
+
if ((!args || args.statement === undefined) && !opts.urn) {
|
|
81
|
+
throw new Error("Missing required property 'statement'");
|
|
82
|
+
}
|
|
83
|
+
inputs["arguments"] = args ? args.arguments : undefined;
|
|
84
|
+
inputs["comment"] = args ? args.comment : undefined;
|
|
85
|
+
inputs["database"] = args ? args.database : undefined;
|
|
86
|
+
inputs["executeAs"] = args ? args.executeAs : undefined;
|
|
87
|
+
inputs["name"] = args ? args.name : undefined;
|
|
88
|
+
inputs["nullInputBehavior"] = args ? args.nullInputBehavior : undefined;
|
|
89
|
+
inputs["returnBehavior"] = args ? args.returnBehavior : undefined;
|
|
90
|
+
inputs["returnType"] = args ? args.returnType : undefined;
|
|
91
|
+
inputs["schema"] = args ? args.schema : undefined;
|
|
92
|
+
inputs["statement"] = args ? args.statement : undefined;
|
|
93
|
+
}
|
|
94
|
+
if (!opts.version) {
|
|
95
|
+
opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });
|
|
96
|
+
}
|
|
97
|
+
super(Procedure.__pulumiType, name, inputs, opts);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Get an existing Procedure resource's state with the given name, ID, and optional extra
|
|
101
|
+
* properties used to qualify the lookup.
|
|
102
|
+
*
|
|
103
|
+
* @param name The _unique_ name of the resulting resource.
|
|
104
|
+
* @param id The _unique_ provider ID of the resource to lookup.
|
|
105
|
+
* @param state Any extra arguments used during the lookup.
|
|
106
|
+
* @param opts Optional settings to control the behavior of the CustomResource.
|
|
107
|
+
*/
|
|
108
|
+
static get(name, id, state, opts) {
|
|
109
|
+
return new Procedure(name, state, Object.assign(Object.assign({}, opts), { id: id }));
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Returns true if the given object is an instance of Procedure. This is designed to work even
|
|
113
|
+
* when multiple copies of the Pulumi SDK have been loaded into the same process.
|
|
114
|
+
*/
|
|
115
|
+
static isInstance(obj) {
|
|
116
|
+
if (obj === undefined || obj === null) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
return obj['__pulumiType'] === Procedure.__pulumiType;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.Procedure = Procedure;
|
|
123
|
+
/** @internal */
|
|
124
|
+
Procedure.__pulumiType = 'snowflake:index/procedure:Procedure';
|
|
125
|
+
//# sourceMappingURL=procedure.js.map
|
package/procedure.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"procedure.js","sourceRoot":"","sources":["../procedure.ts"],"names":[],"mappings":";AAAA,wFAA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