CryptoKey

google.cloud.kms.v1. CryptoKey

Represents a CryptoKey.

Constructor

new CryptoKey(propertiesopt)

Constructs a new CryptoKey.

Parameters:
Name Type Attributes Description
properties google.cloud.kms.v1.ICryptoKey <optional>

Properties to set

Implements:
  • ICryptoKey

Members

(static) CryptoKeyPurpose :number

CryptoKeyPurpose enum.

Properties:
Name Type Description
CRYPTO_KEY_PURPOSE_UNSPECIFIED number

CRYPTO_KEY_PURPOSE_UNSPECIFIED value

ENCRYPT_DECRYPT number

ENCRYPT_DECRYPT value

ASYMMETRIC_SIGN number

ASYMMETRIC_SIGN value

ASYMMETRIC_DECRYPT number

ASYMMETRIC_DECRYPT value

createTime :google.protobuf.ITimestamp|null|undefined

CryptoKey createTime.

labels :Object.<string, string>

CryptoKey labels.

name :string

CryptoKey name.

nextRotationTime :google.protobuf.ITimestamp|null|undefined

CryptoKey nextRotationTime.

primary :google.cloud.kms.v1.ICryptoKeyVersion|null|undefined

CryptoKey primary.

purpose :google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose

CryptoKey purpose.

rotationPeriod :google.protobuf.IDuration|null|undefined

CryptoKey rotationPeriod.

rotationSchedule :"rotationPeriod"|undefined

CryptoKey rotationSchedule.

versionTemplate :google.cloud.kms.v1.ICryptoKeyVersionTemplate|null|undefined

CryptoKey versionTemplate.

Methods

(static) create(propertiesopt) → {google.cloud.kms.v1.CryptoKey}

Creates a new CryptoKey instance using the specified properties.

Parameters:
Name Type Attributes Description
properties google.cloud.kms.v1.ICryptoKey <optional>

Properties to set

(static) decode(reader, lengthopt) → {google.cloud.kms.v1.CryptoKey}

Decodes a CryptoKey message from the specified reader or buffer.

Parameters:
Name Type Attributes Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

length number <optional>

Message length if known beforehand

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) decodeDelimited(reader) → {google.cloud.kms.v1.CryptoKey}

Decodes a CryptoKey message from the specified reader or buffer, length delimited.

Parameters:
Name Type Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) encode(message, writeropt) → {$protobuf.Writer}

Encodes the specified CryptoKey message. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.cloud.kms.v1.ICryptoKey

CryptoKey message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

(static) encodeDelimited(message, writeropt) → {$protobuf.Writer}

Encodes the specified CryptoKey message, length delimited. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.cloud.kms.v1.ICryptoKey

CryptoKey message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

(static) fromObject(object) → {google.cloud.kms.v1.CryptoKey}

Creates a CryptoKey message from a plain object. Also converts values to their respective internal types.

Parameters:
Name Type Description
object Object.<string, *>

Plain object

(static) toObject(message, optionsopt) → {Object.<string, *>}

Creates a plain object from a CryptoKey message. Also converts values to other types if specified.

Parameters:
Name Type Attributes Description
message google.cloud.kms.v1.CryptoKey

CryptoKey

options $protobuf.IConversionOptions <optional>

Conversion options

(static) verify(message) → {string|null}

Verifies a CryptoKey message.

Parameters:
Name Type Description
message Object.<string, *>

Plain object to verify

toJSON() → {Object.<string, *>}

Converts this CryptoKey to JSON.