{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-directory-service/json-schema/amazon-directory-service-share-directory-request-schema.json",
  "title": "ShareDirectoryRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-directory-service-operations-api-openapi.yml#/components/schemas/ShareDirectoryRequest",
  "type": "object",
  "properties": {
    "DirectoryId": {
      "type": "string",
      "description": "Identifier of the Managed Microsoft AD directory that you want to share with other Amazon Web Services accounts."
    },
    "ShareNotes": {
      "type": "string",
      "description": "A directory share request that is sent by the directory owner to the directory consumer. The request includes a typed message to help the directory consumer administrator determine whether to approve or reject the share invitation."
    },
    "ShareTarget": {
      "$ref": "#/$defs/ShareTarget"
    },
    "ShareMethod": {
      "type": "string",
      "enum": [
        "ORGANIZATIONS",
        "HANDSHAKE"
      ],
      "description": "The method used when sharing a directory to determine whether the directory should be shared within your Amazon Web Services organization (ORGANIZATIONS) or with any Amazon Web Services account by sending a directory sharing request (HANDSHAKE)."
    }
  },
  "required": [
    "DirectoryId",
    "ShareTarget",
    "ShareMethod"
  ],
  "$defs": {
    "ShareTarget": {
      "type": "object",
      "properties": {
        "Id": {
          "type": "string",
          "description": "Identifier of the directory consumer account."
        },
        "Type": {
          "type": "string",
          "enum": [
            "ACCOUNT"
          ],
          "description": "Type of identifier to be used in the Id field."
        }
      },
      "required": [
        "Id",
        "Type"
      ]
    }
  }
}