{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/stackit/main/json-schema/stackit-create-wrapping-key-payload-schema.json",
  "title": "CreateWrappingKeyPayload",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/stackit-kms-openapi.yml#/components/schemas/CreateWrappingKeyPayload",
  "properties": {
    "access_scope": {
      "$ref": "#/$defs/access_scope"
    },
    "algorithm": {
      "$ref": "#/$defs/wrappingAlgorithm"
    },
    "description": {
      "description": "A user chosen description to distinguish multiple wrapping keys.",
      "type": "string"
    },
    "displayName": {
      "description": "The display name to distinguish multiple wrapping keys. Valid characters: letters, digits, underscores and hyphens.",
      "maxLength": 64,
      "pattern": "^[a-zA-Z0-9_-]+$",
      "type": "string"
    },
    "protection": {
      "$ref": "#/$defs/protection"
    },
    "purpose": {
      "$ref": "#/$defs/wrappingPurpose"
    }
  },
  "required": [
    "displayName",
    "protection",
    "purpose",
    "algorithm"
  ],
  "$defs": {
    "access_scope": {
      "default": "PUBLIC",
      "description": "The access scope of the key.",
      "enum": [
        "PUBLIC",
        "SNA"
      ],
      "type": "string"
    },
    "protection": {
      "description": "The underlying system that is responsible for protecting the key material. Possible values are \"software\" or \"hsm\"",
      "type": "string"
    },
    "wrappingAlgorithm": {
      "description": "The wrapping algorithm used to wrap the key to import.",
      "enum": [
        "rsa_2048_oaep_sha256",
        "rsa_3072_oaep_sha256",
        "rsa_4096_oaep_sha256",
        "rsa_4096_oaep_sha512",
        "rsa_2048_oaep_sha256_aes_256_key_wrap",
        "rsa_3072_oaep_sha256_aes_256_key_wrap",
        "rsa_4096_oaep_sha256_aes_256_key_wrap",
        "rsa_4096_oaep_sha512_aes_256_key_wrap"
      ],
      "type": "string"
    },
    "wrappingPurpose": {
      "description": "The wrapping purpose for the wrapping key.",
      "enum": [
        "wrap_symmetric_key",
        "wrap_asymmetric_key"
      ],
      "type": "string"
    }
  }
}