U Dx`@sUdZddlZddlmZmZddlZddlmZee Z ej e d<d eej edddZdeej edd d Zdeej edd d ZdS)z STS module.N)Optionalcast)_utils_logger) boto3_sessionreturncCs*tj|d}tttjd|ddS)a]Get Account ID. Parameters ---------- boto3_session : boto3.Session(), optional Boto3 Session. The default boto3 session will be used if boto3_session receive None. Returns ------- str Account ID. Examples -------- >>> import awswrangler as wr >>> account_id = wr.sts.get_account_id() sessionsts service_namer ZAccountrZensure_sessionrstrclientZget_caller_identitygetrr r6/tmp/pip-target-zr53vnty/lib/python/awswrangler/sts.pyget_account_id s rcCs*tj|d}tttjd|ddS)anGet current user/role ARN. Parameters ---------- boto3_session : boto3.Session(), optional Boto3 Session. The default boto3 session will be used if boto3_session receive None. Returns ------- str User/role ARN. Examples -------- >>> import awswrangler as wr >>> arn = wr.sts.get_current_identity_arn() rr r ZArnr rrrrget_current_identity_arn$s rcCst|d}|dd}|S)arGet current user/role name. Parameters ---------- boto3_session : boto3.Session(), optional Boto3 Session. The default boto3 session will be used if boto3_session receive None. Returns ------- str User/role name. Examples -------- >>> import awswrangler as wr >>> name = wr.sts.get_current_identity_name() )r/)r rpartition)rZarnnamerrrget_current_identity_name;s r)N)N)N)__doc__loggingtypingrrZboto3Z awswranglerr getLogger__name__rLogger__annotations__Sessionrrrrrrrrs