private static void DeleteKeyMaterial(KmsClient kmsClient, string keyId) { try { var req = new DeleteImportedKeyMaterialRequest { VersionId = "v1.0", Body = new OperateKeyRequestBody { KeyId = keyId } }; var resp = kmsClient.DeleteImportedKeyMaterial(req); Console.WriteLine(resp.GetHttpStatusCode()); } catch (RequestTimeoutException requestTimeoutException) { Console.WriteLine(requestTimeoutException.ErrorMessage); } catch (ServiceResponseException clientRequestException) { Console.WriteLine(clientRequestException.HttpStatusCode); Console.WriteLine(clientRequestException.ErrorCode); Console.WriteLine(clientRequestException.ErrorMsg); } catch (ConnectionException connectionException) { Console.WriteLine(connectionException.ErrorMessage); } }