{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-transfer-family/json-schema/amazon-transfer-family-create-agreement-request-schema.json",
  "title": "CreateAgreementRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-transfer-family-createagreement-api-openapi.yml#/components/schemas/CreateAgreementRequest",
  "type": "object",
  "properties": {
    "Description": {
      "type": "string",
      "description": "A name or short description to identify the agreement."
    },
    "ServerId": {
      "type": "string",
      "description": "A system-assigned unique identifier for a server instance. This is the specific server that the agreement uses."
    },
    "LocalProfileId": {
      "type": "string",
      "description": "A unique identifier for the AS2 local profile."
    },
    "PartnerProfileId": {
      "type": "string",
      "description": "A unique identifier for the partner profile used in the agreement."
    },
    "BaseDirectory": {
      "type": "string",
      "description": "The landing directory (folder) for files transferred by using the AS2 protocol. A BaseDirectory example is /amzn-s3-demo-bucket/home/mydirectory."
    },
    "AccessRole": {
      "type": "string",
      "description": "Connectors are used to send files using either the AS2 or SFTP protocol. For the access role, provide the Amazon Resource Name (ARN) of the Identity and Access Management role to use. For AS2 connectors With AS2, you can send files by calling StartFileTransfer and specifying the file paths in the request parameter, SendFilePaths. We use the file’s parent directory (for example, for --send-file-paths /bucket/dir/file.txt, parent directory is /bucket/dir/) to temporarily store a processed AS2 message file, store the MDN when we receive them from the partner, and write a final JSON file containin"
    },
    "Status": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "INACTIVE"
      ],
      "description": "The status of the agreement. The agreement can be either ACTIVE or INACTIVE."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "Key-value pairs that can be used to group and search for agreements."
    },
    "PreserveFilename": {
      "type": "string",
      "enum": [
        "ENABLED",
        "DISABLED"
      ],
      "description": "Determines whether or not Transfer Family appends a unique string of characters to the end of the AS2 message payload filename when saving it. ENABLED: the filename provided by your trading parter is preserved when the file is saved. DISABLED (default value): when Transfer Family saves the file, the filename is adjusted, as described in File names and locations."
    },
    "EnforceMessageSigning": {
      "type": "string",
      "enum": [
        "ENABLED",
        "DISABLED"
      ],
      "description": "Determines whether or not unsigned messages from your trading partners will be accepted. ENABLED: Transfer Family rejects unsigned messages from your trading partner. DISABLED (default value): Transfer Family accepts unsigned messages from your trading partner."
    },
    "CustomDirectories": {
      "$ref": "#/$defs/CustomDirectoriesType"
    }
  },
  "required": [
    "ServerId",
    "LocalProfileId",
    "PartnerProfileId",
    "AccessRole"
  ],
  "$defs": {
    "CustomDirectoriesType": {
      "type": "object",
      "properties": {
        "FailedFilesDirectory": {
          "type": "string",
          "description": "Specifies a location to store failed AS2 message files."
        },
        "MdnFilesDirectory": {
          "type": "string",
          "description": "Specifies a location to store MDN files."
        },
        "PayloadFilesDirectory": {
          "type": "string",
          "description": "Specifies a location to store the payload for AS2 message files."
        },
        "StatusFilesDirectory": {
          "type": "string",
          "description": "Specifies a location to store AS2 status messages."
        },
        "TemporaryFilesDirectory": {
          "type": "string",
          "description": "Specifies a location to store temporary AS2 message files."
        }
      },
      "required": [
        "FailedFilesDirectory",
        "MdnFilesDirectory",
        "PayloadFilesDirectory",
        "StatusFilesDirectory",
        "TemporaryFilesDirectory"
      ]
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The name assigned to the tag that you create."
        },
        "Value": {
          "type": "string",
          "description": "Contains one or more values that you assigned to the key name you create."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}