grant_permissions
async
¶
grant_permissions(
principal: DataLakePrincipal,
resource: Resource,
permissions: PermissionList,
*,
config_overrides: Optional[AsyncLakeFormationClientConfig] = 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/async_lake_formation.py
2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 | |