{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-systems-manager/json-schema/amazon-systems-manager-create-experiment-definition-request-schema.json",
  "title": "CreateExperimentDefinitionRequest",
  "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/CreateExperimentDefinitionRequest",
  "type": "object",
  "properties": {
    "ApplicationIdentifier": {
      "type": "string",
      "description": "The application ID or name."
    },
    "Name": {
      "type": "string",
      "description": "A name for the experiment definition."
    },
    "ConfigurationProfileIdentifier": {
      "type": "string",
      "description": "The configuration profile ID or name that stores the feature flag."
    },
    "EnvironmentIdentifier": {
      "type": "string",
      "description": "The environment ID or name where the experiment will run."
    },
    "FlagKey": {
      "type": "string",
      "description": "The key of the existing feature flag to use with the experiment."
    },
    "Treatments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TreatmentInput"
      },
      "description": "A list of treatments to evaluate during the experiment. Each treatment defines a distinct variation compared to the control."
    },
    "Control": {
      "$ref": "#/$defs/TreatmentInput"
    },
    "AudienceRule": {
      "type": "string",
      "description": "A rule that defines which users are eligible to be assigned to treatments during the experiment."
    },
    "Hypothesis": {
      "type": "string",
      "description": "A description of the goal or hypothesis the experiment is designed to validate."
    },
    "AudienceDescription": {
      "type": "string",
      "description": "A description of the intended audience for the experiment."
    },
    "LaunchCriteria": {
      "type": "string",
      "description": "Information about the conditions under which you would launch the winning treatment."
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags to assign to the experiment definition. Tags help organize and categorize your AppConfig resources."
    }
  },
  "required": [
    "ApplicationIdentifier",
    "Name",
    "ConfigurationProfileIdentifier",
    "EnvironmentIdentifier",
    "FlagKey",
    "Treatments",
    "Control",
    "AudienceRule"
  ],
  "$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"
      ]
    },
    "TreatmentInput": {
      "type": "object",
      "properties": {
        "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"
      ]
    }
  }
}