Skip to content

Instantly share code, notes, and snippets.

@awswithdotnet
Created September 5, 2022 21:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awswithdotnet/f583437c86507d2a7c5e6dcf28af4f71 to your computer and use it in GitHub Desktop.
Save awswithdotnet/f583437c86507d2a7c5e6dcf28af4f71 to your computer and use it in GitHub Desktop.
3 things kms 090122 - list keys
var kmsClient = new AmazonKeyManagementServiceClient();
var listKeysRequest = new ListKeysRequest();
Task<ListKeysResponse> listKeysResponse = await client.ListKeysAsync(listKeysRequest);
listKeysResponse.Keys.ForEach(key =>
{
Console.WriteLine($"ID: {key.KeyId}, {key.KeyArn}");
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment