{
  "openapi": "3.1.0",
  "info": {
    "title": "MilkStraw AI API",
    "version": "1",
    "description": "Read your MilkStraw AI data: inventory, commitments, spend, savings, projects, and bills. Every endpoint is read-only and returns JSON, except the invoice PDF."
  },
  "servers": [
    {
      "url": "https://app.milkstraw.ai"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "Organizations",
      "description": "Your organization and its AWS accounts."
    },
    {
      "name": "Inventory",
      "description": "The AWS resources MilkStraw AI found in your accounts."
    },
    {
      "name": "Commitments",
      "description": "Your Reserved Instances and Savings Plans."
    },
    {
      "name": "Spend and savings",
      "description": "What you spend on AWS, and what MilkStraw AI saves you."
    },
    {
      "name": "Projects",
      "description": "Your projects, and the tasks in them."
    },
    {
      "name": "Billing",
      "description": "MilkStraw AI's bills, with their invoices."
    }
  ],
  "paths": {
    "/api/organizations": {
      "get": {
        "operationId": "listOrganizations",
        "tags": [
          "Organizations"
        ],
        "summary": "List organizations",
        "description": "Your organization, with its management account. Use its `id` in the path of every other endpoint.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organizations"
                  ],
                  "properties": {
                    "organizations": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Organization"
                      },
                      "description": "The matching organizations"
                    }
                  }
                },
                "example": {
                  "organizations": [
                    {
                      "id": "77f339a2-460f-5635-964f-501519ddbc7a",
                      "name": "Name 1",
                      "onboarding": "complete",
                      "management_account": {
                        "id": "727f7a11-2e01-5bc2-88db-5a4a19220868",
                        "nickname": "A1",
                        "account_id": "123456789012",
                        "access": "denied"
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}": {
      "get": {
        "operationId": "getOrganization",
        "tags": [
          "Organizations"
        ],
        "summary": "Get an organization",
        "description": "One organization, with its AWS accounts and when MilkStraw AI last read them.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "organization"
                  ],
                  "properties": {
                    "organization": {
                      "$ref": "#/components/schemas/OrganizationDetail",
                      "description": "The organization"
                    }
                  }
                },
                "example": {
                  "organization": {
                    "id": "77f339a2-460f-5635-964f-501519ddbc7a",
                    "name": "Name 1",
                    "onboarding": "complete",
                    "management_account": {
                      "id": "727f7a11-2e01-5bc2-88db-5a4a19220868",
                      "nickname": "A1",
                      "account_id": "123456789012",
                      "access": "denied"
                    },
                    "external_id": "org-0001xxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    "role_name": "MilkStrawRoleV2",
                    "root_id": "r-1234",
                    "stacks": {},
                    "last_scanned_at": "2026-11-09T13:01:59.464Z",
                    "accounts": [
                      {
                        "id": "727f7a11-2e01-5bc2-88db-5a4a19220868",
                        "nickname": "A1",
                        "account_id": "123456789012",
                        "access": "denied"
                      },
                      {
                        "id": "3b37c360-7459-5485-823b-42fff4728700",
                        "nickname": "A2",
                        "account_id": "234567890123",
                        "access": "denied"
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/ec2": {
      "get": {
        "operationId": "listEc2Instances",
        "tags": [
          "Inventory"
        ],
        "summary": "List EC2 instances",
        "description": "Your EC2 on-demand instances.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "pending",
                  "running",
                  "shutting-down",
                  "stopped",
                  "stopping",
                  "terminated"
                ]
              }
            }
          },
          {
            "name": "lifecycle",
            "in": "query",
            "description": "Only the instances with these lifecycles",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "capacity-block",
                  "reserved",
                  "scheduled",
                  "spot",
                  "standard"
                ]
              }
            }
          },
          {
            "name": "outdated",
            "in": "query",
            "description": "Only previous-generation resources (`true`), or only current ones (`false`)",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "instances"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/InventorySummary",
                      "description": "Totals for the matching records"
                    },
                    "instances": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Ec2OnDemandInstance"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching instances"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 3,
                    "accounts": 1,
                    "regions": 2
                  },
                  "instances": [
                    {
                      "id": "i-acc1-001",
                      "type": "m5.large",
                      "region": "us-east-1",
                      "platform": "Linux/UNIX",
                      "launch_time": "2026-11-02T13:01:58.000Z",
                      "lifecycle": "standard",
                      "monitoring": "disabled",
                      "outdated": false,
                      "managed_by": "standalone",
                      "state": "running",
                      "price": 0.096,
                      "ri_coverage_percentage": 80.0,
                      "sp_coverage_percentage": 10.0,
                      "tags": {
                        "env": "prod",
                        "team": "platform"
                      },
                      "account_id": "123456789012"
                    },
                    {
                      "id": "i-acc1-002",
                      "type": "c5.large",
                      "region": "us-east-1",
                      "platform": "Linux/UNIX",
                      "launch_time": "2026-10-10T13:01:58.000Z",
                      "lifecycle": "spot",
                      "monitoring": "disabled",
                      "outdated": false,
                      "managed_by": "standalone",
                      "state": "running",
                      "price": 0.085,
                      "ri_coverage_percentage": 0.0,
                      "sp_coverage_percentage": 0.0,
                      "tags": {
                        "env": "prod"
                      },
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/rds": {
      "get": {
        "operationId": "listRdsInstances",
        "tags": [
          "Inventory"
        ],
        "summary": "List RDS instances",
        "description": "Your RDS on-demand instances.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "instances"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/InventorySummary",
                      "description": "Totals for the matching records"
                    },
                    "instances": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/RdsOnDemandInstance"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching instances"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "accounts": 1,
                    "regions": 1
                  },
                  "instances": [
                    {
                      "id": "orders-db",
                      "type": "db.r6g.large",
                      "region": "us-east-1",
                      "platform": "postgres",
                      "platform_version": "16.4",
                      "multi_az": false,
                      "aurora_io": false,
                      "launch_time": "2025-01-01T00:00:00.000Z",
                      "outdated": false,
                      "performance_insights_enabled": false,
                      "encrypted": false,
                      "price": 182.5,
                      "ri_coverage_percentage": 0.0,
                      "sp_coverage_percentage": 0.0,
                      "tags": {},
                      "support_status": "standard",
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/elasticache": {
      "get": {
        "operationId": "listElasticacheClusters",
        "tags": [
          "Inventory"
        ],
        "summary": "List ElastiCache clusters",
        "description": "Your ElastiCache clusters.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "clusters"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/InventorySummary",
                      "description": "Totals for the matching records"
                    },
                    "clusters": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/ElasticacheOnDemandCluster"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching clusters"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "accounts": 1,
                    "regions": 1
                  },
                  "clusters": [
                    {
                      "id": "sessions-001",
                      "region": "us-east-1",
                      "type": "cache.r6g.large",
                      "platform": "redis",
                      "nodes_count": 1,
                      "launch_time": "2025-01-01T00:00:00.000Z",
                      "transit_encryption_enabled": true,
                      "at_rest_encryption_enabled": true,
                      "state": "available",
                      "outdated": false,
                      "price": 149.65,
                      "ri_coverage_percentage": 0.0,
                      "sp_coverage_percentage": 0.0,
                      "tags": {},
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/opensearch": {
      "get": {
        "operationId": "listOpensearchDomains",
        "tags": [
          "Inventory"
        ],
        "summary": "List OpenSearch domains",
        "description": "Your OpenSearch domains.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "clusters"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/InventorySummary",
                      "description": "Totals for the matching records"
                    },
                    "clusters": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/OpensearchOnDemandCluster"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching clusters"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "accounts": 1,
                    "regions": 1
                  },
                  "clusters": [
                    {
                      "id": "123456789012/acc1-domain",
                      "region": "us-east-1",
                      "data_nodes_type": "r6g.large.search",
                      "data_nodes_count": 2,
                      "master_nodes_type": "N/A",
                      "master_nodes_count": 0,
                      "warm_nodes_type": "N/A",
                      "warm_nodes_count": 0,
                      "platform": "OpenSearch",
                      "platform_version": "2.13",
                      "at_rest_encryption_enabled": true,
                      "node_to_node_encryption_enabled": true,
                      "multi_az": false,
                      "price": 100.0,
                      "ri_coverage_percentage": 0.0,
                      "sp_coverage_percentage": 0.0,
                      "tags": {},
                      "support_status": "standard",
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/opensearch/nodes": {
      "get": {
        "operationId": "listOpensearchNodes",
        "tags": [
          "Inventory"
        ],
        "summary": "List OpenSearch nodes",
        "description": "The nodes of your OpenSearch domains, each with its `cluster_id`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "role",
            "in": "query",
            "description": "Only the nodes with these roles",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "cluster",
            "in": "query",
            "description": "Only the records of these clusters, by cluster ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "nodes"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/NestedInventorySummary",
                      "description": "Totals for the matching records"
                    },
                    "nodes": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/OpensearchOnDemandNode"
                          },
                          {
                            "type": "object",
                            "required": [
                              "cluster_id",
                              "account_id",
                              "region"
                            ],
                            "properties": {
                              "cluster_id": {
                                "type": "string",
                                "description": "The ID of the cluster it belongs to"
                              },
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              },
                              "region": {
                                "type": "string",
                                "description": "The region of the cluster it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching nodes"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 2,
                    "clusters": 1,
                    "accounts": 1,
                    "regions": 1
                  },
                  "nodes": [
                    {
                      "id": "acc1-domain/node-1",
                      "role": "data",
                      "availability_zone": "us-east-1a",
                      "type": "r6g.large.search",
                      "status": "active",
                      "storage_type": "ebs",
                      "storage_volume_type": "gp3",
                      "storage_size": "100",
                      "price": 50.0,
                      "cluster_id": "123456789012/acc1-domain",
                      "account_id": "123456789012",
                      "region": "us-east-1"
                    },
                    {
                      "id": "acc1-domain/node-2",
                      "role": "data",
                      "availability_zone": "us-east-1b",
                      "type": "r6g.large.search",
                      "status": "active",
                      "storage_type": "ebs",
                      "storage_volume_type": "gp3",
                      "storage_size": "100",
                      "price": 50.0,
                      "cluster_id": "123456789012/acc1-domain",
                      "account_id": "123456789012",
                      "region": "us-east-1"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/eks": {
      "get": {
        "operationId": "listEksClusters",
        "tags": [
          "Inventory"
        ],
        "summary": "List EKS clusters",
        "description": "Your EKS clusters.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "clusters"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/InventorySummary",
                      "description": "Totals for the matching records"
                    },
                    "clusters": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/EksCluster"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching clusters"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "accounts": 1,
                    "regions": 1
                  },
                  "clusters": [
                    {
                      "id": "production",
                      "arn": "arn:aws:eks:us-east-1:123456789012:cluster/production",
                      "region": "us-east-1",
                      "version": "1.31",
                      "platform_version": "eks.5",
                      "status": "ACTIVE",
                      "endpoint": "https://production",
                      "price": 1.0,
                      "created_at": "2025-01-01T00:00:00.000Z",
                      "tags": {},
                      "support_status": "standard",
                      "node_groups": [
                        {
                          "id": "general",
                          "arn": "arn:aws:eks:us-east-1:123456789012:nodegroup/c/general/uuid",
                          "region": "us-east-1",
                          "version": "1.28",
                          "status": "ACTIVE",
                          "capacity_type": "ON_DEMAND",
                          "ami_type": "AL2023_x86_64_STANDARD",
                          "instance_types": [
                            "m6g.xlarge"
                          ],
                          "disk_size": 20,
                          "scaling_min": 1,
                          "scaling_max": 3,
                          "scaling_desired": 2,
                          "labels": {},
                          "auto_scaling_group_names": [
                            "eks-general"
                          ],
                          "outdated": false,
                          "price": 245.28,
                          "created_at": "2026-08-11T13:01:59.000Z",
                          "tags": {}
                        }
                      ],
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/eks/nodegroups": {
      "get": {
        "operationId": "listEksNodeGroups",
        "tags": [
          "Inventory"
        ],
        "summary": "List EKS node groups",
        "description": "The node groups of your EKS clusters, each with its `cluster_id`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "capacity",
            "in": "query",
            "description": "Only the node groups with these capacity types",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "cluster",
            "in": "query",
            "description": "Only the records of these clusters, by cluster ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "outdated",
            "in": "query",
            "description": "Only previous-generation resources (`true`), or only current ones (`false`)",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "node_groups"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/NestedInventorySummary",
                      "description": "Totals for the matching records"
                    },
                    "node_groups": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/EksNodeGroup"
                          },
                          {
                            "type": "object",
                            "required": [
                              "cluster_id",
                              "account_id",
                              "region"
                            ],
                            "properties": {
                              "cluster_id": {
                                "type": "string",
                                "description": "The ID of the cluster it belongs to"
                              },
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              },
                              "region": {
                                "type": "string",
                                "description": "The region of the cluster it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching node groups"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "clusters": 1,
                    "accounts": 1,
                    "regions": 1
                  },
                  "node_groups": [
                    {
                      "id": "general",
                      "arn": "arn:aws:eks:us-east-1:123456789012:nodegroup/c/general/uuid",
                      "region": "us-east-1",
                      "version": "1.28",
                      "status": "ACTIVE",
                      "capacity_type": "ON_DEMAND",
                      "ami_type": "AL2023_x86_64_STANDARD",
                      "instance_types": [
                        "m6g.xlarge"
                      ],
                      "disk_size": 20,
                      "scaling_min": 1,
                      "scaling_max": 3,
                      "scaling_desired": 2,
                      "labels": {},
                      "auto_scaling_group_names": [
                        "eks-general"
                      ],
                      "outdated": false,
                      "price": 245.28,
                      "created_at": "2026-08-11T13:01:59.000Z",
                      "tags": {},
                      "cluster_id": "production",
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/ebs": {
      "get": {
        "operationId": "listEbsVolumes",
        "tags": [
          "Inventory"
        ],
        "summary": "List EBS volumes",
        "description": "Your EBS volumes.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-northeast-1",
                  "ap-northeast-2",
                  "ap-northeast-3",
                  "ap-south-1",
                  "ap-south-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-central-1",
                  "ca-west-1",
                  "eu-central-1",
                  "eu-central-2",
                  "eu-north-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "il-central-1",
                  "me-central-1",
                  "me-south-1",
                  "mx-central-1",
                  "sa-east-1",
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "cn-north-1",
                  "cn-northwest-1",
                  "us-gov-east-1",
                  "us-gov-west-1",
                  "afs1-los1-az1",
                  "apne1-tpe1-az1",
                  "aps1-ccu1-az1",
                  "aps1-del1-az1",
                  "apse1-bkk1-az1",
                  "apse1-mnl1-az1",
                  "apse2-akl1-az1",
                  "apse2-per1-az1",
                  "euc1-ham1-az1",
                  "euc1-waw1-az1",
                  "eun1-cph1-az1",
                  "eun1-hel1-az1",
                  "mes1-mct1-az1",
                  "use1-atl2-az1",
                  "use1-bos1-az1",
                  "use1-bue1-az1",
                  "use1-chi2-az1",
                  "use1-dfw2-az1",
                  "use1-iah2-az1",
                  "use1-lim1-az1",
                  "use1-mci1-az1",
                  "use1-mia2-az1",
                  "use1-msp1-az1",
                  "use1-nyc2-az1",
                  "use1-phl1-az1",
                  "use1-qro1-az1",
                  "use1-scl1-az1",
                  "usw2-den1-az1",
                  "usw2-hnl1-az1",
                  "usw2-las1-az1",
                  "usw2-lax1-az1",
                  "usw2-lax1-az2",
                  "usw2-pdx1-az1",
                  "usw2-phx2-az1",
                  "usw2-sea1-az1",
                  "apne1-wl1-kix-wlz1",
                  "apne1-wl1-nrt-wlz1",
                  "cac1-wl1-yto-wlz1",
                  "euw2-wl2-man-wlz1",
                  "euw3-cmn1-wlz1",
                  "euw3-dss1-wlz1",
                  "use1-wl1-atl-wlz1",
                  "use1-wl1-bna-wlz1",
                  "use1-wl1-bos-wlz1",
                  "use1-wl1-chi-wlz1",
                  "use1-wl1-clt-wlz1",
                  "use1-wl1-dfw-wlz1",
                  "use1-wl1-dtw-wlz1",
                  "use1-wl1-iah-wlz1",
                  "use1-wl1-mia-wlz1",
                  "use1-wl1-msp-wlz1",
                  "use1-wl1-nyc-wlz1",
                  "use1-wl1-tpa-wlz1",
                  "use1-wl1-was-wlz1",
                  "usw2-wl1-den-wlz1",
                  "usw2-wl1-las-wlz1",
                  "usw2-wl1-lax-wlz1",
                  "usw2-wl1-phx-wlz1",
                  "usw2-wl1-sea-wlz1",
                  "usw2-wl1-sfo-wlz1"
                ]
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "available",
                  "creating",
                  "deleted",
                  "deleting",
                  "error",
                  "in-use"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "volumes"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/InventorySummary",
                      "description": "Totals for the matching records"
                    },
                    "volumes": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Ec2EbsVolume"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching volumes"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "accounts": 1,
                    "regions": 1
                  },
                  "volumes": [
                    {
                      "id": "vol-0a1b2c3d4e5f67890",
                      "type": "gp3",
                      "region": "us-east-1",
                      "size": 200,
                      "encrypted": false,
                      "state": "in-use",
                      "launch_time": "2025-01-01T00:00:00.000Z",
                      "iops": 3000,
                      "throughput": 125,
                      "outdated": false,
                      "price": 16.0,
                      "tags": {},
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/s3": {
      "get": {
        "operationId": "listS3Buckets",
        "tags": [
          "Inventory"
        ],
        "summary": "List S3 buckets",
        "description": "Your S3 buckets.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "buckets"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/InventorySummary",
                      "description": "Totals for the matching records"
                    },
                    "buckets": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/S3Bucket"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching buckets"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "accounts": 1,
                    "regions": 1
                  },
                  "buckets": [
                    {
                      "name": "acme-app-assets",
                      "region": "us-east-1",
                      "creation_date": "2024-01-01T00:00:00.000Z",
                      "versioning_enabled": true,
                      "encryption": "AES256",
                      "tags": {},
                      "lifecycle_rules": [],
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/inventory/metrics/cpu_utilization": {
      "get": {
        "operationId": "getCpuUtilization",
        "tags": [
          "Inventory"
        ],
        "summary": "Get CPU utilization",
        "description": "One resource's average CPU utilization for each hour, from the start of the month two months ago.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource's AWS account ID",
            "example": "123456789012"
          },
          {
            "name": "region",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource's region",
            "example": "us-east-1"
          },
          {
            "name": "namespace",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "AWS/EC2",
                "AWS/RDS",
                "AWS/ElastiCache"
              ]
            },
            "description": "The CloudWatch namespace of the resource",
            "example": "AWS/EC2"
          },
          {
            "name": "resource",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resource's `id`, as its inventory endpoint returns it",
            "example": "i-0a1b2c3d4e5f67890"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "datapoints"
                  ],
                  "properties": {
                    "datapoints": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MetricDatapoint"
                      },
                      "description": "The matching datapoints"
                    }
                  }
                },
                "example": {
                  "datapoints": [
                    {
                      "timestamp": "2026-11-09T10:00:00Z",
                      "value": 21.5
                    },
                    {
                      "timestamp": "2026-11-09T11:00:00Z",
                      "value": 34.0
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/commitments/ec2": {
      "get": {
        "operationId": "listEc2ReservedInstances",
        "tags": [
          "Commitments"
        ],
        "summary": "List EC2 Reserved Instances",
        "description": "Your EC2 Reserved Instances. Without a `state` filter, it returns the active, retired, and returned ones.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "payment-failed",
                  "payment-pending",
                  "queued",
                  "queued-deleted",
                  "retired"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "commitments"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/CommitmentsSummary",
                      "description": "Totals for the matching records"
                    },
                    "commitments": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Ec2ReservedInstance"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching commitments"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 2,
                    "active": 2,
                    "accounts": 2
                  },
                  "commitments": [
                    {
                      "id": "ri-acc-1",
                      "type": "m5.large",
                      "region": "us-east-1",
                      "count": 1,
                      "platform": "Linux/UNIX",
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "duration": 12,
                      "state": "active",
                      "payment_option": "No Upfront",
                      "offering_class": "standard",
                      "commitment_price": 50.0,
                      "on_demand_price": 100.0,
                      "savings": 50.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "123456789012"
                    },
                    {
                      "id": "ri-mb-1",
                      "type": "m5.large",
                      "region": "us-east-1",
                      "count": 1,
                      "platform": "Linux/UNIX",
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "duration": 12,
                      "state": "active",
                      "payment_option": "No Upfront",
                      "offering_class": "standard",
                      "commitment_price": 50.0,
                      "on_demand_price": 100.0,
                      "savings": 50.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "345678901234"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/commitments/rds": {
      "get": {
        "operationId": "listRdsReservedInstances",
        "tags": [
          "Commitments"
        ],
        "summary": "List RDS Reserved Instances",
        "description": "Your RDS Reserved Instances. Without a `state` filter, it returns the active, retired, and returned ones.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "payment-failed",
                  "payment-pending",
                  "queued",
                  "queued-deleted",
                  "retired"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "commitments"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/CommitmentsSummary",
                      "description": "Totals for the matching records"
                    },
                    "commitments": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/RdsReservedInstance"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching commitments"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "active": 1,
                    "accounts": 1
                  },
                  "commitments": [
                    {
                      "id": "ri-rds-acc-1",
                      "type": "db.m5.large",
                      "platform": "aurora-mysql",
                      "region": "us-east-1",
                      "count": 1,
                      "multi_az": false,
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "duration": 12,
                      "state": "active",
                      "payment_option": "No Upfront",
                      "commitment_price": 80.0,
                      "on_demand_price": 160.0,
                      "savings": 80.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/commitments/elasticache": {
      "get": {
        "operationId": "listElasticacheReservedInstances",
        "tags": [
          "Commitments"
        ],
        "summary": "List ElastiCache Reserved Instances",
        "description": "Your ElastiCache Reserved Instances. Without a `state` filter, it returns the active, retired, and returned ones.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "payment-failed",
                  "payment-pending",
                  "queued",
                  "queued-deleted",
                  "retired"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "commitments"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/CommitmentsSummary",
                      "description": "Totals for the matching records"
                    },
                    "commitments": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/ElasticacheReservedInstance"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching commitments"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "active": 1,
                    "accounts": 1
                  },
                  "commitments": [
                    {
                      "id": "ri-elc-acc-1",
                      "type": "cache.m5.large",
                      "platform": "redis",
                      "region": "us-east-1",
                      "count": 1,
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "duration": 12,
                      "state": "active",
                      "payment_option": "No Upfront",
                      "commitment_price": 60.0,
                      "on_demand_price": 120.0,
                      "savings": 60.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/commitments/opensearch": {
      "get": {
        "operationId": "listOpensearchReservedInstances",
        "tags": [
          "Commitments"
        ],
        "summary": "List OpenSearch Reserved Instances",
        "description": "Your OpenSearch Reserved Instances. Without a `state` filter, it returns the active, retired, and returned ones.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "us-east-1",
                  "us-east-2",
                  "us-west-1",
                  "us-west-2",
                  "ap-south-1",
                  "ap-northeast-3",
                  "ap-northeast-2",
                  "ap-southeast-1",
                  "ap-southeast-2",
                  "ap-northeast-1",
                  "ca-central-1",
                  "eu-central-1",
                  "eu-west-1",
                  "eu-west-2",
                  "eu-west-3",
                  "eu-north-1",
                  "sa-east-1",
                  "af-south-1",
                  "ap-east-1",
                  "ap-east-2",
                  "ap-south-2",
                  "ap-southeast-3",
                  "ap-southeast-4",
                  "ap-southeast-5",
                  "ap-southeast-6",
                  "ap-southeast-7",
                  "ca-west-1",
                  "eu-south-1",
                  "eu-south-2",
                  "eu-central-2",
                  "mx-central-1",
                  "me-south-1",
                  "me-central-1"
                ]
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "payment-failed",
                  "payment-pending",
                  "queued",
                  "queued-deleted",
                  "retired"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "commitments"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/CommitmentsSummary",
                      "description": "Totals for the matching records"
                    },
                    "commitments": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/OpensearchReservedInstance"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching commitments"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "active": 1,
                    "accounts": 1
                  },
                  "commitments": [
                    {
                      "id": "ri-opn-acc-1",
                      "type": "r6g.large.search",
                      "region": "us-east-1",
                      "count": 1,
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "duration": 12,
                      "state": "active",
                      "payment_option": "No Upfront",
                      "commitment_price": 70.0,
                      "on_demand_price": 140.0,
                      "savings": 70.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/commitments/savings_plans/compute": {
      "get": {
        "operationId": "listComputeSavingsPlans",
        "tags": [
          "Commitments"
        ],
        "summary": "List Compute Savings Plans",
        "description": "Your Compute Savings Plans. Without a `state` filter, it returns the active, retired, and returned ones.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "payment-failed",
                  "payment-pending",
                  "pending-return",
                  "queued",
                  "queued-deleted",
                  "retired",
                  "returned"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "commitments"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/CommitmentsSummary",
                      "description": "Totals for the matching records"
                    },
                    "commitments": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SavingsPlansSavingsPlan"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching commitments"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 2,
                    "active": 2,
                    "accounts": 2
                  },
                  "commitments": [
                    {
                      "id": "sp-acc-1",
                      "service": "compute",
                      "region": "N/A",
                      "family": "N/A",
                      "commitment": 1.0,
                      "cost": 720.0,
                      "payment_option": "All Upfront",
                      "up_front_amount": "0",
                      "recurring_amount": "0",
                      "term_seconds": null,
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "state": "active",
                      "savings": 100.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "123456789012"
                    },
                    {
                      "id": "sp-mb-1",
                      "service": "compute",
                      "region": "N/A",
                      "family": "N/A",
                      "commitment": 1.0,
                      "cost": 720.0,
                      "payment_option": "All Upfront",
                      "up_front_amount": "0",
                      "recurring_amount": "0",
                      "term_seconds": null,
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "state": "active",
                      "savings": 100.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "345678901234"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/commitments/savings_plans/ec2_instance": {
      "get": {
        "operationId": "listEc2InstanceSavingsPlans",
        "tags": [
          "Commitments"
        ],
        "summary": "List EC2 Instance Savings Plans",
        "description": "Your EC2 Instance Savings Plans. Without a `state` filter, it returns the active, retired, and returned ones.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "payment-failed",
                  "payment-pending",
                  "pending-return",
                  "queued",
                  "queued-deleted",
                  "retired",
                  "returned"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "commitments"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/CommitmentsSummary",
                      "description": "Totals for the matching records"
                    },
                    "commitments": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SavingsPlansSavingsPlan"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching commitments"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "active": 1,
                    "accounts": 1
                  },
                  "commitments": [
                    {
                      "id": "sp-acc-3-ec2-instance",
                      "service": "ec2_instance",
                      "region": "us-east-1",
                      "family": "m5",
                      "commitment": 0.75,
                      "cost": 540.0,
                      "payment_option": "Partial Upfront",
                      "up_front_amount": "100",
                      "recurring_amount": "440",
                      "term_seconds": null,
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "state": "active",
                      "savings": 75.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/commitments/savings_plans/sage_maker": {
      "get": {
        "operationId": "listSagemakerSavingsPlans",
        "tags": [
          "Commitments"
        ],
        "summary": "List SageMaker Savings Plans",
        "description": "Your SageMaker Savings Plans. Without a `state` filter, it returns the active, retired, and returned ones.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "payment-failed",
                  "payment-pending",
                  "pending-return",
                  "queued",
                  "queued-deleted",
                  "retired",
                  "returned"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "commitments"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/CommitmentsSummary",
                      "description": "Totals for the matching records"
                    },
                    "commitments": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SavingsPlansSavingsPlan"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching commitments"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "active": 1,
                    "accounts": 1
                  },
                  "commitments": [
                    {
                      "id": "sp-acc-4-sage-maker",
                      "service": "sage_maker",
                      "region": "us-east-1",
                      "family": "ml.m5",
                      "commitment": 0.4,
                      "cost": 288.0,
                      "payment_option": "No Upfront",
                      "up_front_amount": "0",
                      "recurring_amount": "0",
                      "term_seconds": null,
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "state": "active",
                      "savings": 40.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/commitments/savings_plans/database": {
      "get": {
        "operationId": "listDatabaseSavingsPlans",
        "tags": [
          "Commitments"
        ],
        "summary": "List Database Savings Plans",
        "description": "Your Database Savings Plans. Without a `state` filter, it returns the active, retired, and returned ones.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "account",
            "in": "query",
            "description": "Only the records in these AWS accounts, by 12-digit account ID",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Only the records in these regions",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "Only the records in these states",
            "style": "form",
            "explode": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "payment-failed",
                  "payment-pending",
                  "pending-return",
                  "queued",
                  "queued-deleted",
                  "retired",
                  "returned"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "summary",
                    "commitments"
                  ],
                  "properties": {
                    "summary": {
                      "$ref": "#/components/schemas/CommitmentsSummary",
                      "description": "Totals for the matching records"
                    },
                    "commitments": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/SavingsPlansSavingsPlan"
                          },
                          {
                            "type": "object",
                            "required": [
                              "account_id"
                            ],
                            "properties": {
                              "account_id": {
                                "type": "string",
                                "description": "The 12-digit ID of the AWS account it belongs to"
                              }
                            }
                          }
                        ]
                      },
                      "description": "The matching commitments"
                    }
                  }
                },
                "example": {
                  "summary": {
                    "total": 1,
                    "active": 1,
                    "accounts": 1
                  },
                  "commitments": [
                    {
                      "id": "sp-acc-2-database",
                      "service": "database",
                      "region": "N/A",
                      "family": "N/A",
                      "commitment": 0.5,
                      "cost": 360.0,
                      "payment_option": "No Upfront",
                      "up_front_amount": "0",
                      "recurring_amount": "0",
                      "term_seconds": null,
                      "start_time": "2026-11-08T13:01:58.000Z",
                      "end_time": "2026-12-09T13:01:58.000Z",
                      "state": "active",
                      "savings": 50.0,
                      "managed_by": "aws",
                      "utilization_percentage": null,
                      "account_id": "123456789012"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidFilter"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/spend": {
      "get": {
        "operationId": "getSpend",
        "tags": [
          "Spend and savings"
        ],
        "summary": "Get spend",
        "description": "Your AWS spend by service and by account, for a month or a year. Pass `year` for a year, or `year` and `month` for one month. Without them, it returns the latest month with cost data.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "The year to report on",
            "example": 2026
          },
          {
            "name": "month",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 12
            },
            "description": "The month to report on, from 1 to 12. Without `year`, a month in the latest year",
            "example": 10
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "spend"
                  ],
                  "properties": {
                    "spend": {
                      "$ref": "#/components/schemas/Spend",
                      "description": "The spend"
                    }
                  }
                },
                "example": {
                  "spend": {
                    "period": {
                      "year": 2026,
                      "month": 11,
                      "label": "November 2026",
                      "granularity": "daily",
                      "in_progress": true
                    },
                    "bounds": {
                      "earliest": "2026-10",
                      "latest": "2026-11"
                    },
                    "chart": [
                      {
                        "name": "S3",
                        "points": {
                          "2026-11-07": 22.0,
                          "2026-11-08": 25.0
                        },
                        "total": 47.0
                      },
                      {
                        "name": "RDS",
                        "points": {
                          "2026-11-08": 100.0
                        },
                        "total": 100.0
                      }
                    ],
                    "snapshot": {
                      "total": 447.0,
                      "services": [
                        {
                          "name": "EC2",
                          "cost": 300.0,
                          "previous_cost": 280.0
                        },
                        {
                          "name": "RDS",
                          "cost": 100.0,
                          "previous_cost": 0
                        }
                      ]
                    },
                    "accounts": [
                      {
                        "name": "A1",
                        "account_id": "123456789012",
                        "cost": 440.75,
                        "previous_cost": 140.0
                      },
                      {
                        "name": "A2",
                        "account_id": "234567890123",
                        "cost": 250.0,
                        "previous_cost": 0
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/savings": {
      "get": {
        "operationId": "getSavings",
        "tags": [
          "Spend and savings"
        ],
        "summary": "Get savings",
        "description": "Month-to-date, monthly and lifetime savings, plus monthly savings and coverage per service.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "savings"
                  ],
                  "properties": {
                    "savings": {
                      "$ref": "#/components/schemas/Savings",
                      "description": "The savings"
                    }
                  }
                },
                "example": {
                  "savings": {
                    "month_to_date_savings": 0,
                    "monthly_savings": 0.0,
                    "lifetime_savings": 1250.0,
                    "monthly_savings_by_service": {
                      "compute": 0.0,
                      "database": 0.0
                    },
                    "coverage_percentage_by_service": {
                      "compute": 100.0,
                      "database": 100.0
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/alerts": {
      "get": {
        "operationId": "listAlerts",
        "tags": [
          "Spend and savings"
        ],
        "summary": "List alerts",
        "description": "The AWS accounts and permissions MilkStraw AI couldn't read, so you can fix its access.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "alerts"
                  ],
                  "properties": {
                    "alerts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Alert"
                      },
                      "description": "The matching alerts"
                    }
                  }
                },
                "example": {
                  "alerts": [
                    {
                      "type": "permissions",
                      "accounts": [
                        {
                          "id": "727f7a11-2e01-5bc2-88db-5a4a19220868",
                          "nickname": "A1",
                          "account_id": "123456789012",
                          "services": [
                            {
                              "service": "compute_optimizer",
                              "aspects": [
                                {
                                  "aspect": "recommendations",
                                  "permissions": [
                                    "compute-optimizer:GetIdleRecommendations"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/projects": {
      "get": {
        "operationId": "listProjects",
        "tags": [
          "Projects"
        ],
        "summary": "List projects",
        "description": "Your projects, with how many tasks each has and what they save.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "projects"
                  ],
                  "properties": {
                    "projects": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Project"
                      },
                      "description": "The matching projects"
                    }
                  }
                },
                "example": {
                  "projects": [
                    {
                      "id": "5fb4f472-04cb-532b-bf32-6a33aa4691f9",
                      "status": "open",
                      "display_name": "Project #1",
                      "tasks_count": 1,
                      "open_tasks_count": 1,
                      "monthly_savings": 0.0
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/projects/{project_id}": {
      "get": {
        "operationId": "getProject",
        "tags": [
          "Projects"
        ],
        "summary": "Get a project",
        "description": "One project with its tasks. A project that is locked, or hasn't started yet, returns `403`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The project's ID"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "project"
                  ],
                  "properties": {
                    "project": {
                      "$ref": "#/components/schemas/ProjectDetail",
                      "description": "The project"
                    }
                  }
                },
                "example": {
                  "project": {
                    "id": "5fb4f472-04cb-532b-bf32-6a33aa4691f9",
                    "status": "open",
                    "display_name": "Project #1",
                    "tasks_count": 1,
                    "open_tasks_count": 1,
                    "monthly_savings": 0.0,
                    "tasks": [
                      {
                        "id": "a05b8732-3ec1-537b-ad3b-e2e632bd94ed",
                        "number": 1,
                        "status": "todo",
                        "resource_uid": "i-0fixture0000000001",
                        "title": "Rightsize EC2 instance i-0fixture0000000001",
                        "categories": [
                          "cost"
                        ],
                        "risk": "medium",
                        "last_detected_at": null,
                        "confidence": "medium",
                        "reversible": true,
                        "source": "aws",
                        "project": {
                          "id": "5fb4f472-04cb-532b-bf32-6a33aa4691f9",
                          "display_name": "Project #1",
                          "completed": false
                        },
                        "monthly_savings": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/projects/{project_id}/tasks/{task_id}": {
      "get": {
        "operationId": "getTask",
        "tags": [
          "Projects"
        ],
        "summary": "Get a task",
        "description": "One task with its resource details, instructions, and activity.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "project_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The project's ID"
          },
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The task's ID"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "task"
                  ],
                  "properties": {
                    "task": {
                      "$ref": "#/components/schemas/TaskDetail",
                      "description": "The task"
                    }
                  }
                },
                "example": {
                  "task": {
                    "id": "a05b8732-3ec1-537b-ad3b-e2e632bd94ed",
                    "number": 1,
                    "status": "todo",
                    "resource_uid": "i-0fixture0000000001",
                    "title": "Rightsize EC2 instance i-0fixture0000000001",
                    "categories": [
                      "cost"
                    ],
                    "risk": "medium",
                    "last_detected_at": null,
                    "confidence": "medium",
                    "reversible": true,
                    "source": "aws",
                    "project": {
                      "id": "5fb4f472-04cb-532b-bf32-6a33aa4691f9",
                      "display_name": "Project #1",
                      "completed": false
                    },
                    "monthly_savings": null,
                    "details": {
                      "region": "us-east-1"
                    },
                    "templates": {
                      "content": "Instance i-0fixture0000000001 is over-provisioned."
                    },
                    "activities": [
                      {
                        "action": "opened",
                        "created_at": "2026-11-08T13:01:58.000Z",
                        "actor": null
                      }
                    ]
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/bills": {
      "get": {
        "operationId": "listBills",
        "tags": [
          "Billing"
        ],
        "summary": "List bills",
        "description": "Your MilkStraw AI bills, newest first.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "bills"
                  ],
                  "properties": {
                    "bills": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Bill"
                      },
                      "description": "The matching bills"
                    }
                  }
                },
                "example": {
                  "bills": [
                    {
                      "id": "2aadf788-af46-4156-b18a-9749e551af08",
                      "created_at": "2026-11-09T13:01:59.451Z",
                      "savings_amount": 1250.0,
                      "fee_amount": 250.0,
                      "status": "processed",
                      "receipt_url": "https://pay.stripe.com/receipts/example",
                      "invoice_available": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/bills/{bill_id}": {
      "get": {
        "operationId": "getBill",
        "tags": [
          "Billing"
        ],
        "summary": "Get a bill",
        "description": "One bill, with the commitments behind its savings.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "bill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The bill's ID"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "bill"
                  ],
                  "properties": {
                    "bill": {
                      "$ref": "#/components/schemas/BillDetail",
                      "description": "The bill"
                    }
                  }
                },
                "example": {
                  "bill": {
                    "id": "2aadf788-af46-4156-b18a-9749e551af08",
                    "created_at": "2026-11-09T13:01:59.451Z",
                    "savings_amount": 1250.0,
                    "fee_amount": 250.0,
                    "status": "processed",
                    "receipt_url": "https://pay.stripe.com/receipts/example",
                    "invoice_available": true,
                    "data": {
                      "reservations_utilization": [
                        {
                          "id": "ri-0f3c2a9b",
                          "type": "m6g.large",
                          "service": "ec2",
                          "count": 4,
                          "platform": "Linux/UNIX",
                          "region": "us-east-1",
                          "original_price": 4204.8,
                          "utilization_percentage": 98.6,
                          "actual_savings": 1640.2
                        }
                      ],
                      "savings_plans_utilization": [
                        {
                          "id": "sp-7d1e4c22",
                          "service": "compute",
                          "original_price": 2100.0,
                          "utilization_percentage": 100.0,
                          "actual_savings": 610.0
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/organizations/{organization_id}/bills/{bill_id}/invoice": {
      "get": {
        "operationId": "getBillInvoice",
        "tags": [
          "Billing"
        ],
        "summary": "Download an invoice",
        "description": "The bill's invoice as a PDF. A bill without an invoice yet returns `404`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/organization_id"
          },
          {
            "name": "bill_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "The bill's ID"
          }
        ],
        "responses": {
          "200": {
            "description": "The invoice",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your organization's API key (`msk_…`)."
      }
    },
    "parameters": {
      "organization_id": {
        "name": "organization_id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "description": "The organization's ID, from the organizations list"
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "The key is missing, expired, or revoked",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "unauthorized",
              "message": "Invalid or expired token"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key can't read this, like a locked project",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "forbidden",
              "message": "You do not have access to this resource"
            }
          }
        }
      },
      "NotFound": {
        "description": "The organization or record doesn't exist, or isn't yours",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "not_found",
              "message": "Not found"
            }
          }
        }
      },
      "InvalidFilter": {
        "description": "A filter value is unknown, or a required parameter is missing",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "invalid_filter",
              "message": "role must be one of data, master, warm"
            }
          }
        }
      },
      "RateLimited": {
        "description": "The key made more than 60 requests in a minute",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "rate_limited",
              "message": "Too many requests"
            }
          }
        }
      }
    },
    "schemas": {
      "Account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The account's MilkStraw AI ID"
          },
          "nickname": {
            "type": "string",
            "description": "The account's name in AWS Organizations"
          },
          "account_id": {
            "type": "string",
            "description": "The 12-digit AWS account ID"
          },
          "access": {
            "type": "string",
            "enum": [
              "denied",
              "granted",
              "suspended",
              "closed"
            ],
            "description": "Whether MilkStraw AI can read the account"
          }
        },
        "required": [
          "id",
          "nickname",
          "account_id",
          "access"
        ]
      },
      "Activity": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "opened",
              "moved",
              "solved",
              "discarded",
              "undiscarded",
              "reopened",
              "cloned",
              "archived",
              "unarchived",
              "re_evaluated"
            ],
            "description": "What happened"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When it happened"
          },
          "actor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The member who did it, or null when MilkStraw AI did"
          }
        },
        "required": [
          "action",
          "created_at",
          "actor"
        ]
      },
      "Alert": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "What went wrong: sts (the role could not be assumed), permissions (the role lacks permissions), or cost_explorer_enrollment (Cost Explorer is off)"
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertAccount"
            }
          }
        },
        "required": [
          "type",
          "accounts"
        ]
      },
      "AlertAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The account's MilkStraw AI ID"
          },
          "nickname": {
            "type": "string",
            "description": "The account's name in AWS Organizations"
          },
          "account_id": {
            "type": "string",
            "description": "The 12-digit AWS account ID"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertService"
            }
          }
        },
        "required": [
          "id",
          "nickname",
          "account_id",
          "services"
        ]
      },
      "AlertAspect": {
        "type": "object",
        "properties": {
          "aspect": {
            "type": "string",
            "description": "What MilkStraw AI could not read, like on_demand_instances"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The IAM actions AWS denied, like ecr:DescribeRepositories"
          }
        },
        "required": [
          "aspect",
          "permissions"
        ]
      },
      "AlertService": {
        "type": "object",
        "properties": {
          "service": {
            "type": "string",
            "description": "The AWS service, like ec2"
          },
          "aspects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AlertAspect"
            }
          }
        },
        "required": [
          "service",
          "aspects"
        ]
      },
      "Bill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The bill's ID"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the bill was issued"
          },
          "savings_amount": {
            "type": "number",
            "description": "The savings the bill charges a fee on, in USD"
          },
          "fee_amount": {
            "type": "number",
            "description": "MilkStraw AI's fee, in USD"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_admin_review",
              "admin_approved",
              "processed",
              "failed",
              "action_required"
            ],
            "description": "Where the bill is in payment"
          },
          "receipt_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Stripe receipt, once there's one"
          },
          "invoice_available": {
            "type": "boolean",
            "description": "Whether the invoice PDF can be downloaded"
          }
        },
        "required": [
          "id",
          "created_at",
          "savings_amount",
          "fee_amount",
          "status",
          "receipt_url",
          "invoice_available"
        ]
      },
      "BillDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The bill's ID"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the bill was issued"
          },
          "savings_amount": {
            "type": "number",
            "description": "The savings the bill charges a fee on, in USD"
          },
          "fee_amount": {
            "type": "number",
            "description": "MilkStraw AI's fee, in USD"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending_admin_review",
              "admin_approved",
              "processed",
              "failed",
              "action_required"
            ],
            "description": "Where the bill is in payment"
          },
          "receipt_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Stripe receipt, once there's one"
          },
          "invoice_available": {
            "type": "boolean",
            "description": "Whether the invoice PDF can be downloaded"
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BillLines"
              },
              {
                "type": "null"
              }
            ],
            "description": "The commitments behind the savings, line by line"
          }
        },
        "required": [
          "id",
          "created_at",
          "savings_amount",
          "fee_amount",
          "status",
          "receipt_url",
          "invoice_available",
          "data"
        ]
      },
      "BillLines": {
        "type": "object",
        "description": "The bill's utilization lines",
        "properties": {
          "reservations_utilization": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReservationLine"
            }
          },
          "savings_plans_utilization": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SavingsPlanLine"
            }
          }
        }
      },
      "CommitmentsSummary": {
        "type": "object",
        "required": [
          "total",
          "active",
          "accounts"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "description": "How many commitments match"
          },
          "active": {
            "type": "integer",
            "description": "How many of them are active"
          },
          "accounts": {
            "type": "integer",
            "description": "How many accounts they span"
          }
        }
      },
      "Ec2EbsVolume": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique EBS volume identifier"
          },
          "type": {
            "type": "string",
            "enum": [
              "gp2",
              "gp3",
              "io1",
              "io2",
              "sc1",
              "st1",
              "standard"
            ],
            "description": "Volume type"
          },
          "region": {
            "type": "string",
            "enum": [
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-northeast-1",
              "ap-northeast-2",
              "ap-northeast-3",
              "ap-south-1",
              "ap-south-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-central-1",
              "ca-west-1",
              "eu-central-1",
              "eu-central-2",
              "eu-north-1",
              "eu-south-1",
              "eu-south-2",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "il-central-1",
              "me-central-1",
              "me-south-1",
              "mx-central-1",
              "sa-east-1",
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "cn-north-1",
              "cn-northwest-1",
              "us-gov-east-1",
              "us-gov-west-1",
              "afs1-los1-az1",
              "apne1-tpe1-az1",
              "aps1-ccu1-az1",
              "aps1-del1-az1",
              "apse1-bkk1-az1",
              "apse1-mnl1-az1",
              "apse2-akl1-az1",
              "apse2-per1-az1",
              "euc1-ham1-az1",
              "euc1-waw1-az1",
              "eun1-cph1-az1",
              "eun1-hel1-az1",
              "mes1-mct1-az1",
              "use1-atl2-az1",
              "use1-bos1-az1",
              "use1-bue1-az1",
              "use1-chi2-az1",
              "use1-dfw2-az1",
              "use1-iah2-az1",
              "use1-lim1-az1",
              "use1-mci1-az1",
              "use1-mia2-az1",
              "use1-msp1-az1",
              "use1-nyc2-az1",
              "use1-phl1-az1",
              "use1-qro1-az1",
              "use1-scl1-az1",
              "usw2-den1-az1",
              "usw2-hnl1-az1",
              "usw2-las1-az1",
              "usw2-lax1-az1",
              "usw2-lax1-az2",
              "usw2-pdx1-az1",
              "usw2-phx2-az1",
              "usw2-sea1-az1",
              "apne1-wl1-kix-wlz1",
              "apne1-wl1-nrt-wlz1",
              "cac1-wl1-yto-wlz1",
              "euw2-wl2-man-wlz1",
              "euw3-cmn1-wlz1",
              "euw3-dss1-wlz1",
              "use1-wl1-atl-wlz1",
              "use1-wl1-bna-wlz1",
              "use1-wl1-bos-wlz1",
              "use1-wl1-chi-wlz1",
              "use1-wl1-clt-wlz1",
              "use1-wl1-dfw-wlz1",
              "use1-wl1-dtw-wlz1",
              "use1-wl1-iah-wlz1",
              "use1-wl1-mia-wlz1",
              "use1-wl1-msp-wlz1",
              "use1-wl1-nyc-wlz1",
              "use1-wl1-tpa-wlz1",
              "use1-wl1-was-wlz1",
              "usw2-wl1-den-wlz1",
              "usw2-wl1-las-wlz1",
              "usw2-wl1-lax-wlz1",
              "usw2-wl1-phx-wlz1",
              "usw2-wl1-sea-wlz1",
              "usw2-wl1-sfo-wlz1"
            ],
            "description": "AWS region where the volume is located"
          },
          "size": {
            "type": "number",
            "description": "Volume size in gigabytes (GB)"
          },
          "encrypted": {
            "type": "boolean",
            "description": "Whether the volume is encrypted"
          },
          "state": {
            "type": "string",
            "enum": [
              "available",
              "creating",
              "deleted",
              "deleting",
              "error",
              "in-use"
            ],
            "description": "Current state of the volume"
          },
          "launch_time": {
            "type": "string",
            "description": "When the volume was created (ISO 8601)"
          },
          "iops": {
            "type": "number",
            "description": "Provisioned IOPS (Input/Output Operations Per Second)"
          },
          "throughput": {
            "type": "number",
            "description": "Throughput performance in MB/s"
          },
          "outdated": {
            "type": "boolean",
            "description": "Whether the volume type is outdated and upgradable"
          },
          "price": {
            "type": "number",
            "description": "Monthly cost of the volume"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs assigned to the volume"
          }
        },
        "required": [
          "id",
          "type",
          "region",
          "size",
          "encrypted",
          "state",
          "launch_time",
          "iops",
          "throughput",
          "outdated",
          "price",
          "tags"
        ]
      },
      "Ec2OnDemandInstance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique EC2 instance identifier"
          },
          "type": {
            "type": "string",
            "description": "EC2 instance type"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the instance is located"
          },
          "platform": {
            "type": "string",
            "description": "Operating system platform"
          },
          "launch_time": {
            "type": "string",
            "description": "When the instance last started (ISO 8601); AWS resets it at each stop and start, so it is not the creation date"
          },
          "lifecycle": {
            "type": "string",
            "enum": [
              "capacity-block",
              "reserved",
              "scheduled",
              "spot",
              "standard"
            ],
            "description": "Instance lifecycle type"
          },
          "monitoring": {
            "type": "string",
            "enum": [
              "disabled",
              "disabling",
              "enabled",
              "pending"
            ],
            "description": "CloudWatch detailed monitoring status"
          },
          "outdated": {
            "type": "boolean",
            "description": "Whether the instance type belongs to a previous-generation family superseded by newer generations"
          },
          "managed_by": {
            "type": "string",
            "enum": [
              "autoscaling",
              "ecs",
              "eks",
              "elasticbeanstalk",
              "standalone"
            ],
            "description": "Management method"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "running",
              "shutting-down",
              "stopped",
              "stopping",
              "terminated"
            ],
            "description": "Current state of the instance"
          },
          "price": {
            "type": "number",
            "description": "Cost of a full month (730 hours) at the on-demand list price, or the latest spot price for a spot instance. It ignores the state and the hours it ran, so a stopped instance still shows a full month"
          },
          "ri_coverage_percentage": {
            "type": "number",
            "description": "How much of its usage Reserved Instances covered so far this month, from 0 to 100. AWS reports coverage about 2 days late, so 0 can also mean it has not reported yet"
          },
          "sp_coverage_percentage": {
            "type": "number",
            "description": "How much of its usage Savings Plans covered so far this month, from 0 to 100. AWS reports coverage about 2 days late, so 0 can also mean it has not reported yet"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs assigned to the instance"
          }
        },
        "required": [
          "id",
          "type",
          "region",
          "platform",
          "launch_time",
          "lifecycle",
          "monitoring",
          "outdated",
          "managed_by",
          "state",
          "price",
          "ri_coverage_percentage",
          "sp_coverage_percentage",
          "tags"
        ]
      },
      "Ec2ReservedInstance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the reserved instance"
          },
          "type": {
            "type": "string",
            "description": "EC2 instance type"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the instances are reserved"
          },
          "count": {
            "type": "number",
            "description": "Number of reserved instances"
          },
          "platform": {
            "type": "string",
            "description": "Operating system platform"
          },
          "start_time": {
            "type": "string",
            "description": "Start date of the reservation (ISO 8601)"
          },
          "end_time": {
            "type": "string",
            "description": "Expiration date of the reservation (ISO 8601)"
          },
          "duration": {
            "type": "number",
            "description": "Length of the reservation period in months"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "payment-failed",
              "payment-pending",
              "queued",
              "queued-deleted",
              "retired"
            ],
            "description": "Current state of the reservation"
          },
          "payment_option": {
            "type": "string",
            "description": "Payment structure"
          },
          "offering_class": {
            "type": "string",
            "enum": [
              "convertible",
              "standard"
            ],
            "description": "Offering class type"
          },
          "commitment_price": {
            "type": "number",
            "description": "Monthly cost with the reservation, per reserved instance"
          },
          "on_demand_price": {
            "type": "number",
            "description": "What one reserved instance would cost a month at the on-demand list price, not based on usage"
          },
          "savings": {
            "type": "number",
            "description": "Expected monthly savings for the whole reservation: (on_demand_price - commitment_price) x count"
          },
          "managed_by": {
            "type": "string",
            "enum": [
              "aws",
              "milkstraw"
            ],
            "description": "Who manages it: aws for a commitment you bought, milkstraw for one MilkStraw AI provides"
          },
          "utilization_percentage": {
            "type": [
              "number",
              "null"
            ],
            "description": "How much of the commitment was used so far this month, from 0 to 100; null until AWS reports it, about 2 days late"
          }
        },
        "required": [
          "id",
          "type",
          "region",
          "count",
          "platform",
          "start_time",
          "end_time",
          "duration",
          "state",
          "payment_option",
          "offering_class",
          "commitment_price",
          "on_demand_price",
          "savings",
          "managed_by",
          "utilization_percentage"
        ]
      },
      "EksCluster": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Cluster name"
          },
          "arn": {
            "type": "string",
            "description": "AWS Amazon Resource Name (ARN) for the cluster"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the cluster is located"
          },
          "version": {
            "type": "string",
            "description": "Kubernetes version running on the cluster"
          },
          "platform_version": {
            "type": "string",
            "description": "EKS platform version"
          },
          "status": {
            "type": "string",
            "description": "Current status of the cluster"
          },
          "endpoint": {
            "type": "string",
            "description": "Kubernetes API server endpoint"
          },
          "price": {
            "type": "number",
            "description": "Estimated monthly control plane cost"
          },
          "created_at": {
            "type": "string",
            "description": "When the cluster was created (ISO 8601)"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs assigned to the cluster"
          },
          "support_status": {
            "type": "string",
            "enum": [
              "standard",
              "extended",
              "unsupported"
            ],
            "description": "Version support: standard, extended (AWS charges for Extended Support, ESS), or unsupported (retired)"
          },
          "node_groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EksNodeGroup"
            }
          }
        },
        "required": [
          "id",
          "arn",
          "region",
          "version",
          "platform_version",
          "status",
          "endpoint",
          "price",
          "created_at",
          "tags",
          "support_status",
          "node_groups"
        ]
      },
      "EksNodeGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Node group name"
          },
          "arn": {
            "type": "string",
            "description": "AWS Amazon Resource Name (ARN) for the node group"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the node group is located"
          },
          "version": {
            "type": "string",
            "description": "Kubernetes version running on the node group"
          },
          "status": {
            "type": "string",
            "description": "Current status of the node group"
          },
          "capacity_type": {
            "type": "string",
            "description": "Capacity type (ON_DEMAND, SPOT, CAPACITY_BLOCK)"
          },
          "ami_type": {
            "type": "string",
            "description": "AMI type used by the node group"
          },
          "instance_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "EC2 instance types configured for the node group"
          },
          "disk_size": {
            "type": "number",
            "description": "Disk size in GiB for worker nodes"
          },
          "scaling_min": {
            "type": "number",
            "description": "Minimum number of nodes"
          },
          "scaling_max": {
            "type": "number",
            "description": "Maximum number of nodes"
          },
          "scaling_desired": {
            "type": "number",
            "description": "Desired number of nodes"
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Kubernetes labels assigned to nodes"
          },
          "auto_scaling_group_names": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Auto Scaling groups EKS built for this node group"
          },
          "outdated": {
            "type": "boolean",
            "description": "True when at least one type in instance_types is previous-generation; the other types can be current"
          },
          "price": {
            "type": "number",
            "description": "Estimated monthly cost"
          },
          "created_at": {
            "type": "string",
            "description": "When the node group was created (ISO 8601)"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs assigned to the node group"
          }
        },
        "required": [
          "id",
          "arn",
          "region",
          "version",
          "status",
          "capacity_type",
          "ami_type",
          "instance_types",
          "disk_size",
          "scaling_min",
          "scaling_max",
          "scaling_desired",
          "labels",
          "auto_scaling_group_names",
          "outdated",
          "price",
          "created_at",
          "tags"
        ]
      },
      "ElasticacheOnDemandCluster": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ElastiCache cluster identifier"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the cluster is located"
          },
          "type": {
            "type": "string",
            "description": "Cache node instance type"
          },
          "platform": {
            "type": "string",
            "description": "Cache engine type"
          },
          "nodes_count": {
            "type": "number",
            "description": "Number of cache nodes in the cluster"
          },
          "launch_time": {
            "type": "string",
            "description": "When the cluster was created (ISO 8601)"
          },
          "transit_encryption_enabled": {
            "type": "boolean",
            "description": "Whether transit encryption is enabled"
          },
          "at_rest_encryption_enabled": {
            "type": "boolean",
            "description": "Whether at-rest encryption is enabled"
          },
          "state": {
            "type": "string",
            "description": "Current state of the cluster"
          },
          "outdated": {
            "type": "boolean",
            "description": "Whether the instance type is outdated"
          },
          "price": {
            "type": "number",
            "description": "Price for a full month (730 hours) at the on-demand list rate, for all nodes; ignores the hours actually run"
          },
          "ri_coverage_percentage": {
            "type": "number",
            "description": "How much of its usage Reserved Instances covered so far this month, from 0 to 100. AWS reports coverage about 2 days late, so 0 can also mean it has not reported yet"
          },
          "sp_coverage_percentage": {
            "type": "number",
            "description": "How much of its usage Savings Plans covered so far this month, from 0 to 100. AWS reports coverage about 2 days late, so 0 can also mean it has not reported yet"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs assigned to the cluster"
          }
        },
        "required": [
          "id",
          "region",
          "type",
          "platform",
          "nodes_count",
          "launch_time",
          "transit_encryption_enabled",
          "at_rest_encryption_enabled",
          "state",
          "outdated",
          "price",
          "ri_coverage_percentage",
          "sp_coverage_percentage",
          "tags"
        ]
      },
      "ElasticacheReservedInstance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the reserved instance"
          },
          "type": {
            "type": "string",
            "description": "Cache node instance type"
          },
          "platform": {
            "type": "string",
            "description": "Cache engine type (e.g., redis, memcached, valkey)"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the instances are reserved"
          },
          "count": {
            "type": "number",
            "description": "Number of reserved instances"
          },
          "start_time": {
            "type": "string",
            "description": "Start date of the reservation (ISO 8601)"
          },
          "end_time": {
            "type": "string",
            "description": "Expiration date of the reservation (ISO 8601)"
          },
          "duration": {
            "type": "number",
            "description": "Length of the reservation period in months"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "payment-failed",
              "payment-pending",
              "queued",
              "queued-deleted",
              "retired"
            ],
            "description": "Current state of the reservation"
          },
          "payment_option": {
            "type": "string",
            "description": "Payment structure"
          },
          "commitment_price": {
            "type": "number",
            "description": "Monthly cost with the reservation, per reserved instance"
          },
          "on_demand_price": {
            "type": "number",
            "description": "What one reserved instance would cost a month at the on-demand list price, not based on usage"
          },
          "savings": {
            "type": "number",
            "description": "Expected monthly savings for the whole reservation: (on_demand_price - commitment_price) x count"
          },
          "managed_by": {
            "type": "string",
            "enum": [
              "aws",
              "milkstraw"
            ],
            "description": "Who manages it: aws for a commitment you bought, milkstraw for one MilkStraw AI provides"
          },
          "utilization_percentage": {
            "type": [
              "number",
              "null"
            ],
            "description": "How much of the commitment was used so far this month, from 0 to 100; null until AWS reports it, about 2 days late"
          }
        },
        "required": [
          "id",
          "type",
          "platform",
          "region",
          "count",
          "start_time",
          "end_time",
          "duration",
          "state",
          "payment_option",
          "commitment_price",
          "on_demand_price",
          "savings",
          "managed_by",
          "utilization_percentage"
        ]
      },
      "Error": {
        "type": "object",
        "required": [
          "error",
          "message"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "A code that names the error"
          },
          "message": {
            "type": "string",
            "description": "What went wrong, for a person to read"
          }
        }
      },
      "InventorySummary": {
        "type": "object",
        "required": [
          "total",
          "accounts",
          "regions"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "description": "How many records match"
          },
          "accounts": {
            "type": "integer",
            "description": "How many accounts they span"
          },
          "regions": {
            "type": "integer",
            "description": "How many regions they span"
          }
        }
      },
      "MetricDatapoint": {
        "type": "object",
        "required": [
          "timestamp",
          "value"
        ],
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "The start of the hour"
          },
          "value": {
            "type": "number",
            "description": "The average CPU utilization in that hour, from 0 to 100"
          }
        }
      },
      "NestedInventorySummary": {
        "type": "object",
        "required": [
          "total",
          "clusters",
          "accounts",
          "regions"
        ],
        "properties": {
          "total": {
            "type": "integer",
            "description": "How many records match"
          },
          "clusters": {
            "type": "integer",
            "description": "How many clusters they span"
          },
          "accounts": {
            "type": "integer",
            "description": "How many accounts they span"
          },
          "regions": {
            "type": "integer",
            "description": "How many regions they span"
          }
        }
      },
      "OpensearchOnDemandCluster": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique cluster identifier in format account_id/domain_name"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the cluster is located"
          },
          "data_nodes_type": {
            "type": "string",
            "description": "Instance type for data nodes"
          },
          "data_nodes_count": {
            "type": "number",
            "description": "Number of data nodes in the cluster"
          },
          "master_nodes_type": {
            "type": "string",
            "description": "Instance type for dedicated master nodes"
          },
          "master_nodes_count": {
            "type": "number",
            "description": "Number of dedicated master nodes"
          },
          "warm_nodes_type": {
            "type": "string",
            "description": "Instance type for warm storage nodes, or \"N/A\" if not used"
          },
          "warm_nodes_count": {
            "type": "number",
            "description": "Number of warm storage nodes in the cluster"
          },
          "platform": {
            "type": "string",
            "description": "Search engine platform (e.g., Elasticsearch, OpenSearch)"
          },
          "platform_version": {
            "type": "string",
            "description": "Search engine version (e.g., 2.13)"
          },
          "at_rest_encryption_enabled": {
            "type": "boolean",
            "description": "Whether at-rest encryption is enabled"
          },
          "node_to_node_encryption_enabled": {
            "type": "boolean",
            "description": "Whether node-to-node encryption is enabled"
          },
          "multi_az": {
            "type": "boolean",
            "description": "Whether Multi-AZ deployment is enabled"
          },
          "price": {
            "type": "number",
            "description": "Price for a full month (730 hours) at the on-demand list rate, for all data, master and warm nodes; ignores the hours actually run"
          },
          "ri_coverage_percentage": {
            "type": "number",
            "description": "How much of its usage Reserved Instances covered so far this month, from 0 to 100. AWS reports coverage about 2 days late, so 0 can also mean it has not reported yet"
          },
          "sp_coverage_percentage": {
            "type": "number",
            "description": "How much of its usage Savings Plans covered so far this month, from 0 to 100. AWS reports coverage about 2 days late, so 0 can also mean it has not reported yet"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs assigned to the domain"
          },
          "support_status": {
            "type": "string",
            "enum": [
              "standard",
              "extended",
              "unsupported"
            ],
            "description": "Version support: standard, extended (AWS charges for Extended Support, ESS), or unsupported (retired)"
          }
        },
        "required": [
          "id",
          "region",
          "data_nodes_type",
          "data_nodes_count",
          "master_nodes_type",
          "master_nodes_count",
          "warm_nodes_type",
          "warm_nodes_count",
          "platform",
          "platform_version",
          "at_rest_encryption_enabled",
          "node_to_node_encryption_enabled",
          "multi_az",
          "price",
          "ri_coverage_percentage",
          "sp_coverage_percentage",
          "tags",
          "support_status"
        ]
      },
      "OpensearchOnDemandNode": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Node identifier"
          },
          "role": {
            "type": "string",
            "description": "Node role: data, master, or ultrawarm"
          },
          "availability_zone": {
            "type": "string",
            "description": "Availability zone that holds the node"
          },
          "type": {
            "type": "string",
            "description": "Instance type of the node, for example r6g.large.search"
          },
          "status": {
            "type": "string",
            "description": "Node status: active, standby, or notavailable"
          },
          "storage_type": {
            "type": "string",
            "description": "Storage backing: instance or ebs"
          },
          "storage_volume_type": {
            "type": "string",
            "description": "EBS volume type, empty for instance storage"
          },
          "storage_size": {
            "type": "string",
            "description": "Storage size attached to the node"
          },
          "price": {
            "type": "number",
            "description": "Estimated monthly cost of this node"
          }
        },
        "required": [
          "id",
          "role",
          "availability_zone",
          "type",
          "status",
          "storage_type",
          "storage_volume_type",
          "storage_size",
          "price"
        ]
      },
      "OpensearchReservedInstance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the reserved instance"
          },
          "type": {
            "type": "string",
            "description": "OpenSearch instance type"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the instances are reserved"
          },
          "count": {
            "type": "number",
            "description": "Number of reserved instances"
          },
          "start_time": {
            "type": "string",
            "description": "Start date of the reservation (ISO 8601)"
          },
          "end_time": {
            "type": "string",
            "description": "Expiration date of the reservation (ISO 8601)"
          },
          "duration": {
            "type": "number",
            "description": "Length of the reservation period in months"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "payment-failed",
              "payment-pending",
              "queued",
              "queued-deleted",
              "retired"
            ],
            "description": "Current state of the reservation"
          },
          "payment_option": {
            "type": "string",
            "description": "Payment structure"
          },
          "commitment_price": {
            "type": "number",
            "description": "Monthly cost with the reservation, per reserved instance"
          },
          "on_demand_price": {
            "type": "number",
            "description": "What one reserved instance would cost a month at the on-demand list price, not based on usage"
          },
          "savings": {
            "type": "number",
            "description": "Expected monthly savings for the whole reservation: (on_demand_price - commitment_price) x count"
          },
          "managed_by": {
            "type": "string",
            "enum": [
              "aws",
              "milkstraw"
            ],
            "description": "Who manages it: aws for a commitment you bought, milkstraw for one MilkStraw AI provides"
          },
          "utilization_percentage": {
            "type": [
              "number",
              "null"
            ],
            "description": "How much of the commitment was used so far this month, from 0 to 100; null until AWS reports it, about 2 days late"
          }
        },
        "required": [
          "id",
          "type",
          "region",
          "count",
          "start_time",
          "end_time",
          "duration",
          "state",
          "payment_option",
          "commitment_price",
          "on_demand_price",
          "savings",
          "managed_by",
          "utilization_percentage"
        ]
      },
      "Organization": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The organization's ID, used in every path under it"
          },
          "name": {
            "type": "string",
            "description": "The organization's name"
          },
          "onboarding": {
            "type": "string",
            "enum": [
              "pending",
              "complete",
              "outdated",
              "hidden"
            ],
            "description": "How far the organization is through connecting its AWS accounts"
          },
          "management_account": {
            "$ref": "#/components/schemas/Account",
            "description": "The AWS Organizations management account, once it is connected"
          }
        },
        "required": [
          "id",
          "name",
          "onboarding"
        ]
      },
      "OrganizationDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The organization's ID, used in every path under it"
          },
          "name": {
            "type": "string",
            "description": "The organization's name"
          },
          "onboarding": {
            "type": "string",
            "enum": [
              "pending",
              "complete",
              "outdated",
              "hidden"
            ],
            "description": "How far the organization is through connecting its AWS accounts"
          },
          "management_account": {
            "$ref": "#/components/schemas/Account",
            "description": "The AWS Organizations management account, once it is connected"
          },
          "external_id": {
            "type": "string",
            "description": "The external ID MilkStraw AI passes when it assumes the role in your accounts"
          },
          "role_name": {
            "type": "string",
            "description": "The IAM role MilkStraw AI assumes in your accounts"
          },
          "root_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The root ID of your AWS organization, once the management account is connected"
          },
          "stacks": {
            "$ref": "#/components/schemas/OrganizationStacks",
            "description": "The CloudFormation stacks deployed for MilkStraw AI, with their versions"
          },
          "last_scanned_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When MilkStraw AI last read your AWS data"
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            },
            "description": "The organization's AWS accounts"
          }
        },
        "required": [
          "id",
          "name",
          "onboarding",
          "external_id",
          "role_name",
          "root_id",
          "stacks",
          "last_scanned_at",
          "accounts"
        ]
      },
      "OrganizationStacks": {
        "type": "object",
        "description": "The CloudFormation stacks deployed for MilkStraw AI",
        "properties": {
          "management_stack": {
            "$ref": "#/components/schemas/Stack",
            "description": "The stack in the management account"
          },
          "stackset": {
            "$ref": "#/components/schemas/Stack",
            "description": "The StackSet that reaches the member accounts"
          }
        }
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The project's ID"
          },
          "status": {
            "type": "string",
            "enum": [
              "upcoming",
              "open",
              "completed"
            ],
            "description": "Whether the project is upcoming, open, or completed"
          },
          "display_name": {
            "type": "string",
            "description": "The project's name, like Project #3"
          },
          "tasks_count": {
            "type": "integer",
            "description": "How many tasks the project has"
          },
          "open_tasks_count": {
            "type": "integer",
            "description": "How many of its tasks are still open"
          },
          "monthly_savings": {
            "type": "number",
            "description": "The monthly savings of the project's cost tasks, in USD"
          }
        },
        "required": [
          "id",
          "status",
          "display_name",
          "tasks_count",
          "open_tasks_count",
          "monthly_savings"
        ]
      },
      "ProjectDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The project's ID"
          },
          "status": {
            "type": "string",
            "enum": [
              "upcoming",
              "open",
              "completed"
            ],
            "description": "Whether the project is upcoming, open, or completed"
          },
          "display_name": {
            "type": "string",
            "description": "The project's name, like Project #3"
          },
          "tasks_count": {
            "type": "integer",
            "description": "How many tasks the project has"
          },
          "open_tasks_count": {
            "type": "integer",
            "description": "How many of its tasks are still open"
          },
          "monthly_savings": {
            "type": "number",
            "description": "The monthly savings of the project's cost tasks, in USD"
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            },
            "description": "The project's tasks, by number"
          }
        },
        "required": [
          "id",
          "status",
          "display_name",
          "tasks_count",
          "open_tasks_count",
          "monthly_savings",
          "tasks"
        ]
      },
      "RdsOnDemandInstance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique RDS database instance identifier"
          },
          "type": {
            "type": "string",
            "description": "RDS instance type"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the instance is located"
          },
          "platform": {
            "type": "string",
            "description": "Database engine type"
          },
          "platform_version": {
            "type": "string",
            "description": "Database engine version"
          },
          "multi_az": {
            "type": "boolean",
            "description": "Whether Multi-AZ deployment is enabled"
          },
          "aurora_io": {
            "type": "boolean",
            "description": "Whether Aurora I/O-Optimized is enabled"
          },
          "launch_time": {
            "type": "string",
            "description": "When the instance was created (ISO 8601)"
          },
          "outdated": {
            "type": "boolean",
            "description": "Whether the instance type is outdated"
          },
          "performance_insights_enabled": {
            "type": "boolean",
            "description": "Whether Performance Insights is enabled"
          },
          "encrypted": {
            "type": "boolean",
            "description": "Whether the database is encrypted"
          },
          "price": {
            "type": "number",
            "description": "Price for a full month (730 hours) at the on-demand list rate; ignores the hours actually run"
          },
          "ri_coverage_percentage": {
            "type": "number",
            "description": "How much of its usage Reserved Instances covered so far this month, from 0 to 100. AWS reports coverage about 2 days late, so 0 can also mean it has not reported yet"
          },
          "sp_coverage_percentage": {
            "type": "number",
            "description": "How much of its usage Savings Plans covered so far this month, from 0 to 100. AWS reports coverage about 2 days late, so 0 can also mean it has not reported yet"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Key-value pairs assigned to the instance"
          },
          "support_status": {
            "type": "string",
            "enum": [
              "standard",
              "extended",
              "unsupported"
            ],
            "description": "Version support: standard, extended (AWS charges for Extended Support, ESS), or unsupported (retired)"
          }
        },
        "required": [
          "id",
          "type",
          "region",
          "platform",
          "platform_version",
          "multi_az",
          "aurora_io",
          "launch_time",
          "outdated",
          "performance_insights_enabled",
          "encrypted",
          "price",
          "ri_coverage_percentage",
          "sp_coverage_percentage",
          "tags",
          "support_status"
        ]
      },
      "RdsReservedInstance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the reserved instance"
          },
          "type": {
            "type": "string",
            "description": "RDS instance type"
          },
          "platform": {
            "type": "string",
            "description": "Database engine type"
          },
          "region": {
            "type": "string",
            "enum": [
              "us-east-1",
              "us-east-2",
              "us-west-1",
              "us-west-2",
              "ap-south-1",
              "ap-northeast-3",
              "ap-northeast-2",
              "ap-southeast-1",
              "ap-southeast-2",
              "ap-northeast-1",
              "ca-central-1",
              "eu-central-1",
              "eu-west-1",
              "eu-west-2",
              "eu-west-3",
              "eu-north-1",
              "sa-east-1",
              "af-south-1",
              "ap-east-1",
              "ap-east-2",
              "ap-south-2",
              "ap-southeast-3",
              "ap-southeast-4",
              "ap-southeast-5",
              "ap-southeast-6",
              "ap-southeast-7",
              "ca-west-1",
              "eu-south-1",
              "eu-south-2",
              "eu-central-2",
              "mx-central-1",
              "me-south-1",
              "me-central-1"
            ],
            "description": "AWS region where the instances are reserved"
          },
          "count": {
            "type": "number",
            "description": "Number of reserved instances"
          },
          "multi_az": {
            "type": "boolean",
            "description": "Whether Multi-AZ deployment is enabled"
          },
          "start_time": {
            "type": "string",
            "description": "Start date of the reservation (ISO 8601)"
          },
          "end_time": {
            "type": "string",
            "description": "Expiration date of the reservation (ISO 8601)"
          },
          "duration": {
            "type": "number",
            "description": "Length of the reservation period in months"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "payment-failed",
              "payment-pending",
              "queued",
              "queued-deleted",
              "retired"
            ],
            "description": "Current state of the reservation"
          },
          "payment_option": {
            "type": "string",
            "description": "Payment structure"
          },
          "commitment_price": {
            "type": "number",
            "description": "Monthly cost with the reservation, per reserved instance"
          },
          "on_demand_price": {
            "type": "number",
            "description": "What one reserved instance would cost a month at the on-demand list price, not based on usage"
          },
          "savings": {
            "type": "number",
            "description": "Expected monthly savings for the whole reservation: (on_demand_price - commitment_price) x count"
          },
          "managed_by": {
            "type": "string",
            "enum": [
              "aws",
              "milkstraw"
            ],
            "description": "Who manages it: aws for a commitment you bought, milkstraw for one MilkStraw AI provides"
          },
          "utilization_percentage": {
            "type": [
              "number",
              "null"
            ],
            "description": "How much of the commitment was used so far this month, from 0 to 100; null until AWS reports it, about 2 days late"
          }
        },
        "required": [
          "id",
          "type",
          "platform",
          "region",
          "count",
          "multi_az",
          "start_time",
          "end_time",
          "duration",
          "state",
          "payment_option",
          "commitment_price",
          "on_demand_price",
          "savings",
          "managed_by",
          "utilization_percentage"
        ]
      },
      "ReservationLine": {
        "type": "object",
        "required": [
          "id",
          "service",
          "type",
          "count",
          "platform",
          "region",
          "original_price",
          "utilization_percentage",
          "actual_savings"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The Reserved Instance ID"
          },
          "service": {
            "type": "string",
            "description": "The AWS service"
          },
          "type": {
            "type": "string",
            "description": "The instance type"
          },
          "count": {
            "type": "integer",
            "description": "How many instances it covers"
          },
          "platform": {
            "type": "string",
            "description": "The platform, like Linux/UNIX"
          },
          "region": {
            "type": "string",
            "description": "The region"
          },
          "original_price": {
            "type": [
              "number",
              "null"
            ],
            "description": "What it would cost on demand, in USD"
          },
          "utilization_percentage": {
            "type": [
              "number",
              "null"
            ],
            "description": "How much of it was used, from 0 to 100"
          },
          "actual_savings": {
            "type": [
              "number",
              "null"
            ],
            "description": "What it saved, in USD"
          }
        }
      },
      "S3Bucket": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Globally unique bucket name"
          },
          "region": {
            "type": "string",
            "description": "AWS region the bucket resides in"
          },
          "creation_date": {
            "type": "string",
            "description": "When the bucket was created"
          },
          "versioning_enabled": {
            "type": "boolean",
            "description": "Whether object versioning is enabled"
          },
          "encryption": {
            "type": [
              "string",
              "null"
            ],
            "description": "Default server-side encryption algorithm, or null when unencrypted"
          },
          "tags": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Bucket tags"
          },
          "lifecycle_rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/S3LifecycleRule"
            }
          }
        },
        "required": [
          "name",
          "region",
          "creation_date",
          "versioning_enabled",
          "encryption",
          "tags",
          "lifecycle_rules"
        ]
      },
      "S3LifecycleRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Rule identifier"
          },
          "status": {
            "type": "string",
            "description": "'Enabled' or 'Disabled'"
          },
          "prefix": {
            "type": [
              "string",
              "null"
            ],
            "description": "Object key prefix the rule applies to"
          },
          "current_version_expiration_days": {
            "type": [
              "number",
              "null"
            ],
            "description": "Days after which the current object version expires"
          },
          "current_version_expiration_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date on which the current object version expires"
          },
          "previous_versions_expiration_days": {
            "type": [
              "number",
              "null"
            ],
            "description": "Days after which superseded (noncurrent) versions are permanently deleted"
          },
          "transitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/S3Transition"
            }
          },
          "previous_versions_transitions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/S3Transition"
            }
          }
        },
        "required": [
          "id",
          "status",
          "prefix",
          "current_version_expiration_days",
          "current_version_expiration_date",
          "previous_versions_expiration_days",
          "transitions",
          "previous_versions_transitions"
        ]
      },
      "S3Transition": {
        "type": "object",
        "properties": {
          "storage_class": {
            "type": [
              "string",
              "null"
            ],
            "description": "Destination storage class"
          },
          "days": {
            "type": [
              "number",
              "null"
            ],
            "description": "Days after object creation before transitioning"
          },
          "date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Absolute date on which to transition"
          }
        },
        "required": [
          "storage_class",
          "days",
          "date"
        ]
      },
      "Savings": {
        "type": "object",
        "properties": {
          "month_to_date_savings": {
            "type": "number",
            "description": "What your commitments saved so far this month, in USD"
          },
          "monthly_savings": {
            "type": "number",
            "description": "This month's expected savings, or what is already saved once that is higher, in USD"
          },
          "lifetime_savings": {
            "type": "number",
            "description": "Everything MilkStraw AI saved you so far, in USD"
          },
          "monthly_savings_by_service": {
            "$ref": "#/components/schemas/ServiceAmounts",
            "description": "This month's expected savings for each service, in USD"
          },
          "coverage_percentage_by_service": {
            "$ref": "#/components/schemas/ServiceAmounts",
            "description": "How much of each service your commitments cover, from 0 to 100"
          }
        },
        "required": [
          "month_to_date_savings",
          "monthly_savings",
          "lifetime_savings",
          "monthly_savings_by_service",
          "coverage_percentage_by_service"
        ]
      },
      "SavingsPlanLine": {
        "type": "object",
        "required": [
          "id",
          "service",
          "original_price",
          "utilization_percentage",
          "actual_savings"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The Savings Plan ID"
          },
          "service": {
            "type": "string",
            "description": "The AWS service"
          },
          "original_price": {
            "type": [
              "number",
              "null"
            ],
            "description": "What it would cost on demand, in USD"
          },
          "utilization_percentage": {
            "type": [
              "number",
              "null"
            ],
            "description": "How much of it was used, from 0 to 100"
          },
          "actual_savings": {
            "type": [
              "number",
              "null"
            ],
            "description": "What it saved, in USD"
          }
        }
      },
      "SavingsPlansSavingsPlan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier assigned by AWS for this Savings Plan"
          },
          "service": {
            "type": "string",
            "enum": [
              "compute",
              "database",
              "ec2_instance",
              "sage_maker"
            ],
            "description": "Savings Plan type"
          },
          "region": {
            "type": "string",
            "description": "AWS region, or \"N/A\" for region-agnostic Savings Plans"
          },
          "family": {
            "type": "string",
            "description": "EC2 instance family for EC2 Instance Savings Plans, or \"N/A\" for family-agnostic Savings Plans"
          },
          "commitment": {
            "type": "number",
            "description": "Hourly commitment amount in USD"
          },
          "cost": {
            "type": "number",
            "description": "Monthly cost calculated from hourly commitment (commitment x ~730 hours/month)"
          },
          "payment_option": {
            "type": "string",
            "description": "Payment structure"
          },
          "up_front_amount": {
            "type": "string",
            "description": "One-time upfront payment amount, or \"N/A\" if no upfront payment applies"
          },
          "recurring_amount": {
            "type": "string",
            "description": "Recurring hourly charge amount, or \"N/A\" if fully paid upfront"
          },
          "term_seconds": {
            "type": [
              "number",
              "null"
            ],
            "description": "Contract term reported by AWS, in seconds"
          },
          "start_time": {
            "type": "string",
            "description": "Start date of the Savings Plan (ISO 8601)"
          },
          "end_time": {
            "type": "string",
            "description": "Expiration date of the Savings Plan (ISO 8601)"
          },
          "state": {
            "type": "string",
            "enum": [
              "active",
              "payment-failed",
              "payment-pending",
              "pending-return",
              "queued",
              "queued-deleted",
              "retired",
              "returned"
            ],
            "description": "Current state of the Savings Plan"
          },
          "savings": {
            "type": "number",
            "description": "Expected monthly savings assuming full utilization"
          },
          "managed_by": {
            "type": "string",
            "enum": [
              "aws",
              "milkstraw"
            ],
            "description": "Who manages it: aws for a commitment you bought, milkstraw for one MilkStraw AI provides"
          },
          "utilization_percentage": {
            "type": [
              "number",
              "null"
            ],
            "description": "How much of the commitment was used so far this month, from 0 to 100; null until AWS reports it, about 2 days late"
          }
        },
        "required": [
          "id",
          "service",
          "region",
          "family",
          "commitment",
          "cost",
          "payment_option",
          "up_front_amount",
          "recurring_amount",
          "term_seconds",
          "start_time",
          "end_time",
          "state",
          "savings",
          "managed_by",
          "utilization_percentage"
        ]
      },
      "ServiceAmounts": {
        "type": "object",
        "required": [
          "compute",
          "database"
        ],
        "properties": {
          "compute": {
            "type": "number",
            "description": "Compute"
          },
          "database": {
            "type": "number",
            "description": "Databases"
          }
        }
      },
      "Spend": {
        "type": "object",
        "properties": {
          "period": {
            "$ref": "#/components/schemas/SpendPeriod",
            "description": "The period the report covers"
          },
          "bounds": {
            "$ref": "#/components/schemas/SpendBounds",
            "description": "The months you can ask for"
          },
          "chart": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpendSeries"
            },
            "description": "Spend over the period for the top services, the rest grouped as Other"
          },
          "snapshot": {
            "$ref": "#/components/schemas/SpendSnapshot",
            "description": "Total spend for the period, and spend for each service"
          },
          "accounts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpendRow"
            },
            "description": "Spend for each AWS account"
          }
        },
        "required": [
          "period",
          "bounds",
          "chart",
          "snapshot",
          "accounts"
        ]
      },
      "SpendBounds": {
        "type": "object",
        "required": [
          "earliest",
          "latest"
        ],
        "properties": {
          "earliest": {
            "type": [
              "string",
              "null"
            ],
            "description": "The first month with cost data, as YYYY-MM"
          },
          "latest": {
            "type": "string",
            "description": "The latest month with cost data, as YYYY-MM"
          }
        }
      },
      "SpendPeriod": {
        "type": "object",
        "required": [
          "year",
          "month",
          "label",
          "granularity",
          "in_progress"
        ],
        "properties": {
          "year": {
            "type": "integer",
            "description": "The year"
          },
          "month": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The month, or null for a whole year"
          },
          "label": {
            "type": "string",
            "description": "The period's name, like October 2026"
          },
          "granularity": {
            "type": "string",
            "enum": [
              "daily",
              "monthly"
            ],
            "description": "Daily points for a month, monthly for a year"
          },
          "in_progress": {
            "type": "boolean",
            "description": "Whether its totals can still grow"
          }
        }
      },
      "SpendRow": {
        "type": "object",
        "required": [
          "name",
          "cost",
          "previous_cost"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The service, or the account name"
          },
          "account_id": {
            "type": "string",
            "description": "The 12-digit AWS account ID, on account rows"
          },
          "cost": {
            "type": "number",
            "description": "Spend over the period, in USD"
          },
          "previous_cost": {
            "type": "number",
            "description": "Spend over the previous month, in USD, for a month period"
          }
        }
      },
      "SpendSeries": {
        "type": "object",
        "required": [
          "name",
          "points",
          "total"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The service, or Other"
          },
          "points": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "description": "Spend in USD, keyed by day (YYYY-MM-DD) or by month"
          },
          "total": {
            "type": "number",
            "description": "Spend over the period, in USD"
          }
        }
      },
      "SpendSnapshot": {
        "type": "object",
        "required": [
          "total",
          "services"
        ],
        "properties": {
          "total": {
            "type": "number",
            "description": "Total spend over the period, in USD"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpendRow"
            },
            "description": "Spend for each service"
          }
        }
      },
      "Stack": {
        "type": "object",
        "required": [
          "name",
          "version"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The stack's name"
          },
          "version": {
            "type": "string",
            "description": "The version of MilkStraw AI's template it runs"
          }
        }
      },
      "Task": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The task's ID"
          },
          "number": {
            "type": "integer",
            "description": "The task's number within the organization"
          },
          "status": {
            "type": "string",
            "enum": [
              "todo",
              "in_progress",
              "solved",
              "discarded",
              "archived"
            ],
            "description": "Where the task is on its project's board"
          },
          "resource_uid": {
            "type": "string",
            "description": "The AWS resource the task is about, like an instance ID"
          },
          "title": {
            "type": "string",
            "description": "What to do, like Upgrade db-1 to Graviton"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "cost",
                "security",
                "hygiene",
                "modernization"
              ]
            },
            "description": "What the task improves"
          },
          "risk": {
            "$ref": "#/components/schemas/TaskDefinitionRisk",
            "description": "How risky the change is"
          },
          "last_detected_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When MilkStraw AI last found the issue"
          },
          "confidence": {
            "$ref": "#/components/schemas/TaskDefinitionConfidence",
            "description": "How sure MilkStraw AI is that the change applies"
          },
          "reversible": {
            "type": "boolean",
            "description": "Whether the change can be undone"
          },
          "source": {
            "$ref": "#/components/schemas/TaskDefinitionSource",
            "description": "What found the issue"
          },
          "project": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TaskProject"
              },
              {
                "type": "null"
              }
            ],
            "description": "The project the task belongs to"
          },
          "monthly_savings": {
            "type": [
              "number",
              "null"
            ],
            "description": "What the task saves a month, in USD, when it saves money"
          }
        },
        "required": [
          "id",
          "number",
          "status",
          "resource_uid",
          "title",
          "categories",
          "risk",
          "last_detected_at",
          "confidence",
          "reversible",
          "source",
          "project",
          "monthly_savings"
        ]
      },
      "TaskDefinitionConfidence": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high"
        ]
      },
      "TaskDefinitionRisk": {
        "type": "string",
        "enum": [
          "low",
          "medium",
          "high",
          "critical"
        ]
      },
      "TaskDefinitionSource": {
        "type": "string",
        "enum": [
          "aws",
          "milkstraw"
        ]
      },
      "TaskDetail": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The task's ID"
          },
          "number": {
            "type": "integer",
            "description": "The task's number within the organization"
          },
          "status": {
            "type": "string",
            "enum": [
              "todo",
              "in_progress",
              "solved",
              "discarded",
              "archived"
            ],
            "description": "Where the task is on its project's board"
          },
          "resource_uid": {
            "type": "string",
            "description": "The AWS resource the task is about, like an instance ID"
          },
          "title": {
            "type": "string",
            "description": "What to do, like Upgrade db-1 to Graviton"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "cost",
                "security",
                "hygiene",
                "modernization"
              ]
            },
            "description": "What the task improves"
          },
          "risk": {
            "$ref": "#/components/schemas/TaskDefinitionRisk",
            "description": "How risky the change is"
          },
          "last_detected_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When MilkStraw AI last found the issue"
          },
          "confidence": {
            "$ref": "#/components/schemas/TaskDefinitionConfidence",
            "description": "How sure MilkStraw AI is that the change applies"
          },
          "reversible": {
            "type": "boolean",
            "description": "Whether the change can be undone"
          },
          "source": {
            "$ref": "#/components/schemas/TaskDefinitionSource",
            "description": "What found the issue"
          },
          "project": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TaskProject"
              },
              {
                "type": "null"
              }
            ],
            "description": "The project the task belongs to"
          },
          "monthly_savings": {
            "type": [
              "number",
              "null"
            ],
            "description": "What the task saves a month, in USD, when it saves money"
          },
          "details": {
            "type": "object",
            "description": "Facts about the resource, like its type and region"
          },
          "templates": {
            "$ref": "#/components/schemas/TaskTemplates",
            "description": "The instructions for doing the task"
          },
          "activities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Activity"
            },
            "description": "What happened to the task, newest first"
          }
        },
        "required": [
          "id",
          "number",
          "status",
          "resource_uid",
          "title",
          "categories",
          "risk",
          "last_detected_at",
          "confidence",
          "reversible",
          "source",
          "project",
          "monthly_savings",
          "details",
          "templates",
          "activities"
        ]
      },
      "TaskProject": {
        "type": "object",
        "required": [
          "id",
          "display_name",
          "completed"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The project's ID"
          },
          "display_name": {
            "type": "string",
            "description": "The project's name, like Project #3"
          },
          "completed": {
            "type": "boolean",
            "description": "Whether the project is completed"
          }
        }
      },
      "TaskTemplates": {
        "type": "object",
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "string",
            "description": "The instructions, in Markdown"
          }
        }
      }
    }
  }
}
