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 Answers
0

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

EXPERT
answered 2 years ago
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.

EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions