Cloud Keys 2020 Node.js Edition

Questions / Feedback?

GetKeyRotationStatus Method

Retrieves the key rotation status for a CMK.

Syntax

amazonkms.getKeyRotationStatus(keyId, [callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This method retrieves the key rotation status for the CMK specified by KeyId; it will return true if the CMK's key material is set to be automatically rotated, or false if not.

The value passed for the KeyId parameter must be the Id or ARN of a CMK in the current Region. If an ARN is provided, it can be for a CMK in another account so long as the appropriate permissions are in place.

This method will always return false for asymmetric CMKs, CMKs with imported key material, and CMKs that reside in a custom key store, as such CMKs do not support automatic key rotation. This method will also return false if the server returns an error for any other reason.

Copyright (c) 2022 /n software inc. - All rights reserved.
Cloud Keys 2020 Node.js Edition - Version 20.0 [Build 8157]