Cloud Keys 2020 Node.js Edition

Questions / Feedback?

VersionState Property

The key version's state.

Syntax

 googlekms.getVersionState(index, [callback])

Default Value

""

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 the getVersionState([callback]) 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.

The callback for the setVersionState([callback]) method is defined as:

function(err){ }

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

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

The key version's state.

This property reflects the key version's state. Possible values are:

  • PENDING_GENERATION: The version is still being generated, and cannot be used yet. Once generation has finished, it will become ENABLED.
  • ENABLED: The version is enabled and available for use.
  • DISABLED: The version is disabled; it cannot be used unless it is enabled again. It may be destroyed.
  • DESTROY_SCHEDULED: The version's cryptographic material is scheduled for destruction, and will be destroyed at the time reflected by VersionDestructionDate unless CancelDestruction before then.
  • DESTROYED: The version's cryptographic material has been destroyed, and the version is no longer usable. This state is permanent once entered.
  • PENDING_IMPORT*: Cryptographic material has not finished importing, and the version cannot be used yet. Once the import has finished, it will become ENABLED.
  • IMPORT_FAILED*: The version was not imported successfully; it cannot be used, and any imported cryptographic material has been discarded.
(* The class does not directly support importing key version material at this time; however, these states may still appear if an import job was initiated using SendCustomRequest or some external method.)

The index parameter specifies the index of the item in the array. The size of the array is controlled by the VersionCount property.

This property is read-only and not available at design time.

Data Type

String

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