pub struct Client { /* private fields */ }Expand description
Client for Payment Cryptography Data Plane
Client for invoking operations on Payment Cryptography Data Plane. Each operation on Payment Cryptography Data Plane is a method on this
this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env() instead, which returns a ConfigLoader that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_paymentcryptographydata::Client::new(&config);Occasionally, SDKs may have additional service-specific values that can be set on the Config that
is absent from SdkConfig, or slightly different settings for a specific client may be desired.
The Builder struct implements From<&SdkConfig>, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_paymentcryptographydata::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();See the aws-config docs and Config for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the DecryptData operation has
a Client::decrypt_data, function which returns a builder for that operation.
The fluent builder ultimately has a send() function that returns an async future that
returns a result, as illustrated below:
let result = client.decrypt_data()
.key_identifier("example")
.send()
.await;The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn decrypt_data(&self) -> DecryptDataFluentBuilder
pub fn decrypt_data(&self) -> DecryptDataFluentBuilder
Constructs a fluent builder for the DecryptData operation.
- The fluent builder is configurable:
key_identifier(impl Into<String>)/set_key_identifier(Option<String>):
required: trueThe
keyARNof the encryption key that Amazon Web Services Payment Cryptography uses for ciphertext decryption.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.
cipher_text(impl Into<String>)/set_cipher_text(Option<String>):
required: trueThe ciphertext to decrypt.
decryption_attributes(EncryptionDecryptionAttributes)/set_decryption_attributes(Option<EncryptionDecryptionAttributes>):
required: trueThe encryption key type and attributes for ciphertext decryption.
wrapped_key(WrappedKey)/set_wrapped_key(Option<WrappedKey>):
required: falseThe WrappedKeyBlock containing the encryption key for ciphertext decryption.
- On success, responds with
DecryptDataOutputwith field(s):key_arn(String):The
keyARNof the encryption key that Amazon Web Services Payment Cryptography uses for ciphertext decryption.key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
plain_text(String):The decrypted plaintext data in hexBinary format.
- On failure, responds with
SdkError<DecryptDataError>
Source§impl Client
impl Client
Sourcepub fn encrypt_data(&self) -> EncryptDataFluentBuilder
pub fn encrypt_data(&self) -> EncryptDataFluentBuilder
Constructs a fluent builder for the EncryptData operation.
- The fluent builder is configurable:
key_identifier(impl Into<String>)/set_key_identifier(Option<String>):
required: trueThe
keyARNof the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.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.
plain_text(impl Into<String>)/set_plain_text(Option<String>):
required: trueThe plaintext to be encrypted.
For encryption using asymmetric keys, plaintext data length is constrained by encryption key strength that you define in
KeyAlgorithmand padding type that you define inAsymmetricEncryptionAttributes. For more information, see Encrypt data in the Amazon Web Services Payment Cryptography User Guide.encryption_attributes(EncryptionDecryptionAttributes)/set_encryption_attributes(Option<EncryptionDecryptionAttributes>):
required: trueThe encryption key type and attributes for plaintext encryption.
wrapped_key(WrappedKey)/set_wrapped_key(Option<WrappedKey>):
required: falseThe WrappedKeyBlock containing the encryption key for plaintext encryption.
- On success, responds with
EncryptDataOutputwith field(s):key_arn(String):The
keyARNof the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.key_check_value(Option<String>):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
cipher_text(String):The encrypted ciphertext.
- On failure, responds with
SdkError<EncryptDataError>
Source§impl Client
impl Client
Sourcepub fn generate_card_validation_data(
&self,
) -> GenerateCardValidationDataFluentBuilder
pub fn generate_card_validation_data( &self, ) -> GenerateCardValidationDataFluentBuilder
Constructs a fluent builder for the GenerateCardValidationData operation.
- The fluent builder is configurable:
key_identifier(impl Into<String>)/set_key_identifier(Option<String>):
required: trueThe
keyARNof the CVK encryption key that Amazon Web Services Payment Cryptography uses to generate card data.primary_account_number(impl Into<String>)/set_primary_account_number(Option<String>):
required: trueThe Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
generation_attributes(CardGenerationAttributes)/set_generation_attributes(Option<CardGenerationAttributes>):
required: trueThe algorithm for generating CVV or CSC values for the card within Amazon Web Services Payment Cryptography.
validation_data_length(i32)/set_validation_data_length(Option<i32>):
required: falseThe length of the CVV or CSC to be generated. The default value is 3.
- On success, responds with
GenerateCardValidationDataOutputwith field(s):key_arn(String):The
keyARNof the CVK encryption key that Amazon Web Services Payment Cryptography uses to generate CVV or CSC.key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
validation_data(String):The CVV or CSC value that Amazon Web Services Payment Cryptography generates for the card.
- On failure, responds with
SdkError<GenerateCardValidationDataError>
Source§impl Client
impl Client
Sourcepub fn generate_mac(&self) -> GenerateMacFluentBuilder
pub fn generate_mac(&self) -> GenerateMacFluentBuilder
Constructs a fluent builder for the GenerateMac operation.
- The fluent builder is configurable:
key_identifier(impl Into<String>)/set_key_identifier(Option<String>):
required: trueThe
keyARNof the MAC generation encryption key.message_data(impl Into<String>)/set_message_data(Option<String>):
required: trueThe data for which a MAC is under generation. This value must be hexBinary.
generation_attributes(MacAttributes)/set_generation_attributes(Option<MacAttributes>):
required: trueThe attributes and data values to use for MAC generation within Amazon Web Services Payment Cryptography.
mac_length(i32)/set_mac_length(Option<i32>):
required: falseThe length of a MAC under generation.
- On success, responds with
GenerateMacOutputwith field(s):key_arn(String):The
keyARNof the encryption key that Amazon Web Services Payment Cryptography uses for MAC generation.key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
mac(String):The MAC cryptogram generated within Amazon Web Services Payment Cryptography.
- On failure, responds with
SdkError<GenerateMacError>
Source§impl Client
impl Client
Sourcepub fn generate_mac_emv_pin_change(
&self,
) -> GenerateMacEmvPinChangeFluentBuilder
pub fn generate_mac_emv_pin_change( &self, ) -> GenerateMacEmvPinChangeFluentBuilder
Constructs a fluent builder for the GenerateMacEmvPinChange operation.
- The fluent builder is configurable:
new_pin_pek_identifier(impl Into<String>)/set_new_pin_pek_identifier(Option<String>):
required: trueThe
keyARNof the PEK protecting the incoming new encrypted PIN block.new_encrypted_pin_block(impl Into<String>)/set_new_encrypted_pin_block(Option<String>):
required: trueThe incoming new encrypted PIN block data for offline pin change on an EMV card.
pin_block_format(PinBlockFormatForEmvPinChange)/set_pin_block_format(Option<PinBlockFormatForEmvPinChange>):
required: trueThe PIN encoding format of the incoming new encrypted PIN block as specified in ISO 9564.
secure_messaging_integrity_key_identifier(impl Into<String>)/set_secure_messaging_integrity_key_identifier(Option<String>):
required: trueThe
keyARNof the issuer master key (IMK-SMI) used to authenticate the issuer script response.secure_messaging_confidentiality_key_identifier(impl Into<String>)/set_secure_messaging_confidentiality_key_identifier(Option<String>):
required: trueThe
keyARNof the issuer master key (IMK-SMC) used to protect the PIN block data in the issuer script response.message_data(impl Into<String>)/set_message_data(Option<String>):
required: trueThe message data is the APDU command from the card reader or terminal. The target encrypted PIN block, after translation to ISO2 format, is appended to this message data to generate an issuer script response.
derivation_method_attributes(DerivationMethodAttributes)/set_derivation_method_attributes(Option<DerivationMethodAttributes>):
required: trueThe attributes and data values to derive payment card specific confidentiality and integrity keys.
- On success, responds with
GenerateMacEmvPinChangeOutputwith field(s):new_pin_pek_arn(String):Returns the
keyArnof the PEK protecting the incoming new encrypted PIN block.secure_messaging_integrity_key_arn(String):Returns the
keyArnof the IMK-SMI used by the operation.secure_messaging_confidentiality_key_arn(String):Returns the
keyArnof the IMK-SMC used by the operation.mac(String):Returns the mac of the issuer script containing message data and appended target encrypted pin block in ISO2 format.
encrypted_pin_block(String):Returns the incoming new encrpted PIN block.
new_pin_pek_key_check_value(String):The key check value (KCV) of the PEK uprotecting the incoming new encrypted PIN block.
secure_messaging_integrity_key_check_value(String):The key check value (KCV) of the SMI issuer master key used by the operation.
secure_messaging_confidentiality_key_check_value(String):The key check value (KCV) of the SMC issuer master key used by the operation.
visa_amex_derivation_outputs(Option<VisaAmexDerivationOutputs>):The attribute values used for Amex and Visa derivation methods.
- On failure, responds with
SdkError<GenerateMacEmvPinChangeError>
Source§impl Client
impl Client
Sourcepub fn generate_pin_data(&self) -> GeneratePinDataFluentBuilder
pub fn generate_pin_data(&self) -> GeneratePinDataFluentBuilder
Constructs a fluent builder for the GeneratePinData operation.
- The fluent builder is configurable:
generation_key_identifier(impl Into<String>)/set_generation_key_identifier(Option<String>):
required: trueThe
keyARNof the PEK that Amazon Web Services Payment Cryptography uses for pin data generation.encryption_key_identifier(impl Into<String>)/set_encryption_key_identifier(Option<String>):
required: trueThe
keyARNof the PEK that Amazon Web Services Payment Cryptography uses to encrypt the PIN Block. For ECDH, it is thekeyARNof the asymmetric ECC key.generation_attributes(PinGenerationAttributes)/set_generation_attributes(Option<PinGenerationAttributes>):
required: trueThe attributes and values to use for PIN, PVV, or PIN Offset generation.
pin_data_length(i32)/set_pin_data_length(Option<i32>):
required: falseThe length of PIN under generation.
primary_account_number(impl Into<String>)/set_primary_account_number(Option<String>):
required: trueThe Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
pin_block_format(PinBlockFormatForPinData)/set_pin_block_format(Option<PinBlockFormatForPinData>):
required: trueThe PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports
ISO_Format_0andISO_Format_3.The
ISO_Format_0PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.The
ISO_Format_3PIN block format is the same asISO_Format_0except that the fill digits are random values from 10 to 15.encryption_wrapped_key(WrappedKey)/set_encryption_wrapped_key(Option<WrappedKey>):
required: falseParameter information of a WrappedKeyBlock for encryption key exchange.
- On success, responds with
GeneratePinDataOutputwith field(s):generation_key_arn(String):The
keyARNof the pin data generation key that Amazon Web Services Payment Cryptography uses for PIN, PVV or PIN Offset generation.generation_key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
encryption_key_arn(String):The
keyARNof the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation. For ECDH, it is thekeyARNof the asymmetric ECC key.encryption_key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
encrypted_pin_block(String):The PIN block encrypted under PEK from Amazon Web Services Payment Cryptography. The encrypted PIN block is a composite of PAN (Primary Account Number) and PIN (Personal Identification Number), generated in accordance with ISO 9564 standard.
pin_data(Option<PinData>):The attributes and values Amazon Web Services Payment Cryptography uses for pin data generation.
- On failure, responds with
SdkError<GeneratePinDataError>
Source§impl Client
impl Client
Sourcepub fn re_encrypt_data(&self) -> ReEncryptDataFluentBuilder
pub fn re_encrypt_data(&self) -> ReEncryptDataFluentBuilder
Constructs a fluent builder for the ReEncryptData operation.
- The fluent builder is configurable:
incoming_key_identifier(impl Into<String>)/set_incoming_key_identifier(Option<String>):
required: trueThe
keyARNof the encryption key of incoming ciphertext data.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.
outgoing_key_identifier(impl Into<String>)/set_outgoing_key_identifier(Option<String>):
required: trueThe
keyARNof the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.cipher_text(impl Into<String>)/set_cipher_text(Option<String>):
required: trueCiphertext to be encrypted. The minimum allowed length is 16 bytes and maximum allowed length is 4096 bytes.
incoming_encryption_attributes(ReEncryptionAttributes)/set_incoming_encryption_attributes(Option<ReEncryptionAttributes>):
required: trueThe attributes and values for incoming ciphertext.
outgoing_encryption_attributes(ReEncryptionAttributes)/set_outgoing_encryption_attributes(Option<ReEncryptionAttributes>):
required: trueThe attributes and values for outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.
incoming_wrapped_key(WrappedKey)/set_incoming_wrapped_key(Option<WrappedKey>):
required: falseThe WrappedKeyBlock containing the encryption key of incoming ciphertext data.
outgoing_wrapped_key(WrappedKey)/set_outgoing_wrapped_key(Option<WrappedKey>):
required: falseThe WrappedKeyBlock containing the encryption key of outgoing ciphertext data after encryption by Amazon Web Services Payment Cryptography.
- On success, responds with
ReEncryptDataOutputwith field(s):key_arn(String):The keyARN (Amazon Resource Name) of the encryption key that Amazon Web Services Payment Cryptography uses for plaintext encryption.
key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
cipher_text(String):The encrypted ciphertext.
- On failure, responds with
SdkError<ReEncryptDataError>
Source§impl Client
impl Client
Sourcepub fn translate_pin_data(&self) -> TranslatePinDataFluentBuilder
pub fn translate_pin_data(&self) -> TranslatePinDataFluentBuilder
Constructs a fluent builder for the TranslatePinData operation.
- The fluent builder is configurable:
incoming_key_identifier(impl Into<String>)/set_incoming_key_identifier(Option<String>):
required: trueThe
keyARNof the encryption key under which incoming PIN block data is encrypted. This key type can be PEK or BDK.For dynamic keys, it is the
keyARNof KEK of the TR-31 wrapped PEK. For ECDH, it is thekeyARNof the asymmetric ECC key.outgoing_key_identifier(impl Into<String>)/set_outgoing_key_identifier(Option<String>):
required: trueThe
keyARNof the encryption key for encrypting outgoing PIN block data. This key type can be PEK or BDK.For ECDH, it is the
keyARNof the asymmetric ECC key.incoming_translation_attributes(TranslationIsoFormats)/set_incoming_translation_attributes(Option<TranslationIsoFormats>):
required: trueThe format of the incoming PIN block data for translation within Amazon Web Services Payment Cryptography.
outgoing_translation_attributes(TranslationIsoFormats)/set_outgoing_translation_attributes(Option<TranslationIsoFormats>):
required: trueThe format of the outgoing PIN block data after translation by Amazon Web Services Payment Cryptography.
encrypted_pin_block(impl Into<String>)/set_encrypted_pin_block(Option<String>):
required: trueThe encrypted PIN block data that Amazon Web Services Payment Cryptography translates.
incoming_dukpt_attributes(DukptDerivationAttributes)/set_incoming_dukpt_attributes(Option<DukptDerivationAttributes>):
required: falseThe attributes and values to use for incoming DUKPT encryption key for PIN block translation.
outgoing_dukpt_attributes(DukptDerivationAttributes)/set_outgoing_dukpt_attributes(Option<DukptDerivationAttributes>):
required: falseThe attributes and values to use for outgoing DUKPT encryption key after PIN block translation.
incoming_wrapped_key(WrappedKey)/set_incoming_wrapped_key(Option<WrappedKey>):
required: falseThe WrappedKeyBlock containing the encryption key under which incoming PIN block data is encrypted.
outgoing_wrapped_key(WrappedKey)/set_outgoing_wrapped_key(Option<WrappedKey>):
required: falseThe WrappedKeyBlock containing the encryption key for encrypting outgoing PIN block data.
- On success, responds with
TranslatePinDataOutputwith field(s):pin_block(String):The outgoing encrypted PIN block data after translation.
key_arn(String):The
keyARNof the encryption key that Amazon Web Services Payment Cryptography uses to encrypt outgoing PIN block data after translation.key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
- On failure, responds with
SdkError<TranslatePinDataError>
Source§impl Client
impl Client
Sourcepub fn verify_auth_request_cryptogram(
&self,
) -> VerifyAuthRequestCryptogramFluentBuilder
pub fn verify_auth_request_cryptogram( &self, ) -> VerifyAuthRequestCryptogramFluentBuilder
Constructs a fluent builder for the VerifyAuthRequestCryptogram operation.
- The fluent builder is configurable:
key_identifier(impl Into<String>)/set_key_identifier(Option<String>):
required: trueThe
keyARNof the major encryption key that Amazon Web Services Payment Cryptography uses for ARQC verification.transaction_data(impl Into<String>)/set_transaction_data(Option<String>):
required: trueThe transaction data that Amazon Web Services Payment Cryptography uses for ARQC verification. The same transaction is used for ARQC generation outside of Amazon Web Services Payment Cryptography.
auth_request_cryptogram(impl Into<String>)/set_auth_request_cryptogram(Option<String>):
required: trueThe auth request cryptogram imported into Amazon Web Services Payment Cryptography for ARQC verification using a major encryption key and transaction data.
major_key_derivation_mode(MajorKeyDerivationMode)/set_major_key_derivation_mode(Option<MajorKeyDerivationMode>):
required: trueThe method to use when deriving the major encryption key for ARQC verification within Amazon Web Services Payment Cryptography. The same key derivation mode was used for ARQC generation outside of Amazon Web Services Payment Cryptography.
session_key_derivation_attributes(SessionKeyDerivation)/set_session_key_derivation_attributes(Option<SessionKeyDerivation>):
required: trueThe attributes and values to use for deriving a session key for ARQC verification within Amazon Web Services Payment Cryptography. The same attributes were used for ARQC generation outside of Amazon Web Services Payment Cryptography.
auth_response_attributes(CryptogramAuthResponse)/set_auth_response_attributes(Option<CryptogramAuthResponse>):
required: falseThe attributes and values for auth request cryptogram verification. These parameters are required in case using ARPC Method 1 or Method 2 for ARQC verification.
- On success, responds with
VerifyAuthRequestCryptogramOutputwith field(s):key_arn(String):The
keyARNof the major encryption key that Amazon Web Services Payment Cryptography uses for ARQC verification.key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
auth_response_value(Option<String>):The result for ARQC verification or ARPC generation within Amazon Web Services Payment Cryptography.
- On failure, responds with
SdkError<VerifyAuthRequestCryptogramError>
Source§impl Client
impl Client
Sourcepub fn verify_card_validation_data(
&self,
) -> VerifyCardValidationDataFluentBuilder
pub fn verify_card_validation_data( &self, ) -> VerifyCardValidationDataFluentBuilder
Constructs a fluent builder for the VerifyCardValidationData operation.
- The fluent builder is configurable:
key_identifier(impl Into<String>)/set_key_identifier(Option<String>):
required: trueThe
keyARNof the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify card data.primary_account_number(impl Into<String>)/set_primary_account_number(Option<String>):
required: trueThe Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
verification_attributes(CardVerificationAttributes)/set_verification_attributes(Option<CardVerificationAttributes>):
required: trueThe algorithm to use for verification of card data within Amazon Web Services Payment Cryptography.
validation_data(impl Into<String>)/set_validation_data(Option<String>):
required: trueThe CVV or CSC value for use for card data verification within Amazon Web Services Payment Cryptography.
- On success, responds with
VerifyCardValidationDataOutputwith field(s):key_arn(String):The
keyARNof the CVK encryption key that Amazon Web Services Payment Cryptography uses to verify CVV or CSC.key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
- On failure, responds with
SdkError<VerifyCardValidationDataError>
Source§impl Client
impl Client
Sourcepub fn verify_mac(&self) -> VerifyMacFluentBuilder
pub fn verify_mac(&self) -> VerifyMacFluentBuilder
Constructs a fluent builder for the VerifyMac operation.
- The fluent builder is configurable:
key_identifier(impl Into<String>)/set_key_identifier(Option<String>):
required: trueThe
keyARNof the encryption key that Amazon Web Services Payment Cryptography uses to verify MAC data.message_data(impl Into<String>)/set_message_data(Option<String>):
required: trueThe data on for which MAC is under verification. This value must be hexBinary.
mac(impl Into<String>)/set_mac(Option<String>):
required: trueThe MAC being verified.
verification_attributes(MacAttributes)/set_verification_attributes(Option<MacAttributes>):
required: trueThe attributes and data values to use for MAC verification within Amazon Web Services Payment Cryptography.
mac_length(i32)/set_mac_length(Option<i32>):
required: falseThe length of the MAC.
- On success, responds with
VerifyMacOutputwith field(s):key_arn(String):The
keyARNof the encryption key that Amazon Web Services Payment Cryptography uses for MAC verification.key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
- On failure, responds with
SdkError<VerifyMacError>
Source§impl Client
impl Client
Sourcepub fn verify_pin_data(&self) -> VerifyPinDataFluentBuilder
pub fn verify_pin_data(&self) -> VerifyPinDataFluentBuilder
Constructs a fluent builder for the VerifyPinData operation.
- The fluent builder is configurable:
verification_key_identifier(impl Into<String>)/set_verification_key_identifier(Option<String>):
required: trueThe
keyARNof the PIN verification key.encryption_key_identifier(impl Into<String>)/set_encryption_key_identifier(Option<String>):
required: trueThe
keyARNof the encryption key under which the PIN block data is encrypted. This key type can be PEK or BDK.verification_attributes(PinVerificationAttributes)/set_verification_attributes(Option<PinVerificationAttributes>):
required: trueThe attributes and values for PIN data verification.
encrypted_pin_block(impl Into<String>)/set_encrypted_pin_block(Option<String>):
required: trueThe encrypted PIN block data that Amazon Web Services Payment Cryptography verifies.
primary_account_number(impl Into<String>)/set_primary_account_number(Option<String>):
required: trueThe Primary Account Number (PAN), a unique identifier for a payment credit or debit card that associates the card with a specific account holder.
pin_block_format(PinBlockFormatForPinData)/set_pin_block_format(Option<PinBlockFormatForPinData>):
required: trueThe PIN encoding format for pin data generation as specified in ISO 9564. Amazon Web Services Payment Cryptography supports
ISO_Format_0andISO_Format_3.The
ISO_Format_0PIN block format is equivalent to the ANSI X9.8, VISA-1, and ECI-1 PIN block formats. It is similar to a VISA-4 PIN block format. It supports a PIN from 4 to 12 digits in length.The
ISO_Format_3PIN block format is the same asISO_Format_0except that the fill digits are random values from 10 to 15.pin_data_length(i32)/set_pin_data_length(Option<i32>):
required: falseThe length of PIN being verified.
dukpt_attributes(DukptAttributes)/set_dukpt_attributes(Option<DukptAttributes>):
required: falseThe attributes and values for the DUKPT encrypted PIN block data.
encryption_wrapped_key(WrappedKey)/set_encryption_wrapped_key(Option<WrappedKey>):
required: falseParameter information of a WrappedKeyBlock for encryption key exchange.
- On success, responds with
VerifyPinDataOutputwith field(s):verification_key_arn(String):The
keyARNof the PIN encryption key that Amazon Web Services Payment Cryptography uses for PIN or PIN Offset verification.verification_key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
encryption_key_arn(String):The
keyARNof the PEK that Amazon Web Services Payment Cryptography uses for encrypted pin block generation.encryption_key_check_value(String):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.
Amazon Web Services Payment Cryptography computes the KCV according to the CMAC specification.
- On failure, responds with
SdkError<VerifyPinDataError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_implconfigured. - Identity caching is enabled without a
sleep_implandtime_sourceconfigured. - No
behavior_versionis provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it. - This method will panic if no
BehaviorVersionis provided. If you experience this panic, setbehavior_versionon the Config or enable thebehavior-version-latestCargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightBlack.
§Example
println!("{}", value.bright_black());Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightGreen.
§Example
println!("{}", value.bright_green());Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightYellow.
§Example
println!("{}", value.bright_yellow());Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightMagenta.
§Example
println!("{}", value.bright_magenta());Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self with the
fg()
set to
Color::BrightWhite.
§Example
println!("{}", value.bright_white());Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightBlack.
§Example
println!("{}", value.on_bright_black());Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightGreen.
§Example
println!("{}", value.on_bright_green());Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightYellow.
§Example
println!("{}", value.on_bright_yellow());Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightBlue.
§Example
println!("{}", value.on_bright_blue());Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightMagenta.
§Example
println!("{}", value.on_bright_magenta());Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightCyan.
§Example
println!("{}", value.on_bright_cyan());Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self with the
bg()
set to
Color::BrightWhite.
§Example
println!("{}", value.on_bright_white());Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::Underline.
§Example
println!("{}", value.underline());Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self with the
attr()
set to
Attribute::RapidBlink.
§Example
println!("{}", value.rapid_blink());Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);