{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-organizations/json-schema/amazon-organizations-create-organizational-unit-request-schema.json",
  "title": "CreateOrganizationalUnitRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-organizations-organizational-unit-api-openapi.yml#/components/schemas/CreateOrganizationalUnitRequest",
  "type": "object",
  "properties": {
    "ParentId": {
      "type": "string",
      "description": "ID for the parent root or OU that you want to create the new OU in. The regex pattern for a parent ID string requires one of the following: Root - A string that begins with \"r-\" followed by from 4 to 32 lowercase letters or digits. Organizational unit (OU) - A string that begins with \"ou-\" followed by from 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This string is followed by a second \"-\" dash and from 8 to 32 additional lowercase letters or digits."
    },
    "Name": {
      "type": "string",
      "description": "The friendly name to assign to the new OU."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "A list of tags that you want to attach to the newly created OU. For each tag in the list, you must specify both a tag key and a value. You can set the value to an empty string, but you can't set it to null. For more information about tagging, see Tagging Organizations resources in the Organizations User Guide. If any one of the tags is not valid or if you exceed the allowed number of tags for an OU, then the entire request fails and the OU is not created."
    }
  },
  "required": [
    "ParentId",
    "Name"
  ],
  "$defs": {
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key identifier, or name, of the tag."
        },
        "Value": {
          "type": "string",
          "description": "The string value that's associated with the key of the tag. You can set the value of a tag to an empty string, but you can't set the value of a tag to null."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}