类 KmsClient


  • public class KmsClient
    extends AbstractBceClient
    Provides the client for accessing the Key Manager Service.
    • 构造器详细资料

      • KmsClient

        public KmsClient()
    • 方法详细资料

      • createKey

        public CreateKeyResponse createKey​(CreateKeyRequest request)
                                    throws Exception
        Creates a new master key.
        参数:
        request - The request object containing all options for creating master key.
        返回:
        The newly created master key.
        抛出:
        Exception
      • listKeys

        public ListKeysResponse listKeys​(ListKeysRequest request)
                                  throws Exception
        Returns ListKeysResponse containing master keys.
        参数:
        request - The request object containing limit and marker for listing master keys.
        返回:
        ListKeysResponse containing a listing of the master keys.
        抛出:
        Exception
      • encrypt

        public EncryptResponse encrypt​(EncryptRequest request)
                                throws Exception
        Returns EncryptResponse containing ciphertext which is encrypted using plaintext by master key.
        参数:
        request - The request object containing masterKeyId and plaintext.
        返回:
        EncryptResponse containing ciphertext and master key id.
        抛出:
        Exception
      • decrypt

        public DecryptResponse decrypt​(DecryptRequest request)
                                throws Exception
        Returns DecryptResponse containing plaintext which is decrypted using ciphertext. MasterKeyId is in ciphertext.
        参数:
        request - The request object containing ciphertext.
        返回:
        DecryptResponse containing master key id and plaintext .
        抛出:
        Exception
      • generateDataKey

        public GenerateDataKeyResponse generateDataKey​(GenerateDataKeyRequest request)
                                                throws Exception
        Returns GenerateDataKeyResponse containing ciphertext, keyId and plaintext which is random generated by kms.
        参数:
        request - The request object containing master key id, keySpec and numberOfBytes.
        返回:
        GenerateDataKeyResponse containing ciphertext, keyId and plaintext.
        抛出:
        Exception
      • enableKey

        public void enableKey​(EnableKeyRequest request)
                       throws Exception
        Enable the specified master key.
        参数:
        request - The request object containing master key id.
        抛出:
        Exception
      • disableKey

        public void disableKey​(DisableKeyRequest request)
                        throws Exception
        Disable the specified master key.
        参数:
        request - The request object containing master key id.
        抛出:
        Exception
      • scheduleKeyDeletion

        public ScheduleKeyDeletionResponse scheduleKeyDeletion​(ScheduleKeyDeletionRequest request)
                                                        throws Exception
        Returns ScheduleKeyDeletionResponse containing deletionDate of specified master key and master key id.
        参数:
        request - The request object containing master key id, pendingWindowsInDays.
        返回:
        ScheduleKeyDeletionResponse containing deletionDate and master key id.
        抛出:
        Exception
      • cancelKeyDeletion

        public void cancelKeyDeletion​(CancelKeyDeletionRequest request)
                               throws Exception
        Cancels deletion of the specified master key.
        参数:
        request - The request object containing master key id.
        抛出:
        Exception
      • describeKey

        public DescribeKeyResponse describeKey​(DescribeKeyRequest request)
                                        throws Exception
        Returns DescribeKeyResponse containing deletionDate of specified master key and master key id.
        参数:
        request - The request object containing master key id, pendingWindowsInDays.
        返回:
        DescribeKeyResponse containing deletionDate and master key id.
        抛出:
        Exception
      • setInternalRequest

        public void setInternalRequest​(InternalRequest internalRequest,
                                       StringWriter writer)
        set InternalRequest with StringWriter
        参数:
        internalRequest -
        writer -