API to obtain AWS account name beside the organization API?

0

I have securityAudit permission for a given account, I want to programmatically obtain the account alias/name for the target account? Closest I can find information is related to "Organizations" api (describe-account), but that can only be used on the target account itself (and only on root organization/delegated account). Is there any other API that I can call to get this information?

1 Respuesta
0
aws sts get-caller-identity --query Account --output text
aws iam list-account-aliases 
profile pictureAWS
EXPERTO
kentrad
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas