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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南