AWS SDK for C++  1.9.108
AWS SDK for C++
Public Member Functions | List of all members
Aws::KMS::Model::EncryptRequest Class Reference

#include <EncryptRequest.h>

+ Inheritance diagram for Aws::KMS::Model::EncryptRequest:

Public Member Functions

 EncryptRequest ()
 
virtual const char * GetServiceRequestName () const override
 
Aws::String SerializePayload () const override
 
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders () const override
 
const Aws::StringGetKeyId () const
 
bool KeyIdHasBeenSet () const
 
void SetKeyId (const Aws::String &value)
 
void SetKeyId (Aws::String &&value)
 
void SetKeyId (const char *value)
 
EncryptRequestWithKeyId (const Aws::String &value)
 
EncryptRequestWithKeyId (Aws::String &&value)
 
EncryptRequestWithKeyId (const char *value)
 
const Aws::Utils::CryptoBufferGetPlaintext () const
 
bool PlaintextHasBeenSet () const
 
void SetPlaintext (const Aws::Utils::CryptoBuffer &value)
 
void SetPlaintext (Aws::Utils::CryptoBuffer &&value)
 
EncryptRequestWithPlaintext (const Aws::Utils::CryptoBuffer &value)
 
EncryptRequestWithPlaintext (Aws::Utils::CryptoBuffer &&value)
 
const Aws::Map< Aws::String, Aws::String > & GetEncryptionContext () const
 
bool EncryptionContextHasBeenSet () const
 
void SetEncryptionContext (const Aws::Map< Aws::String, Aws::String > &value)
 
void SetEncryptionContext (Aws::Map< Aws::String, Aws::String > &&value)
 
EncryptRequestWithEncryptionContext (const Aws::Map< Aws::String, Aws::String > &value)
 
EncryptRequestWithEncryptionContext (Aws::Map< Aws::String, Aws::String > &&value)
 
EncryptRequestAddEncryptionContext (const Aws::String &key, const Aws::String &value)
 
EncryptRequestAddEncryptionContext (Aws::String &&key, const Aws::String &value)
 
EncryptRequestAddEncryptionContext (const Aws::String &key, Aws::String &&value)
 
EncryptRequestAddEncryptionContext (Aws::String &&key, Aws::String &&value)
 
EncryptRequestAddEncryptionContext (const char *key, Aws::String &&value)
 
EncryptRequestAddEncryptionContext (Aws::String &&key, const char *value)
 
EncryptRequestAddEncryptionContext (const char *key, const char *value)
 
const Aws::Vector< Aws::String > & GetGrantTokens () const
 
bool GrantTokensHasBeenSet () const
 
void SetGrantTokens (const Aws::Vector< Aws::String > &value)
 
void SetGrantTokens (Aws::Vector< Aws::String > &&value)
 
EncryptRequestWithGrantTokens (const Aws::Vector< Aws::String > &value)
 
EncryptRequestWithGrantTokens (Aws::Vector< Aws::String > &&value)
 
EncryptRequestAddGrantTokens (const Aws::String &value)
 
EncryptRequestAddGrantTokens (Aws::String &&value)
 
EncryptRequestAddGrantTokens (const char *value)
 
const EncryptionAlgorithmSpecGetEncryptionAlgorithm () const
 
bool EncryptionAlgorithmHasBeenSet () const
 
void SetEncryptionAlgorithm (const EncryptionAlgorithmSpec &value)
 
void SetEncryptionAlgorithm (EncryptionAlgorithmSpec &&value)
 
EncryptRequestWithEncryptionAlgorithm (const EncryptionAlgorithmSpec &value)
 
EncryptRequestWithEncryptionAlgorithm (EncryptionAlgorithmSpec &&value)
 
- Public Member Functions inherited from Aws::KMS::KMSRequest
virtual ~KMSRequest ()
 
void AddParametersToRequest (Aws::Http::HttpRequest &httpRequest) const
 
Aws::Http::HeaderValueCollection GetHeaders () const override
 
- Public Member Functions inherited from Aws::AmazonSerializableWebServiceRequest
 AmazonSerializableWebServiceRequest ()
 
virtual ~AmazonSerializableWebServiceRequest ()
 
std::shared_ptr< Aws::IOStreamGetBody () const override
 
- Public Member Functions inherited from Aws::AmazonWebServiceRequest
 AmazonWebServiceRequest ()
 
virtual ~AmazonWebServiceRequest ()=default
 
virtual void AddQueryStringParameters (Aws::Http::URI &uri) const
 
virtual void PutToPresignedUrl (Aws::Http::URI &uri) const
 
virtual bool IsStreaming () const
 
virtual bool IsEventStreamRequest () const
 
virtual bool SignBody () const
 
virtual bool IsChunked () const
 
virtual void SetRequestSignedHandler (const RequestSignedHandler &handler)
 
virtual const RequestSignedHandlerGetRequestSignedHandler () const
 
const Aws::IOStreamFactoryGetResponseStreamFactory () const
 
void SetResponseStreamFactory (const Aws::IOStreamFactory &factory)
 
virtual void SetDataReceivedEventHandler (const Aws::Http::DataReceivedEventHandler &dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (const Aws::Http::DataSentEventHandler &dataSentEventHandler)
 
virtual void SetContinueRequestHandler (const Aws::Http::ContinueRequestHandler &continueRequestHandler)
 
virtual void SetDataReceivedEventHandler (Aws::Http::DataReceivedEventHandler &&dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (Aws::Http::DataSentEventHandler &&dataSentEventHandler)
 
virtual void SetContinueRequestHandler (Aws::Http::ContinueRequestHandler &&continueRequestHandler)
 
virtual void SetRequestRetryHandler (const RequestRetryHandler &handler)
 
virtual void SetRequestRetryHandler (RequestRetryHandler &&handler)
 
virtual const Aws::Http::DataReceivedEventHandlerGetDataReceivedEventHandler () const
 
virtual const Aws::Http::DataSentEventHandlerGetDataSentEventHandler () const
 
virtual const Aws::Http::ContinueRequestHandlerGetContinueRequestHandler () const
 
virtual const RequestRetryHandlerGetRequestRetryHandler () const
 
virtual bool ShouldComputeContentMd5 () const
 

Additional Inherited Members

- Protected Member Functions inherited from Aws::AmazonWebServiceRequest
virtual void DumpBodyToUrl (Aws::Http::URI &uri) const
 

Detailed Description

Definition at line 25 of file EncryptRequest.h.

Constructor & Destructor Documentation

◆ EncryptRequest()

Aws::KMS::Model::EncryptRequest::EncryptRequest ( )

Member Function Documentation

◆ AddEncryptionContext() [1/7]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddEncryptionContext ( Aws::String &&  key,
Aws::String &&  value 
)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 369 of file EncryptRequest.h.

◆ AddEncryptionContext() [2/7]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddEncryptionContext ( Aws::String &&  key,
const Aws::String value 
)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 335 of file EncryptRequest.h.

◆ AddEncryptionContext() [3/7]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddEncryptionContext ( Aws::String &&  key,
const char *  value 
)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 403 of file EncryptRequest.h.

◆ AddEncryptionContext() [4/7]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddEncryptionContext ( const Aws::String key,
Aws::String &&  value 
)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 352 of file EncryptRequest.h.

◆ AddEncryptionContext() [5/7]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddEncryptionContext ( const Aws::String key,
const Aws::String value 
)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 318 of file EncryptRequest.h.

◆ AddEncryptionContext() [6/7]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddEncryptionContext ( const char *  key,
Aws::String &&  value 
)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 386 of file EncryptRequest.h.

◆ AddEncryptionContext() [7/7]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddEncryptionContext ( const char *  key,
const char *  value 
)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 420 of file EncryptRequest.h.

◆ AddGrantTokens() [1/3]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddGrantTokens ( Aws::String &&  value)
inline

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

Definition at line 509 of file EncryptRequest.h.

◆ AddGrantTokens() [2/3]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddGrantTokens ( const Aws::String value)
inline

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

Definition at line 498 of file EncryptRequest.h.

◆ AddGrantTokens() [3/3]

EncryptRequest& Aws::KMS::Model::EncryptRequest::AddGrantTokens ( const char *  value)
inline

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

Definition at line 520 of file EncryptRequest.h.

◆ EncryptionAlgorithmHasBeenSet()

bool Aws::KMS::Model::EncryptRequest::EncryptionAlgorithmHasBeenSet ( ) const
inline

Specifies the encryption algorithm that KMS will use to encrypt the plaintext message. The algorithm must be compatible with the KMS key that you specify.

This parameter is required only for asymmetric KMS keys. The default value, SYMMETRIC_DEFAULT, is the algorithm used for symmetric KMS keys. If you are using an asymmetric KMS key, we recommend RSAES_OAEP_SHA_256.

Definition at line 539 of file EncryptRequest.h.

◆ EncryptionContextHasBeenSet()

bool Aws::KMS::Model::EncryptRequest::EncryptionContextHasBeenSet ( ) const
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 233 of file EncryptRequest.h.

◆ GetEncryptionAlgorithm()

const EncryptionAlgorithmSpec& Aws::KMS::Model::EncryptRequest::GetEncryptionAlgorithm ( ) const
inline

Specifies the encryption algorithm that KMS will use to encrypt the plaintext message. The algorithm must be compatible with the KMS key that you specify.

This parameter is required only for asymmetric KMS keys. The default value, SYMMETRIC_DEFAULT, is the algorithm used for symmetric KMS keys. If you are using an asymmetric KMS key, we recommend RSAES_OAEP_SHA_256.

Definition at line 530 of file EncryptRequest.h.

◆ GetEncryptionContext()

const Aws::Map<Aws::String, Aws::String>& Aws::KMS::Model::EncryptRequest::GetEncryptionContext ( ) const
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 216 of file EncryptRequest.h.

◆ GetGrantTokens()

const Aws::Vector<Aws::String>& Aws::KMS::Model::EncryptRequest::GetGrantTokens ( ) const
inline

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

Definition at line 432 of file EncryptRequest.h.

◆ GetKeyId()

const Aws::String& Aws::KMS::Model::EncryptRequest::GetKeyId ( ) const
inline

Identifies the KMS key to use in the encryption operation.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

Definition at line 55 of file EncryptRequest.h.

◆ GetPlaintext()

const Aws::Utils::CryptoBuffer& Aws::KMS::Model::EncryptRequest::GetPlaintext ( ) const
inline

Data to be encrypted.

Definition at line 173 of file EncryptRequest.h.

◆ GetRequestSpecificHeaders()

Aws::Http::HeaderValueCollection Aws::KMS::Model::EncryptRequest::GetRequestSpecificHeaders ( ) const
overridevirtual

Reimplemented from Aws::KMS::KMSRequest.

◆ GetServiceRequestName()

virtual const char* Aws::KMS::Model::EncryptRequest::GetServiceRequestName ( ) const
inlineoverridevirtual

Implements Aws::AmazonWebServiceRequest.

Definition at line 34 of file EncryptRequest.h.

◆ GrantTokensHasBeenSet()

bool Aws::KMS::Model::EncryptRequest::GrantTokensHasBeenSet ( ) const
inline

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

Definition at line 443 of file EncryptRequest.h.

◆ KeyIdHasBeenSet()

bool Aws::KMS::Model::EncryptRequest::KeyIdHasBeenSet ( ) const
inline

Identifies the KMS key to use in the encryption operation.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

Definition at line 71 of file EncryptRequest.h.

◆ PlaintextHasBeenSet()

bool Aws::KMS::Model::EncryptRequest::PlaintextHasBeenSet ( ) const
inline

Data to be encrypted.

Definition at line 178 of file EncryptRequest.h.

◆ SerializePayload()

Aws::String Aws::KMS::Model::EncryptRequest::SerializePayload ( ) const
overridevirtual

Convert payload into String.

Implements Aws::AmazonSerializableWebServiceRequest.

◆ SetEncryptionAlgorithm() [1/2]

void Aws::KMS::Model::EncryptRequest::SetEncryptionAlgorithm ( const EncryptionAlgorithmSpec value)
inline

Specifies the encryption algorithm that KMS will use to encrypt the plaintext message. The algorithm must be compatible with the KMS key that you specify.

This parameter is required only for asymmetric KMS keys. The default value, SYMMETRIC_DEFAULT, is the algorithm used for symmetric KMS keys. If you are using an asymmetric KMS key, we recommend RSAES_OAEP_SHA_256.

Definition at line 548 of file EncryptRequest.h.

◆ SetEncryptionAlgorithm() [2/2]

void Aws::KMS::Model::EncryptRequest::SetEncryptionAlgorithm ( EncryptionAlgorithmSpec &&  value)
inline

Specifies the encryption algorithm that KMS will use to encrypt the plaintext message. The algorithm must be compatible with the KMS key that you specify.

This parameter is required only for asymmetric KMS keys. The default value, SYMMETRIC_DEFAULT, is the algorithm used for symmetric KMS keys. If you are using an asymmetric KMS key, we recommend RSAES_OAEP_SHA_256.

Definition at line 557 of file EncryptRequest.h.

◆ SetEncryptionContext() [1/2]

void Aws::KMS::Model::EncryptRequest::SetEncryptionContext ( Aws::Map< Aws::String, Aws::String > &&  value)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 267 of file EncryptRequest.h.

◆ SetEncryptionContext() [2/2]

void Aws::KMS::Model::EncryptRequest::SetEncryptionContext ( const Aws::Map< Aws::String, Aws::String > &  value)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 250 of file EncryptRequest.h.

◆ SetGrantTokens() [1/2]

void Aws::KMS::Model::EncryptRequest::SetGrantTokens ( Aws::Vector< Aws::String > &&  value)
inline

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

Definition at line 465 of file EncryptRequest.h.

◆ SetGrantTokens() [2/2]

void Aws::KMS::Model::EncryptRequest::SetGrantTokens ( const Aws::Vector< Aws::String > &  value)
inline

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

Definition at line 454 of file EncryptRequest.h.

◆ SetKeyId() [1/3]

void Aws::KMS::Model::EncryptRequest::SetKeyId ( Aws::String &&  value)
inline

Identifies the KMS key to use in the encryption operation.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

Definition at line 103 of file EncryptRequest.h.

◆ SetKeyId() [2/3]

void Aws::KMS::Model::EncryptRequest::SetKeyId ( const Aws::String value)
inline

Identifies the KMS key to use in the encryption operation.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

Definition at line 87 of file EncryptRequest.h.

◆ SetKeyId() [3/3]

void Aws::KMS::Model::EncryptRequest::SetKeyId ( const char *  value)
inline

Identifies the KMS key to use in the encryption operation.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

Definition at line 119 of file EncryptRequest.h.

◆ SetPlaintext() [1/2]

void Aws::KMS::Model::EncryptRequest::SetPlaintext ( Aws::Utils::CryptoBuffer &&  value)
inline

Data to be encrypted.

Definition at line 188 of file EncryptRequest.h.

◆ SetPlaintext() [2/2]

void Aws::KMS::Model::EncryptRequest::SetPlaintext ( const Aws::Utils::CryptoBuffer value)
inline

Data to be encrypted.

Definition at line 183 of file EncryptRequest.h.

◆ WithEncryptionAlgorithm() [1/2]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithEncryptionAlgorithm ( const EncryptionAlgorithmSpec value)
inline

Specifies the encryption algorithm that KMS will use to encrypt the plaintext message. The algorithm must be compatible with the KMS key that you specify.

This parameter is required only for asymmetric KMS keys. The default value, SYMMETRIC_DEFAULT, is the algorithm used for symmetric KMS keys. If you are using an asymmetric KMS key, we recommend RSAES_OAEP_SHA_256.

Definition at line 566 of file EncryptRequest.h.

◆ WithEncryptionAlgorithm() [2/2]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithEncryptionAlgorithm ( EncryptionAlgorithmSpec &&  value)
inline

Specifies the encryption algorithm that KMS will use to encrypt the plaintext message. The algorithm must be compatible with the KMS key that you specify.

This parameter is required only for asymmetric KMS keys. The default value, SYMMETRIC_DEFAULT, is the algorithm used for symmetric KMS keys. If you are using an asymmetric KMS key, we recommend RSAES_OAEP_SHA_256.

Definition at line 575 of file EncryptRequest.h.

◆ WithEncryptionContext() [1/2]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithEncryptionContext ( Aws::Map< Aws::String, Aws::String > &&  value)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 301 of file EncryptRequest.h.

◆ WithEncryptionContext() [2/2]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithEncryptionContext ( const Aws::Map< Aws::String, Aws::String > &  value)
inline

Specifies the encryption context that will be used to encrypt the data. An encryption context is valid only for cryptographic operations with a symmetric KMS key. The standard asymmetric encryption algorithms that KMS uses do not support an encryption context.

An encryption context is a collection of non-secret key-value pairs that represents additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is optional when encrypting with a symmetric KMS key, but it is highly recommended.

For more information, see Encryption Context in the Key Management Service Developer Guide.

Definition at line 284 of file EncryptRequest.h.

◆ WithGrantTokens() [1/2]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithGrantTokens ( Aws::Vector< Aws::String > &&  value)
inline

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

Definition at line 487 of file EncryptRequest.h.

◆ WithGrantTokens() [2/2]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithGrantTokens ( const Aws::Vector< Aws::String > &  value)
inline

A list of grant tokens.

Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.

Definition at line 476 of file EncryptRequest.h.

◆ WithKeyId() [1/3]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithKeyId ( Aws::String &&  value)
inline

Identifies the KMS key to use in the encryption operation.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

Definition at line 151 of file EncryptRequest.h.

◆ WithKeyId() [2/3]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithKeyId ( const Aws::String value)
inline

Identifies the KMS key to use in the encryption operation.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

Definition at line 135 of file EncryptRequest.h.

◆ WithKeyId() [3/3]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithKeyId ( const char *  value)
inline

Identifies the KMS key to use in the encryption operation.

To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When using an alias name, prefix it with "alias/". To specify a KMS key in a different Amazon Web Services account, you must use the key ARN or alias ARN.

For example:

  • Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab

  • Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab

  • Alias name: alias/ExampleAlias

  • Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias

To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name and alias ARN, use ListAliases.

Definition at line 167 of file EncryptRequest.h.

◆ WithPlaintext() [1/2]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithPlaintext ( Aws::Utils::CryptoBuffer &&  value)
inline

Data to be encrypted.

Definition at line 198 of file EncryptRequest.h.

◆ WithPlaintext() [2/2]

EncryptRequest& Aws::KMS::Model::EncryptRequest::WithPlaintext ( const Aws::Utils::CryptoBuffer value)
inline

Data to be encrypted.

Definition at line 193 of file EncryptRequest.h.


The documentation for this class was generated from the following file: