grant_permissions
¶
grant_permissions(
principal: DataLakePrincipal,
resource: Resource,
permissions: PermissionList,
*,
config_overrides: Optional[LakeFormationClientConfig] = None,
catalog_id: Optional[CatalogIdString] = None,
condition: Optional[Condition] = None,
permissions_with_grant_option: Optional[PermissionList] = None,
) -> GrantPermissionsResponse
Grants permissions to the principal to access metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3.
For information about permissions, see Security and Access Control to Metadata and Data.
Parameters:
-
catalog_id(Optional[CatalogIdString], default:None) –The 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.
-
principal(DataLakePrincipal) –The principal to be granted the permissions on the resource. Supported principals are IAM users or IAM roles, and they are defined by their principal type and their ARN.
Note that if you define a resource with a particular ARN, then later delete, and recreate a resource with that same ARN, the resource maintains the permissions already granted.
-
resource(Resource) –The resource to which permissions are to be granted. Resources in Lake Formation are the Data Catalog, databases, and tables.
-
permissions(PermissionList) –The permissions granted to the principal on the resource. Lake Formation defines privileges to grant and revoke access to metadata in the Data Catalog and data organized in underlying data storage such as Amazon S3. Lake Formation requires that each principal be authorized to perform a specific task on Lake Formation resources.
-
permissions_with_grant_option(Optional[PermissionList], default:None) –Indicates a list of the granted permissions that the principal may pass to other users. These permissions may only be a subset of the permissions granted in the
Privileges.
Raises:
-
ConcurrentModificationException–Two processes are trying to modify a resource simultaneously.
-
EntityNotFoundException–A specified entity does not exist.
-
InvalidInputException–The input provided was not valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lakeformation/_services/lake_formation.py
3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 | |