{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-compute-optimizer/json-schema/amazon-compute-optimizer-list-accounts-response-schema.json",
  "title": "ListAccountsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-compute-optimizer-account-api-openapi.yml#/components/schemas/ListAccountsResponse",
  "type": "object",
  "properties": {
    "accounts": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AccountInfo"
      },
      "description": "The list of accounts in your organization enrolled in Compute Optimizer"
    },
    "nextToken": {
      "type": "string",
      "description": "The token to use to retrieve the next page of results."
    }
  },
  "required": [
    "accounts"
  ],
  "$defs": {
    "AccountInfo": {
      "type": "object",
      "properties": {
        "accountId": {
          "type": "string",
          "description": "The ID of the Amazon Web Services account."
        },
        "status": {
          "type": "string",
          "enum": [
            "Active",
            "Inactive",
            "Pending",
            "Failed"
          ],
          "description": "The enrollment status of the account: Active, Inactive, Pending, or Failed."
        },
        "organizationRuleMode": {
          "type": "string",
          "enum": [
            "AnyAllowed",
            "NoneAllowed"
          ],
          "description": "Specifies whether the management account can create Automation rules that implement optimization actions for this account."
        },
        "statusReason": {
          "type": "string",
          "description": "The reason for the current Automation enrollment status."
        },
        "lastUpdatedTimestamp": {
          "type": "string",
          "description": "The timestamp when the account's Automation enrollment status was last updated."
        }
      },
      "required": [
        "accountId",
        "status",
        "organizationRuleMode",
        "lastUpdatedTimestamp"
      ]
    }
  }
}