Skip to content

Commit b367ec6

Browse files
fix: need alias property for accounts (#11)
Co-authored-by: El De-dog-lo <[email protected]>
1 parent 6060cee commit b367ec6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

ape_aws/accounts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ class KmsAccount(AccountAPI):
3838
key_id: str
3939
key_arn: str
4040

41+
@property
42+
def alias(self) -> str:
43+
return self.key_alias.replace("alias/", "")
44+
4145
@property
4246
def public_key(self):
4347
return kms_client.get_public_key(self.key_id)

ape_aws/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def raw_aliases(self) -> list[AliasResponse]:
8888
AliasResponse(**page)
8989
for alias_data in pages
9090
for page in alias_data["Aliases"]
91-
if "alias/aws" not in page["AliasName"]
91+
if "alias/aws/" not in page["AliasName"]
9292
]
9393

9494
def get_public_key(self, key_id: str):

0 commit comments

Comments
 (0)