Skip to content
v2.273.0

KeyUsage Enum ​

The key usage, represents the cryptographic operations of keys.

Example ​

ts
const key = new kms.Key(this, 'MyKey', {
  keySpec: kms.KeySpec.ECC_SECG_P256K1, // Default to SYMMETRIC_DEFAULT
  keyUsage: kms.KeyUsage.SIGN_VERIFY,    // and ENCRYPT_DECRYPT
});

Members ​

MemberDescription
ENCRYPT_DECRYPTEncryption and decryption.
SIGN_VERIFYSigning and verification.
GENERATE_VERIFY_MACGenerating and verifying MACs.
KEY_AGREEMENTDeriving shared secrets.

Referenced by ​

  • KeyProps.keyUsagekey_usagekeyUsageKeyUsageKeyUsage