{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-s3/json-schema/amazon-s3-tag-resource-request-schema.json",
  "title": "TagResourceRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-s3-tags-api-openapi.yml#/components/schemas/TagResourceRequest",
  "type": "object",
  "properties": {
    "AccountId": {
      "type": "string",
      "description": "The Amazon Web Services account ID that created the S3 resource that you're trying to add tags to or the requester's account ID."
    },
    "ResourceArn": {
      "type": "string",
      "description": "The Amazon Resource Name (ARN) of the S3 resource that you're applying tags to. The tagged resource can be a directory bucket, S3 Storage Lens group or S3 Access Grants instance, registered location, or grant."
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/S3ControlTag"
      },
      "description": "The Amazon Web Services resource tags that you want to add to the specified S3 resource."
    }
  },
  "required": [
    "AccountId",
    "ResourceArn",
    "Tags"
  ],
  "$defs": {
    "S3ControlTag": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key of the key-value pair of a tag added to your Amazon Web Services resource. A tag key can be up to 128 Unicode characters in length and is case-sensitive. System created tags that begin with aws: aren’t supported."
        },
        "Value": {
          "type": "string",
          "description": "The value of the key-value pair of a tag added to your Amazon Web Services resource. A tag value can be up to 256 Unicode characters in length and is case-sensitive."
        }
      },
      "required": [
        "Key",
        "Value"
      ]
    }
  }
}