{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-systems-manager/json-schema/amazon-systems-manager-update-document-request-schema.json",
  "title": "UpdateDocumentRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-systems-manager-documents-api-openapi.yml#/components/schemas/UpdateDocumentRequest",
  "type": "object",
  "properties": {
    "Content": {
      "type": "string",
      "description": "A valid JSON or YAML string."
    },
    "Attachments": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AttachmentsSource"
      },
      "description": "A list of key-value pairs that describe attachments to a version of a document."
    },
    "Name": {
      "type": "string",
      "description": "The name of the SSM document that you want to update."
    },
    "DisplayName": {
      "type": "string",
      "description": "The friendly name of the SSM document that you want to update. This value can differ for each version of the document. If you don't specify a value for this parameter in your request, the existing value is applied to the new document version."
    },
    "VersionName": {
      "type": "string",
      "description": "An optional field specifying the version of the artifact you are updating with the document. For example, 12.6. This value is unique across all versions of a document, and can't be changed."
    },
    "DocumentVersion": {
      "type": "string",
      "description": "The version of the document that you want to update. Currently, Systems Manager supports updating only the latest version of the document. You can specify the version number of the latest version or use the $LATEST variable. If you change a document version for a State Manager association, Systems Manager immediately runs the association unless you previously specifed the apply-only-at-cron-interval parameter."
    },
    "DocumentFormat": {
      "type": "string",
      "enum": [
        "YAML",
        "JSON",
        "TEXT"
      ],
      "description": "Specify the document format for the new document version. The document format can be JSON, YAML, or TEXT. JSON is the default format."
    },
    "TargetType": {
      "type": "string",
      "description": "Specify a new target type for the document."
    }
  },
  "required": [
    "Content",
    "Name"
  ],
  "$defs": {
    "AttachmentsSource": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "enum": [
            "SourceUrl",
            "S3FileUrl",
            "AttachmentReference"
          ],
          "description": "The key of a key-value pair that identifies the location of an attachment to a document."
        },
        "Values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The value of a key-value pair that identifies the location of an attachment to a document. The format for Value depends on the type of key you specify. For the key SourceUrl, the value is an S3 bucket location. For example: \"Values\": [ \"s3://amzn-s3-demo-bucket/my-prefix\" ] For the key S3FileUrl, the value is a file in an S3 bucket. For example: \"Values\": [ \"s3://amzn-s3-demo-bucket/my-prefix/my-file.py\" ] For the key AttachmentReference, the value is constructed from the name of another SSM document in your account, a version number of that document, and a file attached to that document versi"
        },
        "Name": {
          "type": "string",
          "description": "The name of the document attachment file."
        }
      }
    }
  }
}