boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
8.95k stars 1.86k forks source link

Boto3 lakeformation grant_permissions attribute valid value documentation error. #2894

Closed stthoom closed 3 years ago

stthoom commented 3 years ago

Describe the bug

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lakeformation.html#LakeFormation.Client.grant_permissions

Issue with Boto3 Lakeformation documentation. grant_permissions "Permissions" parameter valid values are DESCRIBE and ASSOCIATE, which are documented as "DESCRIBE_TAG" and ASSOCIATE_TAG", upon usage causing below error.

Steps to reproduce import boto3 lfc = boto3.client("lakeformation") response = lfc.grant_permissions( CatalogId='**', Principal={ 'DataLakePrincipalIdentifier': 'arn:aws:iam::***:role/lake-creator-role'

},
Resource={
    'LFTag': {
        'CatalogId': '='**********',',
        'TagKey': 'security-level',
        'TagValues': [
            'sec-1',
            'sec-2',
            'sec-3'                
        ]
    }

},
Permissions=[        
    'ASSOCIATE_TAG',
]    

)

InvalidInputException: An error occurred (InvalidInputException) when calling the GrantPermissions operation: Please grant only valid Lake Formation permissions. [ASSOCIATE_TAG] are not all valid Lake Formation permissions.

Expected behavior Documentation need fix.

stobrien89 commented 3 years ago

Hi @stthoom,

Closing this, as it's a duplicate of https://github.com/boto/botocore/issues/2406.

github-actions[bot] commented 3 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.