Skip to content

Commit

Permalink
fix: need alias property for accounts (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com>
  • Loading branch information
johnson2427 and fubuloubu authored Jun 21, 2024
1 parent 6060cee commit b367ec6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ape_aws/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class KmsAccount(AccountAPI):
key_id: str
key_arn: str

@property
def alias(self) -> str:
return self.key_alias.replace("alias/", "")

@property
def public_key(self):
return kms_client.get_public_key(self.key_id)
Expand Down
2 changes: 1 addition & 1 deletion ape_aws/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def raw_aliases(self) -> list[AliasResponse]:
AliasResponse(**page)
for alias_data in pages
for page in alias_data["Aliases"]
if "alias/aws" not in page["AliasName"]
if "alias/aws/" not in page["AliasName"]
]

def get_public_key(self, key_id: str):
Expand Down

0 comments on commit b367ec6

Please sign in to comment.