@cached_propertydefaliases(self)->list[str]:"""Get the aliases of the AWS account."""# Super overkill here using pagination when an account can only# have a single alias, but at least this implementation should be# future-proof.aliases:list[str]=[]paginator=self.__session.client("iam").get_paginator("list_account_aliases")response_iterator=paginator.paginate()# NOTE (@ITProKyle): for some reason, pyright is not seeing `PageIterator` as a genericforpageincast("Iterator[ListAccountAliasesResponseTypeDef]",response_iterator):aliases.extend(page.get("AccountAliases",[]))returnaliases@cached_propertydefid(self)->str:"""Get the ID of the AWS account."""account_id=self.__session.client("sts").get_caller_identity().get("Account")ifaccount_id:returnaccount_idraiseValueError("get_caller_identity did not return Account")@cached_propertydef__session(self)->boto3.Session:"""Get a cached boto3 session. Session creation was moved out of class init to improve performance by only creating the session once it is needed. """returnself.__ctx.get_session()