Class: AWSCDK::PaymentCryptography::CfnKey::KeyAttributesProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
payment_cryptography/cfn_key.rb

Overview

The role of the key, the algorithm it supports, and the cryptographic operations allowed with the key.

This data is immutable after the key is created.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key_algorithm:, key_class:, key_modes_of_use:, key_usage:) ⇒ KeyAttributesProperty

Returns a new instance of KeyAttributesProperty.

Parameters:

  • key_algorithm (String)

    The key algorithm to be use during creation of an AWS Payment Cryptography key.

  • key_class (String)

    The type of AWS Payment Cryptography key to create, which determines the classification of the cryptographic method and whether AWS Payment Cryptography key contains a symmetric key or an asymmetric key pair.

  • key_modes_of_use (AWSCDK::IResolvable, AWSCDK::PaymentCryptography::CfnKey::KeyModesOfUseProperty)

    The list of cryptographic operations that you can perform using the key.

  • key_usage (String)

    The cryptographic usage of an AWS Payment Cryptography key as defined in section A.5.2 of the TR-31 spec.



647
648
649
650
651
652
653
654
655
656
# File 'payment_cryptography/cfn_key.rb', line 647

def initialize(key_algorithm:, key_class:, key_modes_of_use:, key_usage:)
  @key_algorithm = key_algorithm
  Jsii::Type.check_type(@key_algorithm, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyAlgorithm")
  @key_class = key_class
  Jsii::Type.check_type(@key_class, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyClass")
  @key_modes_of_use = key_modes_of_use.is_a?(Hash) ? ::AWSCDK::PaymentCryptography::CfnKey::KeyModesOfUseProperty.new(**key_modes_of_use.transform_keys(&:to_sym)) : key_modes_of_use
  Jsii::Type.check_type(@key_modes_of_use, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wYXltZW50Y3J5cHRvZ3JhcGh5LkNmbktleS5LZXlNb2Rlc09mVXNlUHJvcGVydHkifV19fQ==")), "keyModesOfUse")
  @key_usage = key_usage
  Jsii::Type.check_type(@key_usage, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyUsage")
end

Instance Attribute Details

#key_algorithmString (readonly)

The key algorithm to be use during creation of an AWS Payment Cryptography key.

For symmetric keys, AWS Payment Cryptography supports AES and TDES algorithms. For asymmetric keys, AWS Payment Cryptography supports RSA and ECC_NIST algorithms.



664
665
666
# File 'payment_cryptography/cfn_key.rb', line 664

def key_algorithm
  @key_algorithm
end

#key_classString (readonly)

The type of AWS Payment Cryptography key to create, which determines the classification of the cryptographic method and whether AWS Payment Cryptography key contains a symmetric key or an asymmetric key pair.



669
670
671
# File 'payment_cryptography/cfn_key.rb', line 669

def key_class
  @key_class
end

#key_modes_of_useAWSCDK::IResolvable, AWSCDK::PaymentCryptography::CfnKey::KeyModesOfUseProperty (readonly)

The list of cryptographic operations that you can perform using the key.



674
675
676
# File 'payment_cryptography/cfn_key.rb', line 674

def key_modes_of_use
  @key_modes_of_use
end

#key_usageString (readonly)

The cryptographic usage of an AWS Payment Cryptography key as defined in section A.5.2 of the TR-31 spec.



679
680
681
# File 'payment_cryptography/cfn_key.rb', line 679

def key_usage
  @key_usage
end

Class Method Details

.jsii_propertiesObject



681
682
683
684
685
686
687
688
# File 'payment_cryptography/cfn_key.rb', line 681

def self.jsii_properties
  {
    :key_algorithm => "keyAlgorithm",
    :key_class => "keyClass",
    :key_modes_of_use => "keyModesOfUse",
    :key_usage => "keyUsage",
  }
end

Instance Method Details

#to_jsiiObject



690
691
692
693
694
695
696
697
698
699
# File 'payment_cryptography/cfn_key.rb', line 690

def to_jsii
  result = {}
  result.merge!({
    "keyAlgorithm" => @key_algorithm,
    "keyClass" => @key_class,
    "keyModesOfUse" => @key_modes_of_use,
    "keyUsage" => @key_usage,
  })
  result.compact
end