KMS

The SDK interfaces based on the KMS v1.0 API are as follows. For details about the invoking methods, see the sample codes.

Interface

Method

API

KeyService

Key create(KeyCreate keyCreate)

POST /v1.0/{project_id}/kms/create-key

Keys list(KeyListOptions options)

POST /v1.0/{project_id}/kms/list-keys

Key get(String keyId, String sequence)

POST /v1.0/{project_id}/kms/describe-key

Key disable(String keyId, String sequence)

POST /v1.0/{project_id}/kms/disable-key

Key enable(String keyId, String sequence)

POST /v1.0/{project_id}/kms/enable-key

Key scheduleDeletion(String keyId, Integer pendingDays, String sequence)

POST /v1.0/{project_id}/kms/schedule-key-deletion

Key cancelDeletion(String keyId, String sequence)

POST /v1.0/{project_id}/kms/cancel-key-deletion

Integer getKeyCreatedAmount()

GET /v1.0/{project_id}/kms/user-instances

List<Quota> quotas()

GET /v1.0/{project_id}/kms/user-quotas

CryptoService

String generateRandomString(String sequence)

POST /v1.0/{project_id}/kms/gen-random

DEK createDEK(String keyId, HashMap<String, Object> encryptionContext, String sequence)

POST /v1.0/{project_id}/kms/create-datakey

DEK createDEKWithoutPlaintext(String keyId, HashMap<String, Object> encryptionContext, String sequence)

POST /v1.0/{project_id}/kms/create-datakey-without-plaintext

EncryptedDEK encryptDEK(EncryptDEK encrypt)

POST /v1.0/{project_id}/kms/encrypt-datakey

DecryptedDEK decryptDEK(DecryptDEK decrypt)

POST /v1.0/{project_id}/kms/decrypt-datakey