While Updating QS users through API its gives following error earlier user was AUTHOR but now I want him to be reader
def update_user():
qs_client_ = boto3.client('quicksight')
response = qs_client_.update_user(
UserName='mig29@mailinator.com',
AwsAccountId='55113455',
Namespace='dev',
Email='khusha5lt5@gmail.com',
Role='READER')
Response:
{
"errorMessage": "An error occurred (InvalidParameterValueException) when calling the UpdateUser operation: You cannot downgrade a user role.Operation failed, or partially succeeded. AWS account ID: 551127968046, Namespace: advertisersdemo-dev, UserName: mig29@mailinator.com",
"errorType": "InvalidParameterValueException",
"stackTrace": [
" File \"/var/task/lambda_function.py\", line 9, in lambda_handler\n response = update_user()\n",
" File \"/var/task/lambda_function.py\", line 154, in update_user\n Role='READER')\n",
" File \"/var/runtime/botocore/client.py\", line 391, in _api_call\n return self._make_api_call(operation_name, kwargs)\n",
" File \"/var/runtime/botocore/client.py\", line 719, in _make_api_call\n raise error_class(parsed_response, operation_name)\n"
]
}