How to make the log of "DeleteUser" "responseElements" to have the value of "UserId"

0

The "DeleteUser" log has a "null" value on "responseElements" filed. Is there any flag I can raise so that the delete_user action will return the "userId" in the response? The scenario is: create then delete in loop users with the same name. I should determine the correlation between creating and deleting logs in real time. I can determine what "create" action is related to what "delete" action since they all have the same name.

2 Respostas
0

Hi, there's quite a few AWS APIs that have a DeleteUser action - which one are you asking about?

ESPECIALISTA
respondido há 2 anos
0

As documented in https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/iam.html#IAM.Client.delete_user, delete_user() doesn't have a "responseElements" field. It's documented as "Returns: None" which means the response is a dictionary containing a ResponseMetadata dictionary and possibly an Error dictionary. The response won't contain a userId field.

ESPECIALISTA
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas