From f6ebcf2c3f73b103a7c2001fae231998ce1323b2 Mon Sep 17 00:00:00 2001 From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com> Date: Tue, 22 Mar 2022 06:27:47 -0700 Subject: [PATCH] Update terraform-provider-snowflake to v0.28.8 (#100) --- .../cmd/pulumi-resource-snowflake/schema.json | 37 ++---- provider/go.mod | 2 +- provider/go.sum | 4 +- sdk/dotnet/FunctionGrant.cs | 8 +- sdk/dotnet/StageGrant.cs | 70 +----------- sdk/go/snowflake/functionGrant.go | 12 +- sdk/go/snowflake/stageGrant.go | 56 +-------- sdk/nodejs/functionGrant.ts | 8 +- sdk/nodejs/stageGrant.ts | 20 +--- sdk/python/pulumi_snowflake/function_grant.py | 18 +-- sdk/python/pulumi_snowflake/stage_grant.py | 107 ++---------------- 11 files changed, 52 insertions(+), 290 deletions(-) diff --git a/provider/cmd/pulumi-resource-snowflake/schema.json b/provider/cmd/pulumi-resource-snowflake/schema.json index d38c4458..c4c99524 100644 --- a/provider/cmd/pulumi-resource-snowflake/schema.json +++ b/provider/cmd/pulumi-resource-snowflake/schema.json @@ -4216,7 +4216,7 @@ } }, "snowflake:index/functionGrant:FunctionGrant": { - "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst grant = new snowflake.FunctionGrant(\"grant\", {\n databaseName: \"db\",\n schemaName: \"schema\",\n functionName: \"function\",\n arguments: [\n {\n name: \"a\",\n type: \"array\",\n },\n {\n name: \"b\",\n type: \"string\",\n },\n ],\n returnType: \"string\",\n privilege: \"select\",\n roles: [\n \"role1\",\n \"role2\",\n ],\n shares: [\n \"share1\",\n \"share2\",\n ],\n onFuture: false,\n withGrantOption: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\ngrant = snowflake.FunctionGrant(\"grant\",\n database_name=\"db\",\n schema_name=\"schema\",\n function_name=\"function\",\n arguments=[\n snowflake.FunctionGrantArgumentArgs(\n %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression),\n snowflake.FunctionGrantArgumentArgs(\n %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression),\n ],\n return_type=\"string\",\n privilege=\"select\",\n roles=[\n \"role1\",\n \"role2\",\n ],\n shares=[\n \"share1\",\n \"share2\",\n ],\n on_future=False,\n with_grant_option=False)\n```\n```csharp\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var grant = new Snowflake.FunctionGrant(\"grant\", new Snowflake.FunctionGrantArgs\n {\n DatabaseName = \"db\",\n SchemaName = \"schema\",\n FunctionName = \"function\",\n Arguments = \n {\n new Snowflake.Inputs.FunctionGrantArgumentArgs\n {\n %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression),\n new Snowflake.Inputs.FunctionGrantArgumentArgs\n {\n %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression),\n },\n ReturnType = \"string\",\n Privilege = \"select\",\n Roles = \n {\n \"role1\",\n \"role2\",\n },\n Shares = \n {\n \"share1\",\n \"share2\",\n },\n OnFuture = false,\n WithGrantOption = false,\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := snowflake.NewFunctionGrant(ctx, \"grant\", \u0026snowflake.FunctionGrantArgs{\n\t\t\tDatabaseName: pulumi.String(\"db\"),\n\t\t\tSchemaName: pulumi.String(\"schema\"),\n\t\t\tFunctionName: pulumi.String(\"function\"),\n\t\t\tArguments: FunctionGrantArgumentArray{\n\t\t\t\t\u0026FunctionGrantArgumentArgs{\n\t\t\t\t\tName: pulumi.String(\"a\"),\n\t\t\t\t\tType: pulumi.String(\"array\"),\n\t\t\t\t},\n\t\t\t\t\u0026FunctionGrantArgumentArgs{\n\t\t\t\t\tName: pulumi.String(\"b\"),\n\t\t\t\t\tType: pulumi.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tReturnType: pulumi.String(\"string\"),\n\t\t\tPrivilege: pulumi.String(\"select\"),\n\t\t\tRoles: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"role1\"),\n\t\t\t\tpulumi.String(\"role2\"),\n\t\t\t},\n\t\t\tShares: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"share1\"),\n\t\t\t\tpulumi.String(\"share2\"),\n\t\t\t},\n\t\t\tOnFuture: pulumi.Bool(false),\n\t\t\tWithGrantOption: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n# format is database name | schema name | function signature | privilege | true/false for with_grant_option\n\n```sh\n $ pulumi import snowflake:index/functionGrant:FunctionGrant example 'dbName|schemaName|functionName(ARG1 ARG1TYPE, ARG2 ARG2TYPE):RETURNTYPE|USAGE|false'\n```\n\n ", + "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst grant = new snowflake.FunctionGrant(\"grant\", {\n databaseName: \"db\",\n schemaName: \"schema\",\n functionName: \"function\",\n arguments: [\n {\n name: \"a\",\n type: \"array\",\n },\n {\n name: \"b\",\n type: \"string\",\n },\n ],\n returnType: \"string\",\n privilege: \"USAGE\",\n roles: [\n \"role1\",\n \"role2\",\n ],\n shares: [\n \"share1\",\n \"share2\",\n ],\n onFuture: false,\n withGrantOption: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\ngrant = snowflake.FunctionGrant(\"grant\",\n database_name=\"db\",\n schema_name=\"schema\",\n function_name=\"function\",\n arguments=[\n snowflake.FunctionGrantArgumentArgs(\n %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression),\n snowflake.FunctionGrantArgumentArgs(\n %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression),\n ],\n return_type=\"string\",\n privilege=\"USAGE\",\n roles=[\n \"role1\",\n \"role2\",\n ],\n shares=[\n \"share1\",\n \"share2\",\n ],\n on_future=False,\n with_grant_option=False)\n```\n```csharp\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var grant = new Snowflake.FunctionGrant(\"grant\", new Snowflake.FunctionGrantArgs\n {\n DatabaseName = \"db\",\n SchemaName = \"schema\",\n FunctionName = \"function\",\n Arguments = \n {\n new Snowflake.Inputs.FunctionGrantArgumentArgs\n {\n %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression),\n new Snowflake.Inputs.FunctionGrantArgumentArgs\n {\n %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression),\n },\n ReturnType = \"string\",\n Privilege = \"USAGE\",\n Roles = \n {\n \"role1\",\n \"role2\",\n },\n Shares = \n {\n \"share1\",\n \"share2\",\n },\n OnFuture = false,\n WithGrantOption = false,\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := snowflake.NewFunctionGrant(ctx, \"grant\", \u0026snowflake.FunctionGrantArgs{\n\t\t\tDatabaseName: pulumi.String(\"db\"),\n\t\t\tSchemaName: pulumi.String(\"schema\"),\n\t\t\tFunctionName: pulumi.String(\"function\"),\n\t\t\tArguments: FunctionGrantArgumentArray{\n\t\t\t\t\u0026FunctionGrantArgumentArgs{\n\t\t\t\t\tName: pulumi.String(\"a\"),\n\t\t\t\t\tType: pulumi.String(\"array\"),\n\t\t\t\t},\n\t\t\t\t\u0026FunctionGrantArgumentArgs{\n\t\t\t\t\tName: pulumi.String(\"b\"),\n\t\t\t\t\tType: pulumi.String(\"string\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tReturnType: pulumi.String(\"string\"),\n\t\t\tPrivilege: pulumi.String(\"USAGE\"),\n\t\t\tRoles: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"role1\"),\n\t\t\t\tpulumi.String(\"role2\"),\n\t\t\t},\n\t\t\tShares: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"share1\"),\n\t\t\t\tpulumi.String(\"share2\"),\n\t\t\t},\n\t\t\tOnFuture: pulumi.Bool(false),\n\t\t\tWithGrantOption: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n# format is database name | schema name | function signature | privilege | true/false for with_grant_option\n\n```sh\n $ pulumi import snowflake:index/functionGrant:FunctionGrant example 'dbName|schemaName|functionName(ARG1 ARG1TYPE, ARG2 ARG2TYPE):RETURNTYPE|USAGE|false'\n```\n\n ", "properties": { "arguments": { "type": "array", @@ -4239,7 +4239,7 @@ }, "privilege": { "type": "string", - "description": "The privilege to grant on the current or future function.\n" + "description": "The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`.\n" }, "returnType": { "type": "string", @@ -4294,7 +4294,7 @@ }, "privilege": { "type": "string", - "description": "The privilege to grant on the current or future function.\n" + "description": "The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`.\n" }, "returnType": { "type": "string", @@ -4351,7 +4351,7 @@ }, "privilege": { "type": "string", - "description": "The privilege to grant on the current or future function.\n" + "description": "The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`.\n" }, "returnType": { "type": "string", @@ -7783,7 +7783,7 @@ } }, "snowflake:index/stageGrant:StageGrant": { - "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst grant = new snowflake.StageGrant(\"grant\", {\n databaseName: \"db\",\n onFuture: false,\n privilege: \"USAGE\",\n roles: [\n \"role1\",\n \"role2\",\n ],\n schemaName: \"schema\",\n shares: [\n \"share1\",\n \"share2\",\n ],\n stageName: \"stage\",\n withGrantOption: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_snowflake as snowflake\n\ngrant = snowflake.StageGrant(\"grant\",\n database_name=\"db\",\n on_future=False,\n privilege=\"USAGE\",\n roles=[\n \"role1\",\n \"role2\",\n ],\n schema_name=\"schema\",\n shares=[\n \"share1\",\n \"share2\",\n ],\n stage_name=\"stage\",\n with_grant_option=False)\n```\n```csharp\nusing Pulumi;\nusing Snowflake = Pulumi.Snowflake;\n\nclass MyStack : Stack\n{\n public MyStack()\n {\n var grant = new Snowflake.StageGrant(\"grant\", new Snowflake.StageGrantArgs\n {\n DatabaseName = \"db\",\n OnFuture = false,\n Privilege = \"USAGE\",\n Roles = \n {\n \"role1\",\n \"role2\",\n },\n SchemaName = \"schema\",\n Shares = \n {\n \"share1\",\n \"share2\",\n },\n StageName = \"stage\",\n WithGrantOption = false,\n });\n }\n\n}\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := snowflake.NewStageGrant(ctx, \"grant\", \u0026snowflake.StageGrantArgs{\n\t\t\tDatabaseName: pulumi.String(\"db\"),\n\t\t\tOnFuture: pulumi.Bool(false),\n\t\t\tPrivilege: pulumi.String(\"USAGE\"),\n\t\t\tRoles: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"role1\"),\n\t\t\t\tpulumi.String(\"role2\"),\n\t\t\t},\n\t\t\tSchemaName: pulumi.String(\"schema\"),\n\t\t\tShares: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"share1\"),\n\t\t\t\tpulumi.String(\"share2\"),\n\t\t\t},\n\t\t\tStageName: pulumi.String(\"stage\"),\n\t\t\tWithGrantOption: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n# format is database name | schema name | stage name | privilege | true/false for with_grant_option\n\n```sh\n $ pulumi import snowflake:index/stageGrant:StageGrant example 'databaseName|schemaName|stageName|USAGE|true'\n```\n\n ", + "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as snowflake from \"@pulumi/snowflake\";\n\nconst grant = new snowflake.StageGrant(\"grant\", {\n databaseName: \"db\",\n onFuture: false,\n privilege: \"USAGE\",\n roles: [\n \"role1\",\n \"role2\",\n ],\n schemaName: \"schema\",\n shares: [\n \"share1\",\n \"share2\",\n ],\n stageName: \"stage\",\n withGrantOption: false,\n});\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n# format is database name | schema name | stage name | privilege | true/false for with_grant_option\n\n```sh\n $ pulumi import snowflake:index/stageGrant:StageGrant example 'databaseName|schemaName|stageName|USAGE|true'\n```\n\n ", "properties": { "databaseName": { "type": "string", @@ -7791,7 +7791,7 @@ }, "onFuture": { "type": "boolean", - "description": "When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future.\n" + "description": "When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future.\n" }, "privilege": { "type": "string", @@ -7808,13 +7808,6 @@ "type": "string", "description": "The name of the schema containing the current stage on which to grant privileges.\n" }, - "shares": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Grants privilege to these shares (only valid if on_future is false).\n" - }, "stageName": { "type": "string", "description": "The name of the stage on which to grant privilege (only valid if on_future is false).\n" @@ -7835,7 +7828,7 @@ }, "onFuture": { "type": "boolean", - "description": "When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future.\n" + "description": "When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future.\n" }, "privilege": { "type": "string", @@ -7852,13 +7845,6 @@ "type": "string", "description": "The name of the schema containing the current stage on which to grant privileges.\n" }, - "shares": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Grants privilege to these shares (only valid if on_future is false).\n" - }, "stageName": { "type": "string", "description": "The name of the stage on which to grant privilege (only valid if on_future is false).\n" @@ -7881,7 +7867,7 @@ }, "onFuture": { "type": "boolean", - "description": "When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future.\n" + "description": "When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future.\n" }, "privilege": { "type": "string", @@ -7898,13 +7884,6 @@ "type": "string", "description": "The name of the schema containing the current stage on which to grant privileges.\n" }, - "shares": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Grants privilege to these shares (only valid if on_future is false).\n" - }, "stageName": { "type": "string", "description": "The name of the stage on which to grant privilege (only valid if on_future is false).\n" diff --git a/provider/go.mod b/provider/go.mod index 8963899c..1550cdb2 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -9,7 +9,7 @@ replace ( require ( cloud.google.com/go/kms v1.4.0 // indirect - github.com/chanzuckerberg/terraform-provider-snowflake v0.28.7 + github.com/chanzuckerberg/terraform-provider-snowflake v0.28.8 github.com/hashicorp/terraform-plugin-sdk v1.9.1 // indirect github.com/pulumi/pulumi-terraform-bridge/v3 v3.19.1 github.com/pulumi/pulumi/sdk/v3 v3.25.0 diff --git a/provider/go.sum b/provider/go.sum index 75171fb8..552fdf83 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -402,8 +402,8 @@ github.com/chanzuckerberg/aws-oidc v0.23.1/go.mod h1:AbN6f7tGQ1aR8kJdr5Mpnyk3iab github.com/chanzuckerberg/go-misc v0.0.0-20200814145037-61fd36eedee6/go.mod h1:5GljuH2+xw/T7ovs4sRj9WbNRrgePgom8sMzJJPlAAo= github.com/chanzuckerberg/go-misc v0.0.0-20220309145137-a6d9e8c090d2 h1:yQ3ygwbCH0Wp0YPQSlILa21yGLD5guv4eUZrVaJ0ZPw= github.com/chanzuckerberg/go-misc v0.0.0-20220309145137-a6d9e8c090d2/go.mod h1:josvORVy6Us8JVr+O3qkNUgFmqu2I0Goy/5ZXKK5bVQ= -github.com/chanzuckerberg/terraform-provider-snowflake v0.28.7 h1:4dR726VYQShA4mVoXhta8zvZX9oNd8mPUCWTWZ6I8iY= -github.com/chanzuckerberg/terraform-provider-snowflake v0.28.7/go.mod h1:1vwIUm8Ot8i1AcxqVksNTIq4tTzp3F46qR1PrS/oX5k= +github.com/chanzuckerberg/terraform-provider-snowflake v0.28.8 h1:r0LVx9Ptukaraw4eG8BIBTeK7H6pMkeEeQLzSStr2vA= +github.com/chanzuckerberg/terraform-provider-snowflake v0.28.8/go.mod h1:1vwIUm8Ot8i1AcxqVksNTIq4tTzp3F46qR1PrS/oX5k= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/cheggaaa/pb v1.0.18/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc= diff --git a/sdk/dotnet/FunctionGrant.cs b/sdk/dotnet/FunctionGrant.cs index ea01c51b..97c0c0e7 100644 --- a/sdk/dotnet/FunctionGrant.cs +++ b/sdk/dotnet/FunctionGrant.cs @@ -35,7 +35,7 @@ namespace Pulumi.Snowflake /// %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression), /// }, /// ReturnType = "string", - /// Privilege = "select", + /// Privilege = "USAGE", /// Roles = /// { /// "role1", @@ -90,7 +90,7 @@ public partial class FunctionGrant : Pulumi.CustomResource public Output OnFuture { get; private set; } = null!; /// - /// The privilege to grant on the current or future function. + /// The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. /// [Output("privilege")] public Output Privilege { get; private set; } = null!; @@ -202,7 +202,7 @@ public InputList Arguments public Input? OnFuture { get; set; } /// - /// The privilege to grant on the current or future function. + /// The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. /// [Input("privilege")] public Input? Privilege { get; set; } @@ -287,7 +287,7 @@ public InputList Arguments public Input? OnFuture { get; set; } /// - /// The privilege to grant on the current or future function. + /// The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. /// [Input("privilege")] public Input? Privilege { get; set; } diff --git a/sdk/dotnet/StageGrant.cs b/sdk/dotnet/StageGrant.cs index c8faa50f..7a53ad77 100644 --- a/sdk/dotnet/StageGrant.cs +++ b/sdk/dotnet/StageGrant.cs @@ -10,40 +10,6 @@ namespace Pulumi.Snowflake { /// - /// ## Example Usage - /// - /// ```csharp - /// using Pulumi; - /// using Snowflake = Pulumi.Snowflake; - /// - /// class MyStack : Stack - /// { - /// public MyStack() - /// { - /// var grant = new Snowflake.StageGrant("grant", new Snowflake.StageGrantArgs - /// { - /// DatabaseName = "db", - /// OnFuture = false, - /// Privilege = "USAGE", - /// Roles = - /// { - /// "role1", - /// "role2", - /// }, - /// SchemaName = "schema", - /// Shares = - /// { - /// "share1", - /// "share2", - /// }, - /// StageName = "stage", - /// WithGrantOption = false, - /// }); - /// } - /// - /// } - /// ``` - /// /// ## Import /// /// # format is database name | schema name | stage name | privilege | true/false for with_grant_option @@ -62,7 +28,7 @@ public partial class StageGrant : Pulumi.CustomResource public Output DatabaseName { get; private set; } = null!; /// - /// When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + /// When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. /// [Output("onFuture")] public Output OnFuture { get; private set; } = null!; @@ -85,12 +51,6 @@ public partial class StageGrant : Pulumi.CustomResource [Output("schemaName")] public Output SchemaName { get; private set; } = null!; - /// - /// Grants privilege to these shares (only valid if on_future is false). - /// - [Output("shares")] - public Output> Shares { get; private set; } = null!; - /// /// The name of the stage on which to grant privilege (only valid if on_future is false). /// @@ -156,7 +116,7 @@ public sealed class StageGrantArgs : Pulumi.ResourceArgs public Input DatabaseName { get; set; } = null!; /// - /// When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + /// When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. /// [Input("onFuture")] public Input? OnFuture { get; set; } @@ -185,18 +145,6 @@ public InputList Roles [Input("schemaName", required: true)] public Input SchemaName { get; set; } = null!; - [Input("shares")] - private InputList? _shares; - - /// - /// Grants privilege to these shares (only valid if on_future is false). - /// - public InputList Shares - { - get => _shares ?? (_shares = new InputList()); - set => _shares = value; - } - /// /// The name of the stage on which to grant privilege (only valid if on_future is false). /// @@ -223,7 +171,7 @@ public sealed class StageGrantState : Pulumi.ResourceArgs public Input? DatabaseName { get; set; } /// - /// When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + /// When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. /// [Input("onFuture")] public Input? OnFuture { get; set; } @@ -252,18 +200,6 @@ public InputList Roles [Input("schemaName")] public Input? SchemaName { get; set; } - [Input("shares")] - private InputList? _shares; - - /// - /// Grants privilege to these shares (only valid if on_future is false). - /// - public InputList Shares - { - get => _shares ?? (_shares = new InputList()); - set => _shares = value; - } - /// /// The name of the stage on which to grant privilege (only valid if on_future is false). /// diff --git a/sdk/go/snowflake/functionGrant.go b/sdk/go/snowflake/functionGrant.go index 8cfad464..3923bd71 100644 --- a/sdk/go/snowflake/functionGrant.go +++ b/sdk/go/snowflake/functionGrant.go @@ -38,7 +38,7 @@ import ( // }, // }, // ReturnType: pulumi.String("string"), -// Privilege: pulumi.String("select"), +// Privilege: pulumi.String("USAGE"), // Roles: pulumi.StringArray{ // pulumi.String("role1"), // pulumi.String("role2"), @@ -76,7 +76,7 @@ type FunctionGrant struct { FunctionName pulumi.StringPtrOutput `pulumi:"functionName"` // When this is set to true and a schema*name is provided, apply this grant on all future functions in the given schema. When this is true and no schema*name is provided apply this grant on all future functions in the given database. The function*name, arguments, return*type, and shares fields must be unset in order to use on_future. OnFuture pulumi.BoolPtrOutput `pulumi:"onFuture"` - // The privilege to grant on the current or future function. + // The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. Privilege pulumi.StringPtrOutput `pulumi:"privilege"` // The return type of the function (must be present if functionName is present) ReturnType pulumi.StringPtrOutput `pulumi:"returnType"` @@ -133,7 +133,7 @@ type functionGrantState struct { FunctionName *string `pulumi:"functionName"` // When this is set to true and a schema*name is provided, apply this grant on all future functions in the given schema. When this is true and no schema*name is provided apply this grant on all future functions in the given database. The function*name, arguments, return*type, and shares fields must be unset in order to use on_future. OnFuture *bool `pulumi:"onFuture"` - // The privilege to grant on the current or future function. + // The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. Privilege *string `pulumi:"privilege"` // The return type of the function (must be present if functionName is present) ReturnType *string `pulumi:"returnType"` @@ -156,7 +156,7 @@ type FunctionGrantState struct { FunctionName pulumi.StringPtrInput // When this is set to true and a schema*name is provided, apply this grant on all future functions in the given schema. When this is true and no schema*name is provided apply this grant on all future functions in the given database. The function*name, arguments, return*type, and shares fields must be unset in order to use on_future. OnFuture pulumi.BoolPtrInput - // The privilege to grant on the current or future function. + // The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. Privilege pulumi.StringPtrInput // The return type of the function (must be present if functionName is present) ReturnType pulumi.StringPtrInput @@ -183,7 +183,7 @@ type functionGrantArgs struct { FunctionName *string `pulumi:"functionName"` // When this is set to true and a schema*name is provided, apply this grant on all future functions in the given schema. When this is true and no schema*name is provided apply this grant on all future functions in the given database. The function*name, arguments, return*type, and shares fields must be unset in order to use on_future. OnFuture *bool `pulumi:"onFuture"` - // The privilege to grant on the current or future function. + // The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. Privilege *string `pulumi:"privilege"` // The return type of the function (must be present if functionName is present) ReturnType *string `pulumi:"returnType"` @@ -207,7 +207,7 @@ type FunctionGrantArgs struct { FunctionName pulumi.StringPtrInput // When this is set to true and a schema*name is provided, apply this grant on all future functions in the given schema. When this is true and no schema*name is provided apply this grant on all future functions in the given database. The function*name, arguments, return*type, and shares fields must be unset in order to use on_future. OnFuture pulumi.BoolPtrInput - // The privilege to grant on the current or future function. + // The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. Privilege pulumi.StringPtrInput // The return type of the function (must be present if functionName is present) ReturnType pulumi.StringPtrInput diff --git a/sdk/go/snowflake/stageGrant.go b/sdk/go/snowflake/stageGrant.go index a32c53d2..44a84c1c 100644 --- a/sdk/go/snowflake/stageGrant.go +++ b/sdk/go/snowflake/stageGrant.go @@ -11,42 +11,6 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -// ## Example Usage -// -// ```go -// package main -// -// import ( -// "github.com/pulumi/pulumi-snowflake/sdk/go/snowflake" -// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -// ) -// -// func main() { -// pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := snowflake.NewStageGrant(ctx, "grant", &snowflake.StageGrantArgs{ -// DatabaseName: pulumi.String("db"), -// OnFuture: pulumi.Bool(false), -// Privilege: pulumi.String("USAGE"), -// Roles: pulumi.StringArray{ -// pulumi.String("role1"), -// pulumi.String("role2"), -// }, -// SchemaName: pulumi.String("schema"), -// Shares: pulumi.StringArray{ -// pulumi.String("share1"), -// pulumi.String("share2"), -// }, -// StageName: pulumi.String("stage"), -// WithGrantOption: pulumi.Bool(false), -// }) -// if err != nil { -// return err -// } -// return nil -// }) -// } -// ``` -// // ## Import // // # format is database name | schema name | stage name | privilege | true/false for with_grant_option @@ -59,7 +23,7 @@ type StageGrant struct { // The name of the database containing the current stage on which to grant privileges. DatabaseName pulumi.StringOutput `pulumi:"databaseName"` - // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. OnFuture pulumi.BoolPtrOutput `pulumi:"onFuture"` // The privilege to grant on the stage. Privilege pulumi.StringPtrOutput `pulumi:"privilege"` @@ -67,8 +31,6 @@ type StageGrant struct { Roles pulumi.StringArrayOutput `pulumi:"roles"` // The name of the schema containing the current stage on which to grant privileges. SchemaName pulumi.StringOutput `pulumi:"schemaName"` - // Grants privilege to these shares (only valid if onFuture is false). - Shares pulumi.StringArrayOutput `pulumi:"shares"` // The name of the stage on which to grant privilege (only valid if onFuture is false). StageName pulumi.StringPtrOutput `pulumi:"stageName"` // When this is set to true, allows the recipient role to grant the privileges to other roles. @@ -112,7 +74,7 @@ func GetStageGrant(ctx *pulumi.Context, type stageGrantState struct { // The name of the database containing the current stage on which to grant privileges. DatabaseName *string `pulumi:"databaseName"` - // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. OnFuture *bool `pulumi:"onFuture"` // The privilege to grant on the stage. Privilege *string `pulumi:"privilege"` @@ -120,8 +82,6 @@ type stageGrantState struct { Roles []string `pulumi:"roles"` // The name of the schema containing the current stage on which to grant privileges. SchemaName *string `pulumi:"schemaName"` - // Grants privilege to these shares (only valid if onFuture is false). - Shares []string `pulumi:"shares"` // The name of the stage on which to grant privilege (only valid if onFuture is false). StageName *string `pulumi:"stageName"` // When this is set to true, allows the recipient role to grant the privileges to other roles. @@ -131,7 +91,7 @@ type stageGrantState struct { type StageGrantState struct { // The name of the database containing the current stage on which to grant privileges. DatabaseName pulumi.StringPtrInput - // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. OnFuture pulumi.BoolPtrInput // The privilege to grant on the stage. Privilege pulumi.StringPtrInput @@ -139,8 +99,6 @@ type StageGrantState struct { Roles pulumi.StringArrayInput // The name of the schema containing the current stage on which to grant privileges. SchemaName pulumi.StringPtrInput - // Grants privilege to these shares (only valid if onFuture is false). - Shares pulumi.StringArrayInput // The name of the stage on which to grant privilege (only valid if onFuture is false). StageName pulumi.StringPtrInput // When this is set to true, allows the recipient role to grant the privileges to other roles. @@ -154,7 +112,7 @@ func (StageGrantState) ElementType() reflect.Type { type stageGrantArgs struct { // The name of the database containing the current stage on which to grant privileges. DatabaseName string `pulumi:"databaseName"` - // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. OnFuture *bool `pulumi:"onFuture"` // The privilege to grant on the stage. Privilege *string `pulumi:"privilege"` @@ -162,8 +120,6 @@ type stageGrantArgs struct { Roles []string `pulumi:"roles"` // The name of the schema containing the current stage on which to grant privileges. SchemaName string `pulumi:"schemaName"` - // Grants privilege to these shares (only valid if onFuture is false). - Shares []string `pulumi:"shares"` // The name of the stage on which to grant privilege (only valid if onFuture is false). StageName *string `pulumi:"stageName"` // When this is set to true, allows the recipient role to grant the privileges to other roles. @@ -174,7 +130,7 @@ type stageGrantArgs struct { type StageGrantArgs struct { // The name of the database containing the current stage on which to grant privileges. DatabaseName pulumi.StringInput - // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + // When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. OnFuture pulumi.BoolPtrInput // The privilege to grant on the stage. Privilege pulumi.StringPtrInput @@ -182,8 +138,6 @@ type StageGrantArgs struct { Roles pulumi.StringArrayInput // The name of the schema containing the current stage on which to grant privileges. SchemaName pulumi.StringInput - // Grants privilege to these shares (only valid if onFuture is false). - Shares pulumi.StringArrayInput // The name of the stage on which to grant privilege (only valid if onFuture is false). StageName pulumi.StringPtrInput // When this is set to true, allows the recipient role to grant the privileges to other roles. diff --git a/sdk/nodejs/functionGrant.ts b/sdk/nodejs/functionGrant.ts index 9982f1ef..357351ee 100644 --- a/sdk/nodejs/functionGrant.ts +++ b/sdk/nodejs/functionGrant.ts @@ -27,7 +27,7 @@ import * as utilities from "./utilities"; * }, * ], * returnType: "string", - * privilege: "select", + * privilege: "USAGE", * roles: [ * "role1", * "role2", @@ -94,7 +94,7 @@ export class FunctionGrant extends pulumi.CustomResource { */ public readonly onFuture!: pulumi.Output; /** - * The privilege to grant on the current or future function. + * The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. */ public readonly privilege!: pulumi.Output; /** @@ -186,7 +186,7 @@ export interface FunctionGrantState { */ onFuture?: pulumi.Input; /** - * The privilege to grant on the current or future function. + * The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. */ privilege?: pulumi.Input; /** @@ -232,7 +232,7 @@ export interface FunctionGrantArgs { */ onFuture?: pulumi.Input; /** - * The privilege to grant on the current or future function. + * The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. */ privilege?: pulumi.Input; /** diff --git a/sdk/nodejs/stageGrant.ts b/sdk/nodejs/stageGrant.ts index 097b63b3..7ed1ec4e 100644 --- a/sdk/nodejs/stageGrant.ts +++ b/sdk/nodejs/stageGrant.ts @@ -70,7 +70,7 @@ export class StageGrant extends pulumi.CustomResource { */ public readonly databaseName!: pulumi.Output; /** - * When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + * When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. */ public readonly onFuture!: pulumi.Output; /** @@ -85,10 +85,6 @@ export class StageGrant extends pulumi.CustomResource { * The name of the schema containing the current stage on which to grant privileges. */ public readonly schemaName!: pulumi.Output; - /** - * Grants privilege to these shares (only valid if onFuture is false). - */ - public readonly shares!: pulumi.Output; /** * The name of the stage on which to grant privilege (only valid if onFuture is false). */ @@ -116,7 +112,6 @@ export class StageGrant extends pulumi.CustomResource { resourceInputs["privilege"] = state ? state.privilege : undefined; resourceInputs["roles"] = state ? state.roles : undefined; resourceInputs["schemaName"] = state ? state.schemaName : undefined; - resourceInputs["shares"] = state ? state.shares : undefined; resourceInputs["stageName"] = state ? state.stageName : undefined; resourceInputs["withGrantOption"] = state ? state.withGrantOption : undefined; } else { @@ -132,7 +127,6 @@ export class StageGrant extends pulumi.CustomResource { resourceInputs["privilege"] = args ? args.privilege : undefined; resourceInputs["roles"] = args ? args.roles : undefined; resourceInputs["schemaName"] = args ? args.schemaName : undefined; - resourceInputs["shares"] = args ? args.shares : undefined; resourceInputs["stageName"] = args ? args.stageName : undefined; resourceInputs["withGrantOption"] = args ? args.withGrantOption : undefined; } @@ -150,7 +144,7 @@ export interface StageGrantState { */ databaseName?: pulumi.Input; /** - * When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + * When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. */ onFuture?: pulumi.Input; /** @@ -165,10 +159,6 @@ export interface StageGrantState { * The name of the schema containing the current stage on which to grant privileges. */ schemaName?: pulumi.Input; - /** - * Grants privilege to these shares (only valid if onFuture is false). - */ - shares?: pulumi.Input[]>; /** * The name of the stage on which to grant privilege (only valid if onFuture is false). */ @@ -188,7 +178,7 @@ export interface StageGrantArgs { */ databaseName: pulumi.Input; /** - * When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + * When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. */ onFuture?: pulumi.Input; /** @@ -203,10 +193,6 @@ export interface StageGrantArgs { * The name of the schema containing the current stage on which to grant privileges. */ schemaName: pulumi.Input; - /** - * Grants privilege to these shares (only valid if onFuture is false). - */ - shares?: pulumi.Input[]>; /** * The name of the stage on which to grant privilege (only valid if onFuture is false). */ diff --git a/sdk/python/pulumi_snowflake/function_grant.py b/sdk/python/pulumi_snowflake/function_grant.py index 881083c2..cc1b218c 100644 --- a/sdk/python/pulumi_snowflake/function_grant.py +++ b/sdk/python/pulumi_snowflake/function_grant.py @@ -32,7 +32,7 @@ def __init__(__self__, *, :param pulumi.Input[Sequence[pulumi.Input['FunctionGrantArgumentArgs']]] arguments: List of the arguments for the function (must be present if function has arguments and function_name is present) :param pulumi.Input[str] function_name: The name of the function on which to grant privileges immediately (only valid if on_future is false). :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future functions in the given schema. When this is true and no schema*name is provided apply this grant on all future functions in the given database. The function*name, arguments, return*type, and shares fields must be unset in order to use on_future. - :param pulumi.Input[str] privilege: The privilege to grant on the current or future function. + :param pulumi.Input[str] privilege: The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. :param pulumi.Input[str] return_type: The return type of the function (must be present if function_name is present) :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on_future is false). @@ -121,7 +121,7 @@ def on_future(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter def privilege(self) -> Optional[pulumi.Input[str]]: """ - The privilege to grant on the current or future function. + The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. """ return pulumi.get(self, "privilege") @@ -197,7 +197,7 @@ def __init__(__self__, *, :param pulumi.Input[str] database_name: The name of the database containing the current or future functions on which to grant privileges. :param pulumi.Input[str] function_name: The name of the function on which to grant privileges immediately (only valid if on_future is false). :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future functions in the given schema. When this is true and no schema*name is provided apply this grant on all future functions in the given database. The function*name, arguments, return*type, and shares fields must be unset in order to use on_future. - :param pulumi.Input[str] privilege: The privilege to grant on the current or future function. + :param pulumi.Input[str] privilege: The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. :param pulumi.Input[str] return_type: The return type of the function (must be present if function_name is present) :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. :param pulumi.Input[str] schema_name: The name of the schema containing the current or future functions on which to grant privileges. @@ -277,7 +277,7 @@ def on_future(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter def privilege(self) -> Optional[pulumi.Input[str]]: """ - The privilege to grant on the current or future function. + The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. """ return pulumi.get(self, "privilege") @@ -380,7 +380,7 @@ def __init__(__self__, %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression), ], return_type="string", - privilege="select", + privilege="USAGE", roles=[ "role1", "role2", @@ -407,7 +407,7 @@ def __init__(__self__, :param pulumi.Input[str] database_name: The name of the database containing the current or future functions on which to grant privileges. :param pulumi.Input[str] function_name: The name of the function on which to grant privileges immediately (only valid if on_future is false). :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future functions in the given schema. When this is true and no schema*name is provided apply this grant on all future functions in the given database. The function*name, arguments, return*type, and shares fields must be unset in order to use on_future. - :param pulumi.Input[str] privilege: The privilege to grant on the current or future function. + :param pulumi.Input[str] privilege: The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. :param pulumi.Input[str] return_type: The return type of the function (must be present if function_name is present) :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. :param pulumi.Input[str] schema_name: The name of the schema containing the current or future functions on which to grant privileges. @@ -438,7 +438,7 @@ def __init__(__self__, %!v(PANIC=Format method: interface conversion: model.Expression is *model.TemplateExpression, not *model.LiteralValueExpression), ], return_type="string", - privilege="select", + privilege="USAGE", roles=[ "role1", "role2", @@ -541,7 +541,7 @@ def get(resource_name: str, :param pulumi.Input[str] database_name: The name of the database containing the current or future functions on which to grant privileges. :param pulumi.Input[str] function_name: The name of the function on which to grant privileges immediately (only valid if on_future is false). :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future functions in the given schema. When this is true and no schema*name is provided apply this grant on all future functions in the given database. The function*name, arguments, return*type, and shares fields must be unset in order to use on_future. - :param pulumi.Input[str] privilege: The privilege to grant on the current or future function. + :param pulumi.Input[str] privilege: The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. :param pulumi.Input[str] return_type: The return type of the function (must be present if function_name is present) :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. :param pulumi.Input[str] schema_name: The name of the schema containing the current or future functions on which to grant privileges. @@ -600,7 +600,7 @@ def on_future(self) -> pulumi.Output[Optional[bool]]: @pulumi.getter def privilege(self) -> pulumi.Output[Optional[str]]: """ - The privilege to grant on the current or future function. + The privilege to grant on the current or future function. Must be one of `USAGE` or `OWNERSHIP`. """ return pulumi.get(self, "privilege") diff --git a/sdk/python/pulumi_snowflake/stage_grant.py b/sdk/python/pulumi_snowflake/stage_grant.py index 4d5a9c4b..a627db53 100644 --- a/sdk/python/pulumi_snowflake/stage_grant.py +++ b/sdk/python/pulumi_snowflake/stage_grant.py @@ -18,17 +18,15 @@ def __init__(__self__, *, on_future: Optional[pulumi.Input[bool]] = None, privilege: Optional[pulumi.Input[str]] = None, roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, stage_name: Optional[pulumi.Input[str]] = None, with_grant_option: Optional[pulumi.Input[bool]] = None): """ The set of arguments for constructing a StageGrant resource. :param pulumi.Input[str] database_name: The name of the database containing the current stage on which to grant privileges. :param pulumi.Input[str] schema_name: The name of the schema containing the current stage on which to grant privileges. - :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. :param pulumi.Input[str] privilege: The privilege to grant on the stage. :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. - :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on_future is false). :param pulumi.Input[str] stage_name: The name of the stage on which to grant privilege (only valid if on_future is false). :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles. """ @@ -40,8 +38,6 @@ def __init__(__self__, *, pulumi.set(__self__, "privilege", privilege) if roles is not None: pulumi.set(__self__, "roles", roles) - if shares is not None: - pulumi.set(__self__, "shares", shares) if stage_name is not None: pulumi.set(__self__, "stage_name", stage_name) if with_grant_option is not None: @@ -75,7 +71,7 @@ def schema_name(self, value: pulumi.Input[str]): @pulumi.getter(name="onFuture") def on_future(self) -> Optional[pulumi.Input[bool]]: """ - When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. """ return pulumi.get(self, "on_future") @@ -107,18 +103,6 @@ def roles(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: def roles(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): pulumi.set(self, "roles", value) - @property - @pulumi.getter - def shares(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: - """ - Grants privilege to these shares (only valid if on_future is false). - """ - return pulumi.get(self, "shares") - - @shares.setter - def shares(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): - pulumi.set(self, "shares", value) - @property @pulumi.getter(name="stageName") def stage_name(self) -> Optional[pulumi.Input[str]]: @@ -152,17 +136,15 @@ def __init__(__self__, *, privilege: Optional[pulumi.Input[str]] = None, roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, schema_name: Optional[pulumi.Input[str]] = None, - shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, stage_name: Optional[pulumi.Input[str]] = None, with_grant_option: Optional[pulumi.Input[bool]] = None): """ Input properties used for looking up and filtering StageGrant resources. :param pulumi.Input[str] database_name: The name of the database containing the current stage on which to grant privileges. - :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. :param pulumi.Input[str] privilege: The privilege to grant on the stage. :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. :param pulumi.Input[str] schema_name: The name of the schema containing the current stage on which to grant privileges. - :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on_future is false). :param pulumi.Input[str] stage_name: The name of the stage on which to grant privilege (only valid if on_future is false). :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles. """ @@ -176,8 +158,6 @@ def __init__(__self__, *, pulumi.set(__self__, "roles", roles) if schema_name is not None: pulumi.set(__self__, "schema_name", schema_name) - if shares is not None: - pulumi.set(__self__, "shares", shares) if stage_name is not None: pulumi.set(__self__, "stage_name", stage_name) if with_grant_option is not None: @@ -199,7 +179,7 @@ def database_name(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="onFuture") def on_future(self) -> Optional[pulumi.Input[bool]]: """ - When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. """ return pulumi.get(self, "on_future") @@ -243,18 +223,6 @@ def schema_name(self) -> Optional[pulumi.Input[str]]: def schema_name(self, value: Optional[pulumi.Input[str]]): pulumi.set(self, "schema_name", value) - @property - @pulumi.getter - def shares(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: - """ - Grants privilege to these shares (only valid if on_future is false). - """ - return pulumi.get(self, "shares") - - @shares.setter - def shares(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): - pulumi.set(self, "shares", value) - @property @pulumi.getter(name="stageName") def stage_name(self) -> Optional[pulumi.Input[str]]: @@ -290,34 +258,10 @@ def __init__(__self__, privilege: Optional[pulumi.Input[str]] = None, roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, schema_name: Optional[pulumi.Input[str]] = None, - shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, stage_name: Optional[pulumi.Input[str]] = None, with_grant_option: Optional[pulumi.Input[bool]] = None, __props__=None): """ - ## Example Usage - - ```python - import pulumi - import pulumi_snowflake as snowflake - - grant = snowflake.StageGrant("grant", - database_name="db", - on_future=False, - privilege="USAGE", - roles=[ - "role1", - "role2", - ], - schema_name="schema", - shares=[ - "share1", - "share2", - ], - stage_name="stage", - with_grant_option=False) - ``` - ## Import # format is database name | schema name | stage name | privilege | true/false for with_grant_option @@ -329,11 +273,10 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] database_name: The name of the database containing the current stage on which to grant privileges. - :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. :param pulumi.Input[str] privilege: The privilege to grant on the stage. :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. :param pulumi.Input[str] schema_name: The name of the schema containing the current stage on which to grant privileges. - :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on_future is false). :param pulumi.Input[str] stage_name: The name of the stage on which to grant privilege (only valid if on_future is false). :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles. """ @@ -344,29 +287,6 @@ def __init__(__self__, args: StageGrantArgs, opts: Optional[pulumi.ResourceOptions] = None): """ - ## Example Usage - - ```python - import pulumi - import pulumi_snowflake as snowflake - - grant = snowflake.StageGrant("grant", - database_name="db", - on_future=False, - privilege="USAGE", - roles=[ - "role1", - "role2", - ], - schema_name="schema", - shares=[ - "share1", - "share2", - ], - stage_name="stage", - with_grant_option=False) - ``` - ## Import # format is database name | schema name | stage name | privilege | true/false for with_grant_option @@ -395,7 +315,6 @@ def _internal_init(__self__, privilege: Optional[pulumi.Input[str]] = None, roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, schema_name: Optional[pulumi.Input[str]] = None, - shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, stage_name: Optional[pulumi.Input[str]] = None, with_grant_option: Optional[pulumi.Input[bool]] = None, __props__=None): @@ -419,7 +338,6 @@ def _internal_init(__self__, if schema_name is None and not opts.urn: raise TypeError("Missing required property 'schema_name'") __props__.__dict__["schema_name"] = schema_name - __props__.__dict__["shares"] = shares __props__.__dict__["stage_name"] = stage_name __props__.__dict__["with_grant_option"] = with_grant_option super(StageGrant, __self__).__init__( @@ -437,7 +355,6 @@ def get(resource_name: str, privilege: Optional[pulumi.Input[str]] = None, roles: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, schema_name: Optional[pulumi.Input[str]] = None, - shares: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, stage_name: Optional[pulumi.Input[str]] = None, with_grant_option: Optional[pulumi.Input[bool]] = None) -> 'StageGrant': """ @@ -448,11 +365,10 @@ def get(resource_name: str, :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] database_name: The name of the database containing the current stage on which to grant privileges. - :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + :param pulumi.Input[bool] on_future: When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. :param pulumi.Input[str] privilege: The privilege to grant on the stage. :param pulumi.Input[Sequence[pulumi.Input[str]]] roles: Grants privilege to these roles. :param pulumi.Input[str] schema_name: The name of the schema containing the current stage on which to grant privileges. - :param pulumi.Input[Sequence[pulumi.Input[str]]] shares: Grants privilege to these shares (only valid if on_future is false). :param pulumi.Input[str] stage_name: The name of the stage on which to grant privilege (only valid if on_future is false). :param pulumi.Input[bool] with_grant_option: When this is set to true, allows the recipient role to grant the privileges to other roles. """ @@ -465,7 +381,6 @@ def get(resource_name: str, __props__.__dict__["privilege"] = privilege __props__.__dict__["roles"] = roles __props__.__dict__["schema_name"] = schema_name - __props__.__dict__["shares"] = shares __props__.__dict__["stage_name"] = stage_name __props__.__dict__["with_grant_option"] = with_grant_option return StageGrant(resource_name, opts=opts, __props__=__props__) @@ -482,7 +397,7 @@ def database_name(self) -> pulumi.Output[str]: @pulumi.getter(name="onFuture") def on_future(self) -> pulumi.Output[Optional[bool]]: """ - When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name and shares fields must be unset in order to use on*future. + When this is set to true and a schema*name is provided, apply this grant on all future stages in the given schema. When this is true and no schema*name is provided apply this grant on all future stages in the given database. The stage*name field must be unset in order to use on*future. """ return pulumi.get(self, "on_future") @@ -510,14 +425,6 @@ def schema_name(self) -> pulumi.Output[str]: """ return pulumi.get(self, "schema_name") - @property - @pulumi.getter - def shares(self) -> pulumi.Output[Optional[Sequence[str]]]: - """ - Grants privilege to these shares (only valid if on_future is false). - """ - return pulumi.get(self, "shares") - @property @pulumi.getter(name="stageName") def stage_name(self) -> pulumi.Output[Optional[str]]: