Skip to content

yggdrasil.aws.account.resource

resource

AWS account resource — the account a client authenticates as.

:class:AWSAccount is the :class:~yggdrasil.aws.client.AWSResource for the account: account id, region, STS caller identity, and a clickable :attr:explore_url to the AWS Console home. Its :class:AccountService (in service.py) is the thin STS-flavored binding. Reach it as AWSClient.current().account.

AWSAccount

AWSAccount(service: Optional[AWSService] = None, **kwargs: Any)

Bases: AWSResource

The AWS account a client authenticates as.

AWSClient.current().account AWSAccount(URL('https://us-east-1.console.aws.amazon.com/console/home?region=us-east-1')) AWSClient.current().account.account_id '123456789012'

explore_url property

explore_url: URL

AWS Console home for this account, pinned to its region.

caller_identity

caller_identity() -> dict

STS GetCallerIdentity — account, ARN, and user id of the caller.