Skip to content
v2.278.0

KeyAttributesProperty Struct ​

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.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_paymentcryptography as paymentcryptography } from 'aws-cdk-lib';
const keyAttributesProperty: paymentcryptography.CfnKey.KeyAttributesProperty = {
  keyAlgorithm: 'keyAlgorithm',
  keyClass: 'keyClass',
  keyModesOfUse: {
    decrypt: false,
    deriveKey: false,
    encrypt: false,
    generate: false,
    noRestrictions: false,
    sign: false,
    unwrap: false,
    verify: false,
    wrap: false,
  },
  keyUsage: 'keyUsage',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_paymentcryptography as paymentcryptography

key_attributes_property = paymentcryptography.CfnKey.KeyAttributesProperty(
    key_algorithm="keyAlgorithm",
    key_class="keyClass",
    key_modes_of_use=paymentcryptography.CfnKey.KeyModesOfUseProperty(
        decrypt=False,
        derive_key=False,
        encrypt=False,
        generate=False,
        no_restrictions=False,
        sign=False,
        unwrap=False,
        verify=False,
        wrap=False
    ),
    key_usage="keyUsage"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.paymentcryptography.*;

KeyAttributesProperty keyAttributesProperty = KeyAttributesProperty.builder()
        .keyAlgorithm("keyAlgorithm")
        .keyClass("keyClass")
        .keyModesOfUse(KeyModesOfUseProperty.builder()
                .decrypt(false)
                .deriveKey(false)
                .encrypt(false)
                .generate(false)
                .noRestrictions(false)
                .sign(false)
                .unwrap(false)
                .verify(false)
                .wrap(false)
                .build())
        .keyUsage("keyUsage")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.PaymentCryptography;

var keyAttributesProperty = new KeyAttributesProperty {
    KeyAlgorithm = "keyAlgorithm",
    KeyClass = "keyClass",
    KeyModesOfUse = new KeyModesOfUseProperty {
        Decrypt = false,
        DeriveKey = false,
        Encrypt = false,
        Generate = false,
        NoRestrictions = false,
        Sign = false,
        Unwrap = false,
        Verify = false,
        Wrap = false
    },
    KeyUsage = "keyUsage"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

keyAttributesProperty := &KeyAttributesProperty{
	KeyAlgorithm: jsii.String("keyAlgorithm"),
	KeyClass: jsii.String("keyClass"),
	KeyModesOfUse: &KeyModesOfUseProperty{
		Decrypt: jsii.Boolean(false),
		DeriveKey: jsii.Boolean(false),
		Encrypt: jsii.Boolean(false),
		Generate: jsii.Boolean(false),
		NoRestrictions: jsii.Boolean(false),
		Sign: jsii.Boolean(false),
		Unwrap: jsii.Boolean(false),
		Verify: jsii.Boolean(false),
		Wrap: jsii.Boolean(false),
	},
	KeyUsage: jsii.String("keyUsage"),
}

Properties ​

keyAlgorithmstringkey_algorithmstrkeyAlgorithmStringKeyAlgorithmstringKeyAlgorithm*string required #
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.

keyClassstringkey_classstrkeyClassStringKeyClassstringKeyClass*string required #
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.
keyModesOfUseIResolvable | CfnKey.KeyModesOfUsePropertykey_modes_of_usetyping.Union[IResolvable, KeyModesOfUseProperty]keyModesOfUseIResolvableKeyModesOfUseIResolvableKeyModesOfUseinterface{} required #
The list of cryptographic operations that you can perform using the key.
keyUsagestringkey_usagestrkeyUsageStringKeyUsagestringKeyUsage*string required #
The cryptographic usage of an AWS Payment Cryptography key as defined in section A.5.2 of the TR-31 spec.