Skip to content

Commit

Permalink
fix: create_key expected inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson2427 committed Jun 27, 2024
1 parent 7bc9b25 commit 881612d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ape_aws/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __len__(self) -> int:

@property
def accounts(self) -> Iterator[AccountAPI]:
def _load_account(key_alias, key_id, key_arn) -> Iterator[AccountAPI]:
def _load_account(key_alias, key_id, key_arn) -> AccountAPI:
filename = f"{key_alias}.json"
keyfile = self.data_folder.joinpath(filename)
if filename not in self._keyfiles:
Expand Down
2 changes: 1 addition & 1 deletion ape_aws/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def sign(self, key_id, msghash):
)
return response.get("Signature")

def create_key(self, key_spec: CreateKey | ImportKey):
def create_key(self, key_spec: CreateKey | ImportKeyRequest):
response = self.client.create_key(**key_spec.to_aws_dict())

key_id = response["KeyMetadata"]["KeyId"]
Expand Down
9 changes: 7 additions & 2 deletions ape_aws/kms/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,19 @@ def kms():
help="Apply key policy to a list of users if applicable, ex. -u ARN1, -u ARN2",
metavar="list[ARN]",
)
@click.option(
"-d",
"--description",
"description",
help="The description of the key you intend to create.",
)
@click.argument("alias_name")
@click.argument("description")
def create_key(
cli_ctx,
alias_name: str,
description: str,
administrators: list[str],
users: list[str],
description: str,
):
"""
Create an Ethereum Private Key in AWS KmsAccount
Expand Down

0 comments on commit 881612d

Please sign in to comment.