{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-opensearch/json-schema/amazon-opensearch-create-package-request-schema.json",
  "title": "CreatePackageRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-opensearch-packages-api-openapi.yml#/components/schemas/CreatePackageRequest",
  "type": "object",
  "properties": {
    "PackageName": {
      "type": "string",
      "description": "Unique name for the package."
    },
    "PackageType": {
      "type": "string",
      "enum": [
        "TXT-DICTIONARY",
        "ZIP-PLUGIN",
        "PACKAGE-LICENSE",
        "PACKAGE-CONFIG"
      ],
      "description": "The type of package."
    },
    "PackageDescription": {
      "type": "string",
      "description": "Description of the package."
    },
    "PackageSource": {
      "$ref": "#/$defs/PackageSource"
    },
    "PackageConfiguration": {
      "$ref": "#/$defs/PackageConfiguration"
    },
    "EngineVersion": {
      "type": "string",
      "description": "The version of the Amazon OpenSearch Service engine for which is compatible with the package. This can only be specified for package type ZIP-PLUGIN"
    },
    "PackageVendingOptions": {
      "$ref": "#/$defs/PackageVendingOptions"
    },
    "PackageEncryptionOptions": {
      "$ref": "#/$defs/PackageEncryptionOptions"
    }
  },
  "required": [
    "PackageName",
    "PackageType",
    "PackageSource"
  ],
  "$defs": {
    "PackageConfiguration": {
      "type": "object",
      "properties": {
        "LicenseRequirement": {
          "type": "string",
          "enum": [
            "REQUIRED",
            "OPTIONAL",
            "NONE"
          ],
          "description": "The license requirements for the package."
        },
        "LicenseFilepath": {
          "type": "string",
          "description": "The relative file path for the license associated with the package."
        },
        "ConfigurationRequirement": {
          "type": "string",
          "enum": [
            "REQUIRED",
            "OPTIONAL",
            "NONE"
          ],
          "description": "The configuration requirements for the package."
        },
        "RequiresRestartForConfigurationUpdate": {
          "type": "boolean",
          "description": "This indicates whether a B/G deployment is required for updating the configuration that the plugin is prerequisite for."
        }
      },
      "required": [
        "LicenseRequirement",
        "ConfigurationRequirement"
      ]
    },
    "PackageEncryptionOptions": {
      "type": "object",
      "properties": {
        "KmsKeyIdentifier": {
          "type": "string",
          "description": "KMS key ID for encrypting the package."
        },
        "EncryptionEnabled": {
          "type": "boolean",
          "description": "Whether encryption is enabled for the package."
        }
      },
      "required": [
        "EncryptionEnabled"
      ]
    },
    "PackageSource": {
      "type": "object",
      "properties": {
        "S3BucketName": {
          "type": "string",
          "description": "The name of the Amazon S3 bucket containing the package."
        },
        "S3Key": {
          "type": "string",
          "description": "Key (file name) of the package."
        }
      }
    },
    "PackageVendingOptions": {
      "type": "object",
      "properties": {
        "VendingEnabled": {
          "type": "boolean",
          "description": "Indicates whether the package vending feature is enabled, allowing the package to be used by other users."
        }
      },
      "required": [
        "VendingEnabled"
      ]
    }
  }
}