{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ec2/json-schema/amazon-ec2-modify-image-attribute-request-schema.json",
  "title": "ModifyImageAttributeRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ec2-image-attribute-api-openapi.yml#/components/schemas/ModifyImageAttributeRequest",
  "type": "object",
  "properties": {
    "Attribute": {
      "type": "string",
      "description": "The name of the attribute to modify. Valid values: description | imdsSupport | launchPermission"
    },
    "Description": {
      "$ref": "#/$defs/AttributeValue"
    },
    "ImageId": {
      "type": "string",
      "description": "The ID of the AMI."
    },
    "LaunchPermission": {
      "$ref": "#/$defs/LaunchPermissionModifications"
    },
    "OperationType": {
      "type": "string",
      "enum": [
        "add",
        "remove"
      ],
      "description": "The operation type. This parameter can be used only when the Attribute parameter is launchPermission."
    },
    "ProductCodes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Not supported."
    },
    "UserGroups": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The user groups. This parameter can be used only when the Attribute parameter is launchPermission."
    },
    "UserIds": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The Amazon Web Services account IDs. This parameter can be used only when the Attribute parameter is launchPermission."
    },
    "Value": {
      "type": "string",
      "description": "The value of the attribute being modified. This parameter can be used only when the Attribute parameter is description or imdsSupport."
    },
    "OrganizationArns": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The Amazon Resource Name (ARN) of an organization. This parameter can be used only when the Attribute parameter is launchPermission."
    },
    "OrganizationalUnitArns": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter can be used only when the Attribute parameter is launchPermission."
    },
    "ImdsSupport": {
      "$ref": "#/$defs/AttributeValue"
    },
    "DryRun": {
      "type": "boolean",
      "description": "Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation."
    }
  },
  "required": [
    "ImageId"
  ],
  "$defs": {
    "AttributeValue": {
      "type": "object",
      "properties": {
        "Value": {
          "type": "string",
          "description": "The attribute value. The value is case-sensitive."
        }
      }
    },
    "LaunchPermission": {
      "type": "object",
      "properties": {
        "OrganizationArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of an organization."
        },
        "OrganizationalUnitArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of an organizational unit (OU)."
        },
        "UserId": {
          "type": "string",
          "description": "The Amazon Web Services account ID. Constraints: Up to 10 000 account IDs can be specified in a single request."
        },
        "Group": {
          "type": "string",
          "enum": [
            "all"
          ],
          "description": "The name of the group."
        }
      }
    },
    "LaunchPermissionModifications": {
      "type": "object",
      "properties": {
        "Add": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LaunchPermission"
          },
          "description": "The Amazon Web Services account ID, organization ARN, or OU ARN to add to the list of launch permissions for the AMI."
        },
        "Remove": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LaunchPermission"
          },
          "description": "The Amazon Web Services account ID, organization ARN, or OU ARN to remove from the list of launch permissions for the AMI."
        }
      }
    }
  }
}