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
2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 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 | |