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개 답변
0

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

전문가
답변함 2년 전
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.

전문가
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠