{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-kms/json-schema/amazon-kms-decrypt-request-schema.json",
  "title": "DecryptRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-kms-operations-api-openapi.yml#/components/schemas/DecryptRequest",
  "type": "object",
  "properties": {
    "CiphertextBlob": {
      "type": "string",
      "format": "byte",
      "description": "Ciphertext to be decrypted. The blob includes metadata. This parameter is required in all cases except when DryRun is true and DryRunModifiers is set to IGNORE_CIPHERTEXT."
    },
    "EncryptionContext": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Specifies the encryption context to use when decrypting the data. An encryption context is valid only for cryptographic operations with a symmetric encryption KMS key. The standard asymmetric encryption algorithms and HMAC algorithms that KMS uses do not support an encryption context. An encryption context is a collection of non-secret key-value pairs that represent additional authenticated data. When you use an encryption context to encrypt data, you must specify the same (an exact case-sensitive match) encryption context to decrypt the data. An encryption context is supported only on operati"
    },
    "GrantTokens": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "A list of grant tokens. Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide."
    },
    "KeyId": {
      "type": "string",
      "description": "Specifies the KMS key that KMS uses to decrypt the ciphertext. Enter a key ID of the KMS key that was used to encrypt the ciphertext. If you identify a different KMS key, the Decrypt operation throws an IncorrectKeyException. This parameter is required only when the ciphertext was encrypted under an asymmetric KMS key or when DryRun is true and DryRunModifiers is set to IGNORE_CIPHERTEXT. If you used a symmetric encryption KMS key, KMS can get the KMS key from metadata that it adds to the symmetric ciphertext blob. However, it is always recommended as a best practice. This practice ensures tha"
    },
    "EncryptionAlgorithm": {
      "type": "string",
      "enum": [
        "SYMMETRIC_DEFAULT",
        "RSAES_OAEP_SHA_1",
        "RSAES_OAEP_SHA_256",
        "SM2PKE"
      ],
      "description": "Specifies the encryption algorithm that will be used to decrypt the ciphertext. Specify the same algorithm that was used to encrypt the data. If you specify a different algorithm, the Decrypt operation fails. This parameter is required only when the ciphertext was encrypted under an asymmetric KMS key. The default value, SYMMETRIC_DEFAULT, represents the only supported algorithm that is valid for symmetric encryption KMS keys."
    },
    "Recipient": {
      "$ref": "#/$defs/RecipientInfo"
    },
    "DryRun": {
      "type": "boolean",
      "description": "Checks if your request will succeed. DryRun is an optional parameter. To learn more about how to use this parameter, see Testing your permissions in the Key Management Service Developer Guide."
    },
    "DryRunModifiers": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "IGNORE_CIPHERTEXT"
        ]
      },
      "description": "Specifies the modifiers to apply to the dry run operation. DryRunModifiers is an optional parameter that only applies when DryRun is set to true. When set to IGNORE_CIPHERTEXT, KMS performs only authorization validation without ciphertext validation. This allows you to test permissions without requiring a valid ciphertext blob. To learn more about how to use this parameter, see Testing your permissions in the Key Management Service Developer Guide."
    }
  },
  "$defs": {
    "RecipientInfo": {
      "type": "object",
      "properties": {
        "KeyEncryptionAlgorithm": {
          "type": "string",
          "enum": [
            "RSAES_OAEP_SHA_256"
          ],
          "description": "The encryption algorithm that KMS should use with the public key for an Amazon Web Services Nitro Enclave or NitroTPM to encrypt plaintext values for the response. The only valid value is RSAES_OAEP_SHA_256."
        },
        "AttestationDocument": {
          "type": "string",
          "format": "byte",
          "description": "The attestation document for an Amazon Web Services Nitro Enclave or a NitroTPM. This document includes the enclave's public key."
        }
      }
    }
  }
}