aws_sdk_paymentcryptographydata/client/encrypt_data.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`EncryptData`](crate::operation::encrypt_data::builders::EncryptDataFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`key_identifier(impl Into<String>)`](crate::operation::encrypt_data::builders::EncryptDataFluentBuilder::key_identifier) / [`set_key_identifier(Option<String>)`](crate::operation::encrypt_data::builders::EncryptDataFluentBuilder::set_key_identifier):<br>required: **true**<br><p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.</p> <p>When a WrappedKeyBlock is provided, this value will be the identifier to the key wrapping key. Otherwise, it is the key identifier used to perform the operation.</p><br>
7 /// - [`plain_text(impl Into<String>)`](crate::operation::encrypt_data::builders::EncryptDataFluentBuilder::plain_text) / [`set_plain_text(Option<String>)`](crate::operation::encrypt_data::builders::EncryptDataFluentBuilder::set_plain_text):<br>required: **true**<br><p>The plaintext to be encrypted.</p><note> <p>For encryption using asymmetric keys, plaintext data length is constrained by encryption key strength that you define in <code>KeyAlgorithm</code> and padding type that you define in <code>AsymmetricEncryptionAttributes</code>. For more information, see <a href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/encrypt-data.html">Encrypt data</a> in the <i>Amazon Web Services Payment Cryptography User Guide</i>.</p> </note><br>
8 /// - [`encryption_attributes(EncryptionDecryptionAttributes)`](crate::operation::encrypt_data::builders::EncryptDataFluentBuilder::encryption_attributes) / [`set_encryption_attributes(Option<EncryptionDecryptionAttributes>)`](crate::operation::encrypt_data::builders::EncryptDataFluentBuilder::set_encryption_attributes):<br>required: **true**<br><p>The encryption key type and attributes for plaintext encryption.</p><br>
9 /// - [`wrapped_key(WrappedKey)`](crate::operation::encrypt_data::builders::EncryptDataFluentBuilder::wrapped_key) / [`set_wrapped_key(Option<WrappedKey>)`](crate::operation::encrypt_data::builders::EncryptDataFluentBuilder::set_wrapped_key):<br>required: **false**<br><p>The WrappedKeyBlock containing the encryption key for plaintext encryption.</p><br>
10 /// - On success, responds with [`EncryptDataOutput`](crate::operation::encrypt_data::EncryptDataOutput) with field(s):
11 /// - [`key_arn(String)`](crate::operation::encrypt_data::EncryptDataOutput::key_arn): <p>The <code>keyARN</code> of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.</p>
12 /// - [`key_check_value(Option<String>)`](crate::operation::encrypt_data::EncryptDataOutput::key_check_value): <p>The key check value (KCV) of the encryption key. The KCV is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p> <p>Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.</p>
13 /// - [`cipher_text(String)`](crate::operation::encrypt_data::EncryptDataOutput::cipher_text): <p>The encrypted ciphertext.</p>
14 /// - On failure, responds with [`SdkError<EncryptDataError>`](crate::operation::encrypt_data::EncryptDataError)
15 pub fn encrypt_data(&self) -> crate::operation::encrypt_data::builders::EncryptDataFluentBuilder {
16 crate::operation::encrypt_data::builders::EncryptDataFluentBuilder::new(self.handle.clone())
17 }
18}