KeyManagementService

google.cloud.kms.v1. KeyManagementService

Represents a KeyManagementService

Constructor

new KeyManagementService(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new KeyManagementService service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {KeyManagementService}

Creates new KeyManagementService service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

asymmetricDecrypt(request, callback) → {undefined}

Calls AsymmetricDecrypt.

Parameters:
Name Type Description
request google.cloud.kms.v1.IAsymmetricDecryptRequest

AsymmetricDecryptRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.AsymmetricDecryptCallback

Node-style callback called with the error, if any, and AsymmetricDecryptResponse

asymmetricDecrypt(request) → {Promise.<google.cloud.kms.v1.AsymmetricDecryptResponse>}

Calls AsymmetricDecrypt.

Parameters:
Name Type Description
request google.cloud.kms.v1.IAsymmetricDecryptRequest

AsymmetricDecryptRequest message or plain object

asymmetricSign(request, callback) → {undefined}

Calls AsymmetricSign.

Parameters:
Name Type Description
request google.cloud.kms.v1.IAsymmetricSignRequest

AsymmetricSignRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.AsymmetricSignCallback

Node-style callback called with the error, if any, and AsymmetricSignResponse

asymmetricSign(request) → {Promise.<google.cloud.kms.v1.AsymmetricSignResponse>}

Calls AsymmetricSign.

Parameters:
Name Type Description
request google.cloud.kms.v1.IAsymmetricSignRequest

AsymmetricSignRequest message or plain object

createCryptoKey(request, callback) → {undefined}

Calls CreateCryptoKey.

Parameters:
Name Type Description
request google.cloud.kms.v1.ICreateCryptoKeyRequest

CreateCryptoKeyRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyCallback

Node-style callback called with the error, if any, and CryptoKey

createCryptoKey(request) → {Promise.<google.cloud.kms.v1.CryptoKey>}

Calls CreateCryptoKey.

Parameters:
Name Type Description
request google.cloud.kms.v1.ICreateCryptoKeyRequest

CreateCryptoKeyRequest message or plain object

createCryptoKeyVersion(request, callback) → {undefined}

Calls CreateCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.ICreateCryptoKeyVersionRequest

CreateCryptoKeyVersionRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersionCallback

Node-style callback called with the error, if any, and CryptoKeyVersion

createCryptoKeyVersion(request) → {Promise.<google.cloud.kms.v1.CryptoKeyVersion>}

Calls CreateCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.ICreateCryptoKeyVersionRequest

CreateCryptoKeyVersionRequest message or plain object

createImportJob(request, callback) → {undefined}

Calls CreateImportJob.

Parameters:
Name Type Description
request google.cloud.kms.v1.ICreateImportJobRequest

CreateImportJobRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.CreateImportJobCallback

Node-style callback called with the error, if any, and ImportJob

createImportJob(request) → {Promise.<google.cloud.kms.v1.ImportJob>}

Calls CreateImportJob.

Parameters:
Name Type Description
request google.cloud.kms.v1.ICreateImportJobRequest

CreateImportJobRequest message or plain object

createKeyRing(request, callback) → {undefined}

Calls CreateKeyRing.

Parameters:
Name Type Description
request google.cloud.kms.v1.ICreateKeyRingRequest

CreateKeyRingRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.CreateKeyRingCallback

Node-style callback called with the error, if any, and KeyRing

createKeyRing(request) → {Promise.<google.cloud.kms.v1.KeyRing>}

Calls CreateKeyRing.

Parameters:
Name Type Description
request google.cloud.kms.v1.ICreateKeyRingRequest

CreateKeyRingRequest message or plain object

decrypt(request, callback) → {undefined}

Calls Decrypt.

Parameters:
Name Type Description
request google.cloud.kms.v1.IDecryptRequest

DecryptRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.DecryptCallback

Node-style callback called with the error, if any, and DecryptResponse

decrypt(request) → {Promise.<google.cloud.kms.v1.DecryptResponse>}

Calls Decrypt.

Parameters:
Name Type Description
request google.cloud.kms.v1.IDecryptRequest

DecryptRequest message or plain object

destroyCryptoKeyVersion(request, callback) → {undefined}

Calls DestroyCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest

DestroyCryptoKeyVersionRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.DestroyCryptoKeyVersionCallback

Node-style callback called with the error, if any, and CryptoKeyVersion

destroyCryptoKeyVersion(request) → {Promise.<google.cloud.kms.v1.CryptoKeyVersion>}

Calls DestroyCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IDestroyCryptoKeyVersionRequest

DestroyCryptoKeyVersionRequest message or plain object

encrypt(request, callback) → {undefined}

Calls Encrypt.

Parameters:
Name Type Description
request google.cloud.kms.v1.IEncryptRequest

EncryptRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.EncryptCallback

Node-style callback called with the error, if any, and EncryptResponse

encrypt(request) → {Promise.<google.cloud.kms.v1.EncryptResponse>}

Calls Encrypt.

Parameters:
Name Type Description
request google.cloud.kms.v1.IEncryptRequest

EncryptRequest message or plain object

getCryptoKey(request, callback) → {undefined}

Calls GetCryptoKey.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetCryptoKeyRequest

GetCryptoKeyRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.GetCryptoKeyCallback

Node-style callback called with the error, if any, and CryptoKey

getCryptoKey(request) → {Promise.<google.cloud.kms.v1.CryptoKey>}

Calls GetCryptoKey.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetCryptoKeyRequest

GetCryptoKeyRequest message or plain object

getCryptoKeyVersion(request, callback) → {undefined}

Calls GetCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetCryptoKeyVersionRequest

GetCryptoKeyVersionRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.GetCryptoKeyVersionCallback

Node-style callback called with the error, if any, and CryptoKeyVersion

getCryptoKeyVersion(request) → {Promise.<google.cloud.kms.v1.CryptoKeyVersion>}

Calls GetCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetCryptoKeyVersionRequest

GetCryptoKeyVersionRequest message or plain object

getImportJob(request, callback) → {undefined}

Calls GetImportJob.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetImportJobRequest

GetImportJobRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.GetImportJobCallback

Node-style callback called with the error, if any, and ImportJob

getImportJob(request) → {Promise.<google.cloud.kms.v1.ImportJob>}

Calls GetImportJob.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetImportJobRequest

GetImportJobRequest message or plain object

getKeyRing(request, callback) → {undefined}

Calls GetKeyRing.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetKeyRingRequest

GetKeyRingRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.GetKeyRingCallback

Node-style callback called with the error, if any, and KeyRing

getKeyRing(request) → {Promise.<google.cloud.kms.v1.KeyRing>}

Calls GetKeyRing.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetKeyRingRequest

GetKeyRingRequest message or plain object

getPublicKey(request, callback) → {undefined}

Calls GetPublicKey.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetPublicKeyRequest

GetPublicKeyRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.GetPublicKeyCallback

Node-style callback called with the error, if any, and PublicKey

getPublicKey(request) → {Promise.<google.cloud.kms.v1.PublicKey>}

Calls GetPublicKey.

Parameters:
Name Type Description
request google.cloud.kms.v1.IGetPublicKeyRequest

GetPublicKeyRequest message or plain object

importCryptoKeyVersion(request, callback) → {undefined}

Calls ImportCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IImportCryptoKeyVersionRequest

ImportCryptoKeyVersionRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.ImportCryptoKeyVersionCallback

Node-style callback called with the error, if any, and CryptoKeyVersion

importCryptoKeyVersion(request) → {Promise.<google.cloud.kms.v1.CryptoKeyVersion>}

Calls ImportCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IImportCryptoKeyVersionRequest

ImportCryptoKeyVersionRequest message or plain object

listCryptoKeys(request, callback) → {undefined}

Calls ListCryptoKeys.

Parameters:
Name Type Description
request google.cloud.kms.v1.IListCryptoKeysRequest

ListCryptoKeysRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.ListCryptoKeysCallback

Node-style callback called with the error, if any, and ListCryptoKeysResponse

listCryptoKeys(request) → {Promise.<google.cloud.kms.v1.ListCryptoKeysResponse>}

Calls ListCryptoKeys.

Parameters:
Name Type Description
request google.cloud.kms.v1.IListCryptoKeysRequest

ListCryptoKeysRequest message or plain object

listCryptoKeyVersions(request, callback) → {undefined}

Calls ListCryptoKeyVersions.

Parameters:
Name Type Description
request google.cloud.kms.v1.IListCryptoKeyVersionsRequest

ListCryptoKeyVersionsRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersionsCallback

Node-style callback called with the error, if any, and ListCryptoKeyVersionsResponse

listCryptoKeyVersions(request) → {Promise.<google.cloud.kms.v1.ListCryptoKeyVersionsResponse>}

Calls ListCryptoKeyVersions.

Parameters:
Name Type Description
request google.cloud.kms.v1.IListCryptoKeyVersionsRequest

ListCryptoKeyVersionsRequest message or plain object

listImportJobs(request, callback) → {undefined}

Calls ListImportJobs.

Parameters:
Name Type Description
request google.cloud.kms.v1.IListImportJobsRequest

ListImportJobsRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.ListImportJobsCallback

Node-style callback called with the error, if any, and ListImportJobsResponse

listImportJobs(request) → {Promise.<google.cloud.kms.v1.ListImportJobsResponse>}

Calls ListImportJobs.

Parameters:
Name Type Description
request google.cloud.kms.v1.IListImportJobsRequest

ListImportJobsRequest message or plain object

listKeyRings(request, callback) → {undefined}

Calls ListKeyRings.

Parameters:
Name Type Description
request google.cloud.kms.v1.IListKeyRingsRequest

ListKeyRingsRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.ListKeyRingsCallback

Node-style callback called with the error, if any, and ListKeyRingsResponse

listKeyRings(request) → {Promise.<google.cloud.kms.v1.ListKeyRingsResponse>}

Calls ListKeyRings.

Parameters:
Name Type Description
request google.cloud.kms.v1.IListKeyRingsRequest

ListKeyRingsRequest message or plain object

restoreCryptoKeyVersion(request, callback) → {undefined}

Calls RestoreCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest

RestoreCryptoKeyVersionRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersionCallback

Node-style callback called with the error, if any, and CryptoKeyVersion

restoreCryptoKeyVersion(request) → {Promise.<google.cloud.kms.v1.CryptoKeyVersion>}

Calls RestoreCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IRestoreCryptoKeyVersionRequest

RestoreCryptoKeyVersionRequest message or plain object

updateCryptoKey(request, callback) → {undefined}

Calls UpdateCryptoKey.

Parameters:
Name Type Description
request google.cloud.kms.v1.IUpdateCryptoKeyRequest

UpdateCryptoKeyRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyCallback

Node-style callback called with the error, if any, and CryptoKey

updateCryptoKey(request) → {Promise.<google.cloud.kms.v1.CryptoKey>}

Calls UpdateCryptoKey.

Parameters:
Name Type Description
request google.cloud.kms.v1.IUpdateCryptoKeyRequest

UpdateCryptoKeyRequest message or plain object

updateCryptoKeyPrimaryVersion(request, callback) → {undefined}

Calls UpdateCryptoKeyPrimaryVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest

UpdateCryptoKeyPrimaryVersionRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersionCallback

Node-style callback called with the error, if any, and CryptoKey

updateCryptoKeyPrimaryVersion(request) → {Promise.<google.cloud.kms.v1.CryptoKey>}

Calls UpdateCryptoKeyPrimaryVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IUpdateCryptoKeyPrimaryVersionRequest

UpdateCryptoKeyPrimaryVersionRequest message or plain object

updateCryptoKeyVersion(request, callback) → {undefined}

Calls UpdateCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest

UpdateCryptoKeyVersionRequest message or plain object

callback google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyVersionCallback

Node-style callback called with the error, if any, and CryptoKeyVersion

updateCryptoKeyVersion(request) → {Promise.<google.cloud.kms.v1.CryptoKeyVersion>}

Calls UpdateCryptoKeyVersion.

Parameters:
Name Type Description
request google.cloud.kms.v1.IUpdateCryptoKeyVersionRequest

UpdateCryptoKeyVersionRequest message or plain object

Type Definitions

AsymmetricDecryptCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#asymmetricDecrypt.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.AsymmetricDecryptResponse <optional>

AsymmetricDecryptResponse

AsymmetricSignCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#asymmetricSign.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.AsymmetricSignResponse <optional>

AsymmetricSignResponse

CreateCryptoKeyCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#createCryptoKey.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKey <optional>

CryptoKey

CreateCryptoKeyVersionCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#createCryptoKeyVersion.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKeyVersion <optional>

CryptoKeyVersion

CreateImportJobCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#createImportJob.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.ImportJob <optional>

ImportJob

CreateKeyRingCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#createKeyRing.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.KeyRing <optional>

KeyRing

DecryptCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#decrypt.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.DecryptResponse <optional>

DecryptResponse

DestroyCryptoKeyVersionCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#destroyCryptoKeyVersion.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKeyVersion <optional>

CryptoKeyVersion

EncryptCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#encrypt.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.EncryptResponse <optional>

EncryptResponse

GetCryptoKeyCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#getCryptoKey.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKey <optional>

CryptoKey

GetCryptoKeyVersionCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#getCryptoKeyVersion.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKeyVersion <optional>

CryptoKeyVersion

GetImportJobCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#getImportJob.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.ImportJob <optional>

ImportJob

GetKeyRingCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#getKeyRing.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.KeyRing <optional>

KeyRing

GetPublicKeyCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#getPublicKey.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.PublicKey <optional>

PublicKey

ImportCryptoKeyVersionCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#importCryptoKeyVersion.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKeyVersion <optional>

CryptoKeyVersion

ListCryptoKeysCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#listCryptoKeys.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.ListCryptoKeysResponse <optional>

ListCryptoKeysResponse

ListCryptoKeyVersionsCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#listCryptoKeyVersions.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.ListCryptoKeyVersionsResponse <optional>

ListCryptoKeyVersionsResponse

ListImportJobsCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#listImportJobs.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.ListImportJobsResponse <optional>

ListImportJobsResponse

ListKeyRingsCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#listKeyRings.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.ListKeyRingsResponse <optional>

ListKeyRingsResponse

RestoreCryptoKeyVersionCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#restoreCryptoKeyVersion.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKeyVersion <optional>

CryptoKeyVersion

UpdateCryptoKeyCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#updateCryptoKey.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKey <optional>

CryptoKey

UpdateCryptoKeyPrimaryVersionCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#updateCryptoKeyPrimaryVersion.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKey <optional>

CryptoKey

UpdateCryptoKeyVersionCallback(error, responseopt)

Callback as used by google.cloud.kms.v1.KeyManagementService#updateCryptoKeyVersion.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.kms.v1.CryptoKeyVersion <optional>

CryptoKeyVersion