public class DecryptRequest extends AmazonWebServiceRequest implements Serializable
Decrypts ciphertext. Ciphertext is plaintext that has been previously encrypted by using any of the following operations:
Whenever possible, use key policies to give users permission to call the
Decrypt operation on the CMK, instead of IAM policies. Otherwise, you might
create an IAM user policy that gives the user Decrypt permission on all CMKs.
This user could decrypt ciphertext that was encrypted by CMKs in other
accounts if the key policy for the cross-account CMK permits it. If you must
use an IAM policy for Decrypt permissions, limit the user to
particular CMKs or particular trusted accounts.
The result of this operation varies with the key state of the CMK. For details, see How Key State Affects Use of a Customer Master Key in the AWS Key Management Service Developer Guide.
| Constructor and Description |
|---|
DecryptRequest() |
| Modifier and Type | Method and Description |
|---|---|
DecryptRequest |
addEncryptionContextEntry(String key,
String value)
The encryption context.
|
DecryptRequest |
clearEncryptionContextEntries()
Removes all the entries added into EncryptionContext.
|
boolean |
equals(Object obj) |
ByteBuffer |
getCiphertextBlob()
Ciphertext to be decrypted.
|
Map<String,String> |
getEncryptionContext()
The encryption context.
|
List<String> |
getGrantTokens()
A list of grant tokens.
|
int |
hashCode() |
void |
setCiphertextBlob(ByteBuffer ciphertextBlob)
Ciphertext to be decrypted.
|
void |
setEncryptionContext(Map<String,String> encryptionContext)
The encryption context.
|
void |
setGrantTokens(Collection<String> grantTokens)
A list of grant tokens.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DecryptRequest |
withCiphertextBlob(ByteBuffer ciphertextBlob)
Ciphertext to be decrypted.
|
DecryptRequest |
withEncryptionContext(Map<String,String> encryptionContext)
The encryption context.
|
DecryptRequest |
withGrantTokens(Collection<String> grantTokens)
A list of grant tokens.
|
DecryptRequest |
withGrantTokens(String... grantTokens)
A list of grant tokens.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic ByteBuffer getCiphertextBlob()
Ciphertext to be decrypted. The blob includes metadata.
Constraints:
Length: 1 - 6144
Ciphertext to be decrypted. The blob includes metadata.
public void setCiphertextBlob(ByteBuffer ciphertextBlob)
Ciphertext to be decrypted. The blob includes metadata.
Constraints:
Length: 1 - 6144
ciphertextBlob - Ciphertext to be decrypted. The blob includes metadata.
public DecryptRequest withCiphertextBlob(ByteBuffer ciphertextBlob)
Ciphertext to be decrypted. The blob includes metadata.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 6144
ciphertextBlob - Ciphertext to be decrypted. The blob includes metadata.
public Map<String,String> getEncryptionContext()
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
public void setEncryptionContext(Map<String,String> encryptionContext)
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
encryptionContext - The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
public DecryptRequest withEncryptionContext(Map<String,String> encryptionContext)
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
Returns a reference to this object so that method calls can be chained together.
encryptionContext - The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
public DecryptRequest addEncryptionContextEntry(String key, String value)
The encryption context. If this was specified in the Encrypt function, it must be specified here or the decryption operation will fail. For more information, see Encryption Context.
The method adds a new key-value pair into EncryptionContext parameter, and returns a reference to this object so that method calls can be chained together.
key - The key of the entry to be added into EncryptionContext.value - The corresponding value of the entry to be added into
EncryptionContext.public DecryptRequest clearEncryptionContextEntries()
Returns a reference to this object so that method calls can be chained together.
public List<String> getGrantTokens()
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
public void setGrantTokens(Collection<String> grantTokens)
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
grantTokens - A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
public DecryptRequest withGrantTokens(String... grantTokens)
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
Returns a reference to this object so that method calls can be chained together.
grantTokens - A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
public DecryptRequest withGrantTokens(Collection<String> grantTokens)
A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
Returns a reference to this object so that method calls can be chained together.
grantTokens - A list of grant tokens.
For more information, see Grant Tokens in the AWS Key Management Service Developer Guide.
public String toString()
toString in class ObjectObject.toString()Copyright © 2019. All rights reserved.