github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/lakeformation/permissions.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package lakeformation 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Grants permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3. Permissions are granted to a principal, in a Data Catalog, relative to a Lake Formation resource, which includes the Data Catalog, databases, tables, LF-tags, and LF-tag policies. For more information, see [Security and Access Control to Metadata and Data in Lake Formation](https://docs.aws.amazon.com/lake-formation/latest/dg/security-data-access.html). 16 // 17 // !> **WARNING:** Lake Formation permissions are not in effect by default within AWS. Using this resource will not secure your data and will result in errors if you do not change the security settings for existing resources and the default security settings for new resources. See Default Behavior and `IAMAllowedPrincipals` for additional details. 18 // 19 // > **NOTE:** In general, the `principal` should _NOT_ be a Lake Formation administrator or the entity (e.g., IAM role) that is running the deployment. Administrators have implicit permissions. These should be managed by granting or not granting administrator rights using `lakeformation.DataLakeSettings`, _not_ with this resource. 20 // 21 // ## Default Behavior and `IAMAllowedPrincipals` 22 // 23 // **_Lake Formation permissions are not in effect by default within AWS._** `IAMAllowedPrincipals` (i.e., `IAM_ALLOWED_PRINCIPALS`) conflicts with individual Lake Formation permissions (i.e., non-`IAMAllowedPrincipals` permissions), will cause unexpected behavior, and may result in errors. 24 // 25 // When using Lake Formation, choose ONE of the following options as they are mutually exclusive: 26 // 27 // 1. Use this resource (`lakeformation.Permissions`), change the default security settings using `lakeformation.DataLakeSettings`, and remove existing `IAMAllowedPrincipals` permissions 28 // 2. Use `IAMAllowedPrincipals` without `lakeformation.Permissions` 29 // 30 // This example shows removing the `IAMAllowedPrincipals` default security settings and making the caller a Lake Formation admin. Since `createDatabaseDefaultPermissions` and `createTableDefaultPermissions` are not set in the `lakeformation.DataLakeSettings` resource, they are cleared. 31 // 32 // <!--Start PulumiCodeChooser --> 33 // ```go 34 // package main 35 // 36 // import ( 37 // 38 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws" 39 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 40 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation" 41 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 42 // 43 // ) 44 // 45 // func main() { 46 // pulumi.Run(func(ctx *pulumi.Context) error { 47 // current, err := aws.GetCallerIdentity(ctx, nil, nil) 48 // if err != nil { 49 // return err 50 // } 51 // currentGetSessionContext, err := iam.GetSessionContext(ctx, &iam.GetSessionContextArgs{ 52 // Arn: current.Arn, 53 // }, nil) 54 // if err != nil { 55 // return err 56 // } 57 // _, err = lakeformation.NewDataLakeSettings(ctx, "test", &lakeformation.DataLakeSettingsArgs{ 58 // Admins: pulumi.StringArray{ 59 // pulumi.String(currentGetSessionContext.IssuerArn), 60 // }, 61 // }) 62 // if err != nil { 63 // return err 64 // } 65 // return nil 66 // }) 67 // } 68 // 69 // ``` 70 // <!--End PulumiCodeChooser --> 71 // 72 // To remove existing `IAMAllowedPrincipals` permissions, use the [AWS Lake Formation Console](https://console.aws.amazon.com/lakeformation/) or [AWS CLI](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/lakeformation/batch-revoke-permissions.html). 73 // 74 // `IAMAllowedPrincipals` is a hook to maintain backwards compatibility with AWS Glue. `IAMAllowedPrincipals` is a pseudo-entity group that acts like a Lake Formation principal. The group includes any IAM users and roles that are allowed access to your Data Catalog resources by your IAM policies. 75 // 76 // This is Lake Formation's default behavior: 77 // 78 // * Lake Formation grants `Super` permission to `IAMAllowedPrincipals` on all existing AWS Glue Data Catalog resources. 79 // * Lake Formation enables "Use only IAM access control" for new Data Catalog resources. 80 // 81 // For more details, see [Changing the Default Security Settings for Your Data Lake](https://docs.aws.amazon.com/lake-formation/latest/dg/change-settings.html). 82 // 83 // ### Problem Using `IAMAllowedPrincipals` 84 // 85 // AWS does not support combining `IAMAllowedPrincipals` permissions and non-`IAMAllowedPrincipals` permissions. Doing so results in unexpected permissions and behaviors. For example, this configuration grants a user `SELECT` on a column in a table. 86 // 87 // <!--Start PulumiCodeChooser --> 88 // ```go 89 // package main 90 // 91 // import ( 92 // 93 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/glue" 94 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation" 95 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 96 // 97 // ) 98 // 99 // func main() { 100 // pulumi.Run(func(ctx *pulumi.Context) error { 101 // _, err := glue.NewCatalogDatabase(ctx, "example", &glue.CatalogDatabaseArgs{ 102 // Name: pulumi.String("sadabate"), 103 // }) 104 // if err != nil { 105 // return err 106 // } 107 // exampleCatalogTable, err := glue.NewCatalogTable(ctx, "example", &glue.CatalogTableArgs{ 108 // Name: pulumi.String("abelt"), 109 // DatabaseName: pulumi.Any(test.Name), 110 // StorageDescriptor: &glue.CatalogTableStorageDescriptorArgs{ 111 // Columns: glue.CatalogTableStorageDescriptorColumnArray{ 112 // &glue.CatalogTableStorageDescriptorColumnArgs{ 113 // Name: pulumi.String("event"), 114 // Type: pulumi.String("string"), 115 // }, 116 // }, 117 // }, 118 // }) 119 // if err != nil { 120 // return err 121 // } 122 // _, err = lakeformation.NewPermissions(ctx, "example", &lakeformation.PermissionsArgs{ 123 // Permissions: pulumi.StringArray{ 124 // pulumi.String("SELECT"), 125 // }, 126 // Principal: pulumi.String("arn:aws:iam:us-east-1:123456789012:user/SanHolo"), 127 // TableWithColumns: &lakeformation.PermissionsTableWithColumnsArgs{ 128 // DatabaseName: exampleCatalogTable.DatabaseName, 129 // Name: exampleCatalogTable.Name, 130 // ColumnNames: pulumi.StringArray{ 131 // pulumi.String("event"), 132 // }, 133 // }, 134 // }) 135 // if err != nil { 136 // return err 137 // } 138 // return nil 139 // }) 140 // } 141 // 142 // ``` 143 // <!--End PulumiCodeChooser --> 144 // 145 // The resulting permissions depend on whether the table had `IAMAllowedPrincipals` (IAP) permissions or not. 146 // 147 // | Result With IAP | Result Without IAP | 148 // | ---- | ---- | 149 // | `SELECT` column wildcard (i.e., all columns) | `SELECT` on `"event"` (as expected) | 150 // 151 // ## Using Lake Formation Permissions 152 // 153 // Lake Formation grants implicit permissions to data lake administrators, database creators, and table creators. These implicit permissions cannot be revoked _per se_. If this resource reads implicit permissions, it will attempt to revoke them, which causes an error when the resource is destroyed. 154 // 155 // There are two ways to avoid these errors. First, and the way we recommend, is to avoid using this resource with principals that have implicit permissions. A second, error-prone option, is to grant explicit permissions (and `permissionsWithGrantOption`) to "overwrite" a principal's implicit permissions, which you can then revoke with this resource. For more information, see [Implicit Lake Formation Permissions](https://docs.aws.amazon.com/lake-formation/latest/dg/implicit-permissions.html). 156 // 157 // If the `principal` is also a data lake administrator, AWS grants implicit permissions that can cause errors using this resource. For example, AWS implicitly grants a `principal`/administrator `permissions` and `permissionsWithGrantOption` of `ALL`, `ALTER`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT` on a table. If you use this resource to explicitly grant the `principal`/administrator `permissions` but _not_ `permissionsWithGrantOption` of `ALL`, `ALTER`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT` on the table, this resource will read the implicit `permissionsWithGrantOption` and attempt to revoke them when the resource is destroyed. Doing so will cause an `InvalidInputException: No permissions revoked` error because you cannot revoke implicit permissions _per se_. To workaround this problem, explicitly grant the `principal`/administrator `permissions` _and_ `permissionsWithGrantOption`, which can then be revoked. Similarly, granting a `principal`/administrator permissions on a table with columns and providing `columnNames`, will result in a `InvalidInputException: Permissions modification is invalid` error because you are narrowing the implicit permissions. Instead, set `wildcard` to `true` and remove the `columnNames`. 158 // 159 // ## Example Usage 160 // 161 // ### Grant Permissions For A Lake Formation S3 Resource 162 // 163 // <!--Start PulumiCodeChooser --> 164 // ```go 165 // package main 166 // 167 // import ( 168 // 169 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation" 170 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 171 // 172 // ) 173 // 174 // func main() { 175 // pulumi.Run(func(ctx *pulumi.Context) error { 176 // _, err := lakeformation.NewPermissions(ctx, "example", &lakeformation.PermissionsArgs{ 177 // Principal: pulumi.Any(workflowRole.Arn), 178 // Permissions: pulumi.StringArray{ 179 // pulumi.String("DATA_LOCATION_ACCESS"), 180 // }, 181 // DataLocation: &lakeformation.PermissionsDataLocationArgs{ 182 // Arn: pulumi.Any(exampleAwsLakeformationResource.Arn), 183 // }, 184 // }) 185 // if err != nil { 186 // return err 187 // } 188 // return nil 189 // }) 190 // } 191 // 192 // ``` 193 // <!--End PulumiCodeChooser --> 194 // 195 // ### Grant Permissions For A Glue Catalog Database 196 // 197 // <!--Start PulumiCodeChooser --> 198 // ```go 199 // package main 200 // 201 // import ( 202 // 203 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation" 204 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 205 // 206 // ) 207 // 208 // func main() { 209 // pulumi.Run(func(ctx *pulumi.Context) error { 210 // _, err := lakeformation.NewPermissions(ctx, "example", &lakeformation.PermissionsArgs{ 211 // Principal: pulumi.Any(workflowRole.Arn), 212 // Permissions: pulumi.StringArray{ 213 // pulumi.String("CREATE_TABLE"), 214 // pulumi.String("ALTER"), 215 // pulumi.String("DROP"), 216 // }, 217 // Database: &lakeformation.PermissionsDatabaseArgs{ 218 // Name: pulumi.Any(exampleAwsGlueCatalogDatabase.Name), 219 // CatalogId: pulumi.String("110376042874"), 220 // }, 221 // }) 222 // if err != nil { 223 // return err 224 // } 225 // return nil 226 // }) 227 // } 228 // 229 // ``` 230 // <!--End PulumiCodeChooser --> 231 // 232 // ### Grant Permissions Using Tag-Based Access Control 233 // 234 // <!--Start PulumiCodeChooser --> 235 // ```go 236 // package main 237 // 238 // import ( 239 // 240 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lakeformation" 241 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 242 // 243 // ) 244 // 245 // func main() { 246 // pulumi.Run(func(ctx *pulumi.Context) error { 247 // _, err := lakeformation.NewPermissions(ctx, "test", &lakeformation.PermissionsArgs{ 248 // Principal: pulumi.Any(salesRole.Arn), 249 // Permissions: pulumi.StringArray{ 250 // pulumi.String("CREATE_TABLE"), 251 // pulumi.String("ALTER"), 252 // pulumi.String("DROP"), 253 // }, 254 // LfTagPolicy: &lakeformation.PermissionsLfTagPolicyArgs{ 255 // ResourceType: pulumi.String("DATABASE"), 256 // Expressions: lakeformation.PermissionsLfTagPolicyExpressionArray{ 257 // &lakeformation.PermissionsLfTagPolicyExpressionArgs{ 258 // Key: pulumi.String("Team"), 259 // Values: pulumi.StringArray{ 260 // pulumi.String("Sales"), 261 // }, 262 // }, 263 // &lakeformation.PermissionsLfTagPolicyExpressionArgs{ 264 // Key: pulumi.String("Environment"), 265 // Values: pulumi.StringArray{ 266 // pulumi.String("Dev"), 267 // pulumi.String("Production"), 268 // }, 269 // }, 270 // }, 271 // }, 272 // }) 273 // if err != nil { 274 // return err 275 // } 276 // return nil 277 // }) 278 // } 279 // 280 // ``` 281 // <!--End PulumiCodeChooser --> 282 type Permissions struct { 283 pulumi.CustomResourceState 284 285 // Identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment. 286 CatalogId pulumi.StringPtrOutput `pulumi:"catalogId"` 287 // Whether the permissions are to be granted for the Data Catalog. Defaults to `false`. 288 CatalogResource pulumi.BoolPtrOutput `pulumi:"catalogResource"` 289 // Configuration block for a data cells filter resource. Detailed below. 290 DataCellsFilter PermissionsDataCellsFilterPtrOutput `pulumi:"dataCellsFilter"` 291 // Configuration block for a data location resource. Detailed below. 292 DataLocation PermissionsDataLocationOutput `pulumi:"dataLocation"` 293 // Configuration block for a database resource. Detailed below. 294 Database PermissionsDatabaseOutput `pulumi:"database"` 295 // Configuration block for an LF-tag resource. Detailed below. 296 LfTag PermissionsLfTagOutput `pulumi:"lfTag"` 297 // Configuration block for an LF-tag policy resource. Detailed below. 298 LfTagPolicy PermissionsLfTagPolicyOutput `pulumi:"lfTagPolicy"` 299 // List of permissions granted to the principal. Valid values may include `ALL`, `ALTER`, `ASSOCIATE`, `CREATE_DATABASE`, `CREATE_TABLE`, `DATA_LOCATION_ACCESS`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT`. For details on each permission, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 300 Permissions pulumi.StringArrayOutput `pulumi:"permissions"` 301 // Subset of `permissions` which the principal can pass. 302 PermissionsWithGrantOptions pulumi.StringArrayOutput `pulumi:"permissionsWithGrantOptions"` 303 // Principal to be granted the permissions on the resource. Supported principals include `IAM_ALLOWED_PRINCIPALS` (see Default Behavior and `IAMAllowedPrincipals` above), IAM roles, users, groups, SAML groups and users, QuickSight groups, OUs, and organizations as well as AWS account IDs for cross-account permissions. For more information, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 304 // 305 // > **NOTE:** We highly recommend that the `principal` _NOT_ be a Lake Formation administrator (granted using `lakeformation.DataLakeSettings`). The entity (e.g., IAM role) running the deployment will most likely need to be a Lake Formation administrator. As such, the entity will have implicit permissions and does not need permissions granted through this resource. 306 // 307 // One of the following is required: 308 Principal pulumi.StringOutput `pulumi:"principal"` 309 // Configuration block for a table resource. Detailed below. 310 Table PermissionsTableOutput `pulumi:"table"` 311 // Configuration block for a table with columns resource. Detailed below. 312 // 313 // The following arguments are optional: 314 TableWithColumns PermissionsTableWithColumnsOutput `pulumi:"tableWithColumns"` 315 } 316 317 // NewPermissions registers a new resource with the given unique name, arguments, and options. 318 func NewPermissions(ctx *pulumi.Context, 319 name string, args *PermissionsArgs, opts ...pulumi.ResourceOption) (*Permissions, error) { 320 if args == nil { 321 return nil, errors.New("missing one or more required arguments") 322 } 323 324 if args.Permissions == nil { 325 return nil, errors.New("invalid value for required argument 'Permissions'") 326 } 327 if args.Principal == nil { 328 return nil, errors.New("invalid value for required argument 'Principal'") 329 } 330 opts = internal.PkgResourceDefaultOpts(opts) 331 var resource Permissions 332 err := ctx.RegisterResource("aws:lakeformation/permissions:Permissions", name, args, &resource, opts...) 333 if err != nil { 334 return nil, err 335 } 336 return &resource, nil 337 } 338 339 // GetPermissions gets an existing Permissions resource's state with the given name, ID, and optional 340 // state properties that are used to uniquely qualify the lookup (nil if not required). 341 func GetPermissions(ctx *pulumi.Context, 342 name string, id pulumi.IDInput, state *PermissionsState, opts ...pulumi.ResourceOption) (*Permissions, error) { 343 var resource Permissions 344 err := ctx.ReadResource("aws:lakeformation/permissions:Permissions", name, id, state, &resource, opts...) 345 if err != nil { 346 return nil, err 347 } 348 return &resource, nil 349 } 350 351 // Input properties used for looking up and filtering Permissions resources. 352 type permissionsState struct { 353 // Identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment. 354 CatalogId *string `pulumi:"catalogId"` 355 // Whether the permissions are to be granted for the Data Catalog. Defaults to `false`. 356 CatalogResource *bool `pulumi:"catalogResource"` 357 // Configuration block for a data cells filter resource. Detailed below. 358 DataCellsFilter *PermissionsDataCellsFilter `pulumi:"dataCellsFilter"` 359 // Configuration block for a data location resource. Detailed below. 360 DataLocation *PermissionsDataLocation `pulumi:"dataLocation"` 361 // Configuration block for a database resource. Detailed below. 362 Database *PermissionsDatabase `pulumi:"database"` 363 // Configuration block for an LF-tag resource. Detailed below. 364 LfTag *PermissionsLfTag `pulumi:"lfTag"` 365 // Configuration block for an LF-tag policy resource. Detailed below. 366 LfTagPolicy *PermissionsLfTagPolicy `pulumi:"lfTagPolicy"` 367 // List of permissions granted to the principal. Valid values may include `ALL`, `ALTER`, `ASSOCIATE`, `CREATE_DATABASE`, `CREATE_TABLE`, `DATA_LOCATION_ACCESS`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT`. For details on each permission, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 368 Permissions []string `pulumi:"permissions"` 369 // Subset of `permissions` which the principal can pass. 370 PermissionsWithGrantOptions []string `pulumi:"permissionsWithGrantOptions"` 371 // Principal to be granted the permissions on the resource. Supported principals include `IAM_ALLOWED_PRINCIPALS` (see Default Behavior and `IAMAllowedPrincipals` above), IAM roles, users, groups, SAML groups and users, QuickSight groups, OUs, and organizations as well as AWS account IDs for cross-account permissions. For more information, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 372 // 373 // > **NOTE:** We highly recommend that the `principal` _NOT_ be a Lake Formation administrator (granted using `lakeformation.DataLakeSettings`). The entity (e.g., IAM role) running the deployment will most likely need to be a Lake Formation administrator. As such, the entity will have implicit permissions and does not need permissions granted through this resource. 374 // 375 // One of the following is required: 376 Principal *string `pulumi:"principal"` 377 // Configuration block for a table resource. Detailed below. 378 Table *PermissionsTable `pulumi:"table"` 379 // Configuration block for a table with columns resource. Detailed below. 380 // 381 // The following arguments are optional: 382 TableWithColumns *PermissionsTableWithColumns `pulumi:"tableWithColumns"` 383 } 384 385 type PermissionsState struct { 386 // Identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment. 387 CatalogId pulumi.StringPtrInput 388 // Whether the permissions are to be granted for the Data Catalog. Defaults to `false`. 389 CatalogResource pulumi.BoolPtrInput 390 // Configuration block for a data cells filter resource. Detailed below. 391 DataCellsFilter PermissionsDataCellsFilterPtrInput 392 // Configuration block for a data location resource. Detailed below. 393 DataLocation PermissionsDataLocationPtrInput 394 // Configuration block for a database resource. Detailed below. 395 Database PermissionsDatabasePtrInput 396 // Configuration block for an LF-tag resource. Detailed below. 397 LfTag PermissionsLfTagPtrInput 398 // Configuration block for an LF-tag policy resource. Detailed below. 399 LfTagPolicy PermissionsLfTagPolicyPtrInput 400 // List of permissions granted to the principal. Valid values may include `ALL`, `ALTER`, `ASSOCIATE`, `CREATE_DATABASE`, `CREATE_TABLE`, `DATA_LOCATION_ACCESS`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT`. For details on each permission, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 401 Permissions pulumi.StringArrayInput 402 // Subset of `permissions` which the principal can pass. 403 PermissionsWithGrantOptions pulumi.StringArrayInput 404 // Principal to be granted the permissions on the resource. Supported principals include `IAM_ALLOWED_PRINCIPALS` (see Default Behavior and `IAMAllowedPrincipals` above), IAM roles, users, groups, SAML groups and users, QuickSight groups, OUs, and organizations as well as AWS account IDs for cross-account permissions. For more information, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 405 // 406 // > **NOTE:** We highly recommend that the `principal` _NOT_ be a Lake Formation administrator (granted using `lakeformation.DataLakeSettings`). The entity (e.g., IAM role) running the deployment will most likely need to be a Lake Formation administrator. As such, the entity will have implicit permissions and does not need permissions granted through this resource. 407 // 408 // One of the following is required: 409 Principal pulumi.StringPtrInput 410 // Configuration block for a table resource. Detailed below. 411 Table PermissionsTablePtrInput 412 // Configuration block for a table with columns resource. Detailed below. 413 // 414 // The following arguments are optional: 415 TableWithColumns PermissionsTableWithColumnsPtrInput 416 } 417 418 func (PermissionsState) ElementType() reflect.Type { 419 return reflect.TypeOf((*permissionsState)(nil)).Elem() 420 } 421 422 type permissionsArgs struct { 423 // Identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment. 424 CatalogId *string `pulumi:"catalogId"` 425 // Whether the permissions are to be granted for the Data Catalog. Defaults to `false`. 426 CatalogResource *bool `pulumi:"catalogResource"` 427 // Configuration block for a data cells filter resource. Detailed below. 428 DataCellsFilter *PermissionsDataCellsFilter `pulumi:"dataCellsFilter"` 429 // Configuration block for a data location resource. Detailed below. 430 DataLocation *PermissionsDataLocation `pulumi:"dataLocation"` 431 // Configuration block for a database resource. Detailed below. 432 Database *PermissionsDatabase `pulumi:"database"` 433 // Configuration block for an LF-tag resource. Detailed below. 434 LfTag *PermissionsLfTag `pulumi:"lfTag"` 435 // Configuration block for an LF-tag policy resource. Detailed below. 436 LfTagPolicy *PermissionsLfTagPolicy `pulumi:"lfTagPolicy"` 437 // List of permissions granted to the principal. Valid values may include `ALL`, `ALTER`, `ASSOCIATE`, `CREATE_DATABASE`, `CREATE_TABLE`, `DATA_LOCATION_ACCESS`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT`. For details on each permission, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 438 Permissions []string `pulumi:"permissions"` 439 // Subset of `permissions` which the principal can pass. 440 PermissionsWithGrantOptions []string `pulumi:"permissionsWithGrantOptions"` 441 // Principal to be granted the permissions on the resource. Supported principals include `IAM_ALLOWED_PRINCIPALS` (see Default Behavior and `IAMAllowedPrincipals` above), IAM roles, users, groups, SAML groups and users, QuickSight groups, OUs, and organizations as well as AWS account IDs for cross-account permissions. For more information, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 442 // 443 // > **NOTE:** We highly recommend that the `principal` _NOT_ be a Lake Formation administrator (granted using `lakeformation.DataLakeSettings`). The entity (e.g., IAM role) running the deployment will most likely need to be a Lake Formation administrator. As such, the entity will have implicit permissions and does not need permissions granted through this resource. 444 // 445 // One of the following is required: 446 Principal string `pulumi:"principal"` 447 // Configuration block for a table resource. Detailed below. 448 Table *PermissionsTable `pulumi:"table"` 449 // Configuration block for a table with columns resource. Detailed below. 450 // 451 // The following arguments are optional: 452 TableWithColumns *PermissionsTableWithColumns `pulumi:"tableWithColumns"` 453 } 454 455 // The set of arguments for constructing a Permissions resource. 456 type PermissionsArgs struct { 457 // Identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment. 458 CatalogId pulumi.StringPtrInput 459 // Whether the permissions are to be granted for the Data Catalog. Defaults to `false`. 460 CatalogResource pulumi.BoolPtrInput 461 // Configuration block for a data cells filter resource. Detailed below. 462 DataCellsFilter PermissionsDataCellsFilterPtrInput 463 // Configuration block for a data location resource. Detailed below. 464 DataLocation PermissionsDataLocationPtrInput 465 // Configuration block for a database resource. Detailed below. 466 Database PermissionsDatabasePtrInput 467 // Configuration block for an LF-tag resource. Detailed below. 468 LfTag PermissionsLfTagPtrInput 469 // Configuration block for an LF-tag policy resource. Detailed below. 470 LfTagPolicy PermissionsLfTagPolicyPtrInput 471 // List of permissions granted to the principal. Valid values may include `ALL`, `ALTER`, `ASSOCIATE`, `CREATE_DATABASE`, `CREATE_TABLE`, `DATA_LOCATION_ACCESS`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT`. For details on each permission, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 472 Permissions pulumi.StringArrayInput 473 // Subset of `permissions` which the principal can pass. 474 PermissionsWithGrantOptions pulumi.StringArrayInput 475 // Principal to be granted the permissions on the resource. Supported principals include `IAM_ALLOWED_PRINCIPALS` (see Default Behavior and `IAMAllowedPrincipals` above), IAM roles, users, groups, SAML groups and users, QuickSight groups, OUs, and organizations as well as AWS account IDs for cross-account permissions. For more information, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 476 // 477 // > **NOTE:** We highly recommend that the `principal` _NOT_ be a Lake Formation administrator (granted using `lakeformation.DataLakeSettings`). The entity (e.g., IAM role) running the deployment will most likely need to be a Lake Formation administrator. As such, the entity will have implicit permissions and does not need permissions granted through this resource. 478 // 479 // One of the following is required: 480 Principal pulumi.StringInput 481 // Configuration block for a table resource. Detailed below. 482 Table PermissionsTablePtrInput 483 // Configuration block for a table with columns resource. Detailed below. 484 // 485 // The following arguments are optional: 486 TableWithColumns PermissionsTableWithColumnsPtrInput 487 } 488 489 func (PermissionsArgs) ElementType() reflect.Type { 490 return reflect.TypeOf((*permissionsArgs)(nil)).Elem() 491 } 492 493 type PermissionsInput interface { 494 pulumi.Input 495 496 ToPermissionsOutput() PermissionsOutput 497 ToPermissionsOutputWithContext(ctx context.Context) PermissionsOutput 498 } 499 500 func (*Permissions) ElementType() reflect.Type { 501 return reflect.TypeOf((**Permissions)(nil)).Elem() 502 } 503 504 func (i *Permissions) ToPermissionsOutput() PermissionsOutput { 505 return i.ToPermissionsOutputWithContext(context.Background()) 506 } 507 508 func (i *Permissions) ToPermissionsOutputWithContext(ctx context.Context) PermissionsOutput { 509 return pulumi.ToOutputWithContext(ctx, i).(PermissionsOutput) 510 } 511 512 // PermissionsArrayInput is an input type that accepts PermissionsArray and PermissionsArrayOutput values. 513 // You can construct a concrete instance of `PermissionsArrayInput` via: 514 // 515 // PermissionsArray{ PermissionsArgs{...} } 516 type PermissionsArrayInput interface { 517 pulumi.Input 518 519 ToPermissionsArrayOutput() PermissionsArrayOutput 520 ToPermissionsArrayOutputWithContext(context.Context) PermissionsArrayOutput 521 } 522 523 type PermissionsArray []PermissionsInput 524 525 func (PermissionsArray) ElementType() reflect.Type { 526 return reflect.TypeOf((*[]*Permissions)(nil)).Elem() 527 } 528 529 func (i PermissionsArray) ToPermissionsArrayOutput() PermissionsArrayOutput { 530 return i.ToPermissionsArrayOutputWithContext(context.Background()) 531 } 532 533 func (i PermissionsArray) ToPermissionsArrayOutputWithContext(ctx context.Context) PermissionsArrayOutput { 534 return pulumi.ToOutputWithContext(ctx, i).(PermissionsArrayOutput) 535 } 536 537 // PermissionsMapInput is an input type that accepts PermissionsMap and PermissionsMapOutput values. 538 // You can construct a concrete instance of `PermissionsMapInput` via: 539 // 540 // PermissionsMap{ "key": PermissionsArgs{...} } 541 type PermissionsMapInput interface { 542 pulumi.Input 543 544 ToPermissionsMapOutput() PermissionsMapOutput 545 ToPermissionsMapOutputWithContext(context.Context) PermissionsMapOutput 546 } 547 548 type PermissionsMap map[string]PermissionsInput 549 550 func (PermissionsMap) ElementType() reflect.Type { 551 return reflect.TypeOf((*map[string]*Permissions)(nil)).Elem() 552 } 553 554 func (i PermissionsMap) ToPermissionsMapOutput() PermissionsMapOutput { 555 return i.ToPermissionsMapOutputWithContext(context.Background()) 556 } 557 558 func (i PermissionsMap) ToPermissionsMapOutputWithContext(ctx context.Context) PermissionsMapOutput { 559 return pulumi.ToOutputWithContext(ctx, i).(PermissionsMapOutput) 560 } 561 562 type PermissionsOutput struct{ *pulumi.OutputState } 563 564 func (PermissionsOutput) ElementType() reflect.Type { 565 return reflect.TypeOf((**Permissions)(nil)).Elem() 566 } 567 568 func (o PermissionsOutput) ToPermissionsOutput() PermissionsOutput { 569 return o 570 } 571 572 func (o PermissionsOutput) ToPermissionsOutputWithContext(ctx context.Context) PermissionsOutput { 573 return o 574 } 575 576 // Identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Lake Formation environment. 577 func (o PermissionsOutput) CatalogId() pulumi.StringPtrOutput { 578 return o.ApplyT(func(v *Permissions) pulumi.StringPtrOutput { return v.CatalogId }).(pulumi.StringPtrOutput) 579 } 580 581 // Whether the permissions are to be granted for the Data Catalog. Defaults to `false`. 582 func (o PermissionsOutput) CatalogResource() pulumi.BoolPtrOutput { 583 return o.ApplyT(func(v *Permissions) pulumi.BoolPtrOutput { return v.CatalogResource }).(pulumi.BoolPtrOutput) 584 } 585 586 // Configuration block for a data cells filter resource. Detailed below. 587 func (o PermissionsOutput) DataCellsFilter() PermissionsDataCellsFilterPtrOutput { 588 return o.ApplyT(func(v *Permissions) PermissionsDataCellsFilterPtrOutput { return v.DataCellsFilter }).(PermissionsDataCellsFilterPtrOutput) 589 } 590 591 // Configuration block for a data location resource. Detailed below. 592 func (o PermissionsOutput) DataLocation() PermissionsDataLocationOutput { 593 return o.ApplyT(func(v *Permissions) PermissionsDataLocationOutput { return v.DataLocation }).(PermissionsDataLocationOutput) 594 } 595 596 // Configuration block for a database resource. Detailed below. 597 func (o PermissionsOutput) Database() PermissionsDatabaseOutput { 598 return o.ApplyT(func(v *Permissions) PermissionsDatabaseOutput { return v.Database }).(PermissionsDatabaseOutput) 599 } 600 601 // Configuration block for an LF-tag resource. Detailed below. 602 func (o PermissionsOutput) LfTag() PermissionsLfTagOutput { 603 return o.ApplyT(func(v *Permissions) PermissionsLfTagOutput { return v.LfTag }).(PermissionsLfTagOutput) 604 } 605 606 // Configuration block for an LF-tag policy resource. Detailed below. 607 func (o PermissionsOutput) LfTagPolicy() PermissionsLfTagPolicyOutput { 608 return o.ApplyT(func(v *Permissions) PermissionsLfTagPolicyOutput { return v.LfTagPolicy }).(PermissionsLfTagPolicyOutput) 609 } 610 611 // List of permissions granted to the principal. Valid values may include `ALL`, `ALTER`, `ASSOCIATE`, `CREATE_DATABASE`, `CREATE_TABLE`, `DATA_LOCATION_ACCESS`, `DELETE`, `DESCRIBE`, `DROP`, `INSERT`, and `SELECT`. For details on each permission, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 612 func (o PermissionsOutput) Permissions() pulumi.StringArrayOutput { 613 return o.ApplyT(func(v *Permissions) pulumi.StringArrayOutput { return v.Permissions }).(pulumi.StringArrayOutput) 614 } 615 616 // Subset of `permissions` which the principal can pass. 617 func (o PermissionsOutput) PermissionsWithGrantOptions() pulumi.StringArrayOutput { 618 return o.ApplyT(func(v *Permissions) pulumi.StringArrayOutput { return v.PermissionsWithGrantOptions }).(pulumi.StringArrayOutput) 619 } 620 621 // Principal to be granted the permissions on the resource. Supported principals include `IAM_ALLOWED_PRINCIPALS` (see Default Behavior and `IAMAllowedPrincipals` above), IAM roles, users, groups, SAML groups and users, QuickSight groups, OUs, and organizations as well as AWS account IDs for cross-account permissions. For more information, see [Lake Formation Permissions Reference](https://docs.aws.amazon.com/lake-formation/latest/dg/lf-permissions-reference.html). 622 // 623 // > **NOTE:** We highly recommend that the `principal` _NOT_ be a Lake Formation administrator (granted using `lakeformation.DataLakeSettings`). The entity (e.g., IAM role) running the deployment will most likely need to be a Lake Formation administrator. As such, the entity will have implicit permissions and does not need permissions granted through this resource. 624 // 625 // One of the following is required: 626 func (o PermissionsOutput) Principal() pulumi.StringOutput { 627 return o.ApplyT(func(v *Permissions) pulumi.StringOutput { return v.Principal }).(pulumi.StringOutput) 628 } 629 630 // Configuration block for a table resource. Detailed below. 631 func (o PermissionsOutput) Table() PermissionsTableOutput { 632 return o.ApplyT(func(v *Permissions) PermissionsTableOutput { return v.Table }).(PermissionsTableOutput) 633 } 634 635 // Configuration block for a table with columns resource. Detailed below. 636 // 637 // The following arguments are optional: 638 func (o PermissionsOutput) TableWithColumns() PermissionsTableWithColumnsOutput { 639 return o.ApplyT(func(v *Permissions) PermissionsTableWithColumnsOutput { return v.TableWithColumns }).(PermissionsTableWithColumnsOutput) 640 } 641 642 type PermissionsArrayOutput struct{ *pulumi.OutputState } 643 644 func (PermissionsArrayOutput) ElementType() reflect.Type { 645 return reflect.TypeOf((*[]*Permissions)(nil)).Elem() 646 } 647 648 func (o PermissionsArrayOutput) ToPermissionsArrayOutput() PermissionsArrayOutput { 649 return o 650 } 651 652 func (o PermissionsArrayOutput) ToPermissionsArrayOutputWithContext(ctx context.Context) PermissionsArrayOutput { 653 return o 654 } 655 656 func (o PermissionsArrayOutput) Index(i pulumi.IntInput) PermissionsOutput { 657 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Permissions { 658 return vs[0].([]*Permissions)[vs[1].(int)] 659 }).(PermissionsOutput) 660 } 661 662 type PermissionsMapOutput struct{ *pulumi.OutputState } 663 664 func (PermissionsMapOutput) ElementType() reflect.Type { 665 return reflect.TypeOf((*map[string]*Permissions)(nil)).Elem() 666 } 667 668 func (o PermissionsMapOutput) ToPermissionsMapOutput() PermissionsMapOutput { 669 return o 670 } 671 672 func (o PermissionsMapOutput) ToPermissionsMapOutputWithContext(ctx context.Context) PermissionsMapOutput { 673 return o 674 } 675 676 func (o PermissionsMapOutput) MapIndex(k pulumi.StringInput) PermissionsOutput { 677 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Permissions { 678 return vs[0].(map[string]*Permissions)[vs[1].(string)] 679 }).(PermissionsOutput) 680 } 681 682 func init() { 683 pulumi.RegisterInputType(reflect.TypeOf((*PermissionsInput)(nil)).Elem(), &Permissions{}) 684 pulumi.RegisterInputType(reflect.TypeOf((*PermissionsArrayInput)(nil)).Elem(), PermissionsArray{}) 685 pulumi.RegisterInputType(reflect.TypeOf((*PermissionsMapInput)(nil)).Elem(), PermissionsMap{}) 686 pulumi.RegisterOutputType(PermissionsOutput{}) 687 pulumi.RegisterOutputType(PermissionsArrayOutput{}) 688 pulumi.RegisterOutputType(PermissionsMapOutput{}) 689 }