与当前文档相反,可以使用"TableWildcard": {}
如下示例所示的构造来授予角色对给定数据库中所有表的权限。
"ExamplePermission": {
"Type": "AWS::LakeFormation::Permissions",
"Properties": {
"DataLakePrincipal": {
"DataLakePrincipalIdentifier": {
"Fn::GetAtt": [
"ExampleRole",
"Arn"
]
}
},
"Resource": {
"TableResource": {
"DatabaseName": "example_database",
"TableWildcard": {}
}
},
"Permissions": [
"SELECT"
],
"PermissionsWithGrantOption": []
}
}
对于使用 CDK 的任何人,这里是表资源属性的 Python 风格:
import aws_cdk.aws_lakeformation as lakeformation
table_property = lakeformation.CfnPermissions.TableResourceProperty(
database_name="example_database",
table_wildcard={}
)