{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-systems-manager/json-schema/amazon-systems-manager-experiment-definition-schema.json",
  "title": "ExperimentDefinition",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-systems-manager-experimentdefinitions-api-openapi.yml#/components/schemas/ExperimentDefinition",
  "type": "object",
  "properties": {
    "ApplicationId": {
      "type": "string",
      "description": "The application ID."
    },
    "Id": {
      "type": "string",
      "description": "The experiment definition ID."
    },
    "Name": {
      "type": "string",
      "description": "The name of the experiment definition."
    },
    "Hypothesis": {
      "type": "string",
      "description": "The hypothesis that the experiment is designed to validate."
    },
    "Status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "IDLE",
        "ARCHIVED"
      ],
      "description": "The current status of the experiment definition. Valid values: ACTIVE, IDLE, ARCHIVED."
    },
    "ConfigurationProfileId": {
      "type": "string",
      "description": "The configuration profile ID associated with the experiment."
    },
    "EnvironmentId": {
      "type": "string",
      "description": "The environment ID where the experiment runs."
    },
    "FlagKey": {
      "type": "string",
      "description": "The key of the feature flag used by the experiment."
    },
    "AudienceRule": {
      "type": "string",
      "description": "The rule that defines which users are eligible to be assigned to treatments."
    },
    "AudienceDescription": {
      "type": "string",
      "description": "A description of the intended audience for the experiment."
    },
    "LaunchCriteria": {
      "type": "string",
      "description": "The conditions under which the winning treatment should be launched."
    },
    "Treatments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Treatment"
      },
      "description": "The list of treatments defined for the experiment."
    },
    "Control": {
      "$ref": "#/$defs/Treatment"
    },
    "CreatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the experiment definition was created, in ISO 8601 format."
    },
    "UpdatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time the experiment definition was last updated, in ISO 8601 format."
    },
    "KmsKeyIdentifier": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the KMS key used to encrypt experiment data."
    }
  },
  "$defs": {
    "AttributeValue": {
      "type": "object",
      "properties": {
        "StringValue": {
          "type": "string",
          "description": "A string value for the attribute."
        },
        "NumberValue": {
          "type": "number",
          "description": "A numeric value for the attribute."
        },
        "BooleanValue": {
          "type": "boolean",
          "description": "A Boolean value for the attribute."
        },
        "StringArray": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "An array of string values for the attribute."
        },
        "NumberArray": {
          "type": "array",
          "items": {
            "type": "number"
          },
          "description": "An array of numeric values for the attribute."
        }
      },
      "description": "Exactly one member is set."
    },
    "FlagValue": {
      "type": "object",
      "properties": {
        "Enabled": {
          "type": "boolean",
          "description": "Specifies whether the feature flag is enabled for this treatment."
        },
        "AttributeValues": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AttributeValue"
          },
          "description": "The attribute values associated with this flag value."
        }
      },
      "required": [
        "Enabled"
      ]
    },
    "Treatment": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The unique key that identifies this treatment."
        },
        "Weight": {
          "type": "number",
          "description": "The traffic allocation weight for this treatment."
        },
        "Description": {
          "type": "string",
          "description": "A description of the treatment."
        },
        "FlagValue": {
          "$ref": "#/$defs/FlagValue"
        }
      },
      "required": [
        "Weight",
        "FlagValue"
      ]
    }
  }
}