{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-payment-cryptography/json-schema/amazon-payment-cryptography-create-key-input-schema.json",
  "title": "CreateKeyInput",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-payment-cryptography-payment-cryptography-control-plane-api-openapi.yml#/components/schemas/CreateKeyInput",
  "type": "object",
  "properties": {
    "KeyAttributes": {
      "$ref": "#/$defs/KeyAttributes"
    },
    "KeyCheckValueAlgorithm": {
      "type": "string",
      "description": "The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV). It is used to validate the key integrity. For TDES keys, the KCV is computed by encrypting 8 bytes, each with value of zero, with the key to be checked and retaining the 3 highest order bytes of the encrypted result. For AES keys, the KCV is computed using a CMAC algorithm where the input data is 16 bytes of zero and retaining the 3 highest order bytes of the encrypted result. For HMAC keys, the KCV is computed using the hash selected at key creation on a zero-length message, taking the lef"
    },
    "Exportable": {
      "type": "boolean",
      "description": "Specifies whether the key is exportable from the service."
    },
    "Enabled": {
      "type": "boolean",
      "description": "Specifies whether to enable the key. If the key is enabled, it is activated for use within the service. If the key is not enabled, then it is created but not activated. The default value is enabled."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Assigns one or more tags to the Amazon Web Services Payment Cryptography key. Use this parameter to tag a key when it is created. To tag an existing Amazon Web Services Payment Cryptography key, use the TagResource operation. Each tag consists of a tag key and a tag value. Both the tag key and the tag value are required, but the tag value can be an empty (null) string. You can't have more than one tag on an Amazon Web Services Payment Cryptography key with the same tag key. Don't include personal, confidential or sensitive information in this field. This field may be displayed in plaintext in "
    },
    "DeriveKeyUsage": {
      "type": "string",
      "description": "The intended cryptographic usage of keys derived from the ECC key pair to be created. After creating an ECC key pair, you cannot change the intended cryptographic usage of keys derived from it using ECDH."
    },
    "ReplicationRegions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "KeyAttributes",
    "Exportable"
  ],
  "$defs": {
    "KeyAttributes": {
      "type": "object",
      "properties": {
        "KeyUsage": {
          "type": "string",
          "description": "The cryptographic usage of an Amazon Web Services Payment Cryptography key as deﬁned in section A.5.2 of the TR-31 spec."
        },
        "KeyClass": {
          "type": "string",
          "description": "The type of Amazon Web Services Payment Cryptography key to create, which determines the classiﬁcation of the cryptographic method and whether Amazon Web Services Payment Cryptography key contains a symmetric key or an asymmetric key pair."
        },
        "KeyAlgorithm": {
          "type": "string",
          "description": "The key algorithm to be use during creation of an Amazon Web Services Payment Cryptography key. For symmetric keys, Amazon Web Services Payment Cryptography supports AES and TDES algorithms. For asymmetric keys, Amazon Web Services Payment Cryptography supports RSA and ECC_NIST algorithms."
        },
        "KeyModesOfUse": {
          "$ref": "#/$defs/KeyModesOfUse"
        }
      },
      "required": [
        "KeyUsage",
        "KeyClass",
        "KeyAlgorithm",
        "KeyModesOfUse"
      ]
    },
    "KeyModesOfUse": {
      "type": "object",
      "properties": {
        "Encrypt": {
          "type": "string",
          "description": "Speciﬁes whether an Amazon Web Services Payment Cryptography key can be used to encrypt data."
        },
        "Decrypt": {
          "type": "string",
          "description": "Speciﬁes whether an Amazon Web Services Payment Cryptography key can be used to decrypt data."
        },
        "Wrap": {
          "type": "string",
          "description": "Speciﬁes whether an Amazon Web Services Payment Cryptography key can be used to wrap other keys."
        },
        "Unwrap": {
          "type": "string",
          "description": "Speciﬁes whether an Amazon Web Services Payment Cryptography key can be used to unwrap other keys."
        },
        "Generate": {
          "type": "string",
          "description": "Speciﬁes whether an Amazon Web Services Payment Cryptography key can be used to generate and verify other card and PIN verification keys."
        },
        "Sign": {
          "type": "string",
          "description": "Speciﬁes whether an Amazon Web Services Payment Cryptography key can be used for signing."
        },
        "Verify": {
          "type": "string",
          "description": "Speciﬁes whether an Amazon Web Services Payment Cryptography key can be used to verify signatures."
        },
        "DeriveKey": {
          "type": "string",
          "description": "Speciﬁes whether an Amazon Web Services Payment Cryptography key can be used to derive new keys."
        },
        "NoRestrictions": {
          "type": "string",
          "description": "Speciﬁes whether an Amazon Web Services Payment Cryptography key has no special restrictions other than the restrictions implied by KeyUsage."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key of the tag."
        },
        "Value": {
          "type": "string",
          "description": "The value of the tag."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}