{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-billing-and-cost-management/json-schema/amazon-billing-and-cost-management-get-rightsizing-recommendation-response-schema.json",
  "title": "GetRightsizingRecommendationResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-billing-and-cost-management-recommendations-api-openapi.yml#/components/schemas/GetRightsizingRecommendationResponse",
  "type": "object",
  "properties": {
    "Metadata": {
      "$ref": "#/$defs/RightsizingRecommendationMetadata"
    },
    "Summary": {
      "$ref": "#/$defs/RightsizingRecommendationSummary"
    },
    "RightsizingRecommendations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RightsizingRecommendation"
      },
      "description": "Recommendations to rightsize resources."
    },
    "NextPageToken": {
      "type": "string",
      "description": "The token to retrieve the next set of results."
    },
    "Configuration": {
      "$ref": "#/$defs/RightsizingRecommendationConfiguration"
    }
  },
  "$defs": {
    "CurrentInstance": {
      "type": "object",
      "properties": {
        "ResourceId": {
          "type": "string",
          "description": "Resource ID of the current instance."
        },
        "InstanceName": {
          "type": "string",
          "description": "The name that you given an instance. This field shows as blank if you haven't given the instance a name."
        },
        "Tags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TagValues"
          },
          "description": "Cost allocation resource tags that are applied to the instance."
        },
        "ResourceDetails": {
          "$ref": "#/$defs/ResourceDetails"
        },
        "ResourceUtilization": {
          "$ref": "#/$defs/ResourceUtilization"
        },
        "ReservationCoveredHoursInLookbackPeriod": {
          "type": "string",
          "description": "The number of hours during the lookback period that's covered by reservations."
        },
        "SavingsPlansCoveredHoursInLookbackPeriod": {
          "type": "string",
          "description": "The number of hours during the lookback period that's covered by Savings Plans."
        },
        "OnDemandHoursInLookbackPeriod": {
          "type": "string",
          "description": "The number of hours during the lookback period that's billed at On-Demand rates."
        },
        "TotalRunningHoursInLookbackPeriod": {
          "type": "string",
          "description": "The total number of hours that the instance ran during the lookback period."
        },
        "MonthlyCost": {
          "type": "string",
          "description": "The current On-Demand cost of operating this instance on a monthly basis."
        },
        "CurrencyCode": {
          "type": "string",
          "description": "The currency code that Amazon Web Services used to calculate the costs for this instance."
        }
      }
    },
    "DiskResourceUtilization": {
      "type": "object",
      "properties": {
        "DiskReadOpsPerSecond": {
          "type": "string",
          "description": "The maximum number of read operations per second."
        },
        "DiskWriteOpsPerSecond": {
          "type": "string",
          "description": "The maximum number of write operations per second."
        },
        "DiskReadBytesPerSecond": {
          "type": "string",
          "description": "The maximum read throughput operations per second."
        },
        "DiskWriteBytesPerSecond": {
          "type": "string",
          "description": "The maximum write throughput operations per second."
        }
      }
    },
    "EBSResourceUtilization": {
      "type": "object",
      "properties": {
        "EbsReadOpsPerSecond": {
          "type": "string",
          "description": "The maximum number of read operations per second."
        },
        "EbsWriteOpsPerSecond": {
          "type": "string",
          "description": "The maximum number of write operations per second."
        },
        "EbsReadBytesPerSecond": {
          "type": "string",
          "description": "The maximum size of read operations per second"
        },
        "EbsWriteBytesPerSecond": {
          "type": "string",
          "description": "The maximum size of write operations per second."
        }
      }
    },
    "EC2ResourceDetails": {
      "type": "object",
      "properties": {
        "HourlyOnDemandRate": {
          "type": "string",
          "description": "The hourly public On-Demand rate for the instance type."
        },
        "InstanceType": {
          "type": "string",
          "description": "The type of Amazon Web Services instance."
        },
        "Platform": {
          "type": "string",
          "description": "The platform of the Amazon Web Services instance. The platform is the specific combination of operating system, license model, and software on an instance."
        },
        "Region": {
          "type": "string",
          "description": "The Amazon Web Services Region of the instance."
        },
        "Sku": {
          "type": "string",
          "description": "The SKU of the product."
        },
        "Memory": {
          "type": "string",
          "description": "The memory capacity of the Amazon Web Services instance."
        },
        "NetworkPerformance": {
          "type": "string",
          "description": "The network performance capacity of the Amazon Web Services instance."
        },
        "Storage": {
          "type": "string",
          "description": "The disk storage of the Amazon Web Services instance. This doesn't include EBS storage."
        },
        "Vcpu": {
          "type": "string",
          "description": "The number of VCPU cores in the Amazon Web Services instance type."
        }
      }
    },
    "EC2ResourceUtilization": {
      "type": "object",
      "properties": {
        "MaxCpuUtilizationPercentage": {
          "type": "string",
          "description": "The maximum observed or expected CPU utilization of the instance."
        },
        "MaxMemoryUtilizationPercentage": {
          "type": "string",
          "description": "The maximum observed or expected memory utilization of the instance."
        },
        "MaxStorageUtilizationPercentage": {
          "type": "string",
          "description": "The maximum observed or expected storage utilization of the instance. This doesn't include EBS storage."
        },
        "EBSResourceUtilization": {
          "$ref": "#/$defs/EBSResourceUtilization"
        },
        "DiskResourceUtilization": {
          "$ref": "#/$defs/DiskResourceUtilization"
        },
        "NetworkResourceUtilization": {
          "$ref": "#/$defs/NetworkResourceUtilization"
        }
      }
    },
    "ModifyRecommendationDetail": {
      "type": "object",
      "properties": {
        "TargetInstances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TargetInstance"
          },
          "description": "Determines whether this instance type is the Amazon Web Services default recommendation."
        }
      }
    },
    "NetworkResourceUtilization": {
      "type": "object",
      "properties": {
        "NetworkInBytesPerSecond": {
          "type": "string",
          "description": "The network inbound throughput utilization measured in Bytes per second (Bps)."
        },
        "NetworkOutBytesPerSecond": {
          "type": "string",
          "description": "The network outbound throughput utilization measured in Bytes per second (Bps)."
        },
        "NetworkPacketsInPerSecond": {
          "type": "string",
          "description": "The network inbound packets that are measured in packets per second."
        },
        "NetworkPacketsOutPerSecond": {
          "type": "string",
          "description": "The network outbound packets that are measured in packets per second."
        }
      }
    },
    "ResourceDetails": {
      "type": "object",
      "properties": {
        "EC2ResourceDetails": {
          "$ref": "#/$defs/EC2ResourceDetails"
        }
      }
    },
    "ResourceUtilization": {
      "type": "object",
      "properties": {
        "EC2ResourceUtilization": {
          "$ref": "#/$defs/EC2ResourceUtilization"
        }
      }
    },
    "RightsizingRecommendation": {
      "type": "object",
      "properties": {
        "AccountId": {
          "type": "string",
          "description": "The account that this recommendation is for."
        },
        "CurrentInstance": {
          "$ref": "#/$defs/CurrentInstance"
        },
        "RightsizingType": {
          "type": "string",
          "enum": [
            "TERMINATE",
            "MODIFY"
          ],
          "description": "A recommendation to either terminate or modify the resource."
        },
        "ModifyRecommendationDetail": {
          "$ref": "#/$defs/ModifyRecommendationDetail"
        },
        "TerminateRecommendationDetail": {
          "$ref": "#/$defs/TerminateRecommendationDetail"
        },
        "FindingReasonCodes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "CPU_OVER_PROVISIONED",
              "CPU_UNDER_PROVISIONED",
              "MEMORY_OVER_PROVISIONED",
              "MEMORY_UNDER_PROVISIONED",
              "EBS_THROUGHPUT_OVER_PROVISIONED",
              "EBS_THROUGHPUT_UNDER_PROVISIONED",
              "EBS_IOPS_OVER_PROVISIONED",
              "EBS_IOPS_UNDER_PROVISIONED",
              "NETWORK_BANDWIDTH_OVER_PROVISIONED",
              "NETWORK_BANDWIDTH_UNDER_PROVISIONED",
              "NETWORK_PPS_OVER_PROVISIONED",
              "NETWORK_PPS_UNDER_PROVISIONED",
              "DISK_IOPS_OVER_PROVISIONED",
              "DISK_IOPS_UNDER_PROVISIONED",
              "DISK_THROUGHPUT_OVER_PROVISIONED",
              "DISK_THROUGHPUT_UNDER_PROVISIONED"
            ]
          },
          "description": "The list of possible reasons why the recommendation is generated, such as under- or over-utilization of specific metrics (for example, CPU, Memory, Network)."
        }
      }
    },
    "RightsizingRecommendationConfiguration": {
      "type": "object",
      "properties": {
        "RecommendationTarget": {
          "type": "string",
          "enum": [
            "SAME_INSTANCE_FAMILY",
            "CROSS_INSTANCE_FAMILY"
          ],
          "description": "The option to see recommendations within the same instance family or recommendations for instances across other families. The default value is SAME_INSTANCE_FAMILY."
        },
        "BenefitsConsidered": {
          "type": "boolean",
          "description": "The option to consider RI or Savings Plans discount benefits in your savings calculation. The default value is TRUE."
        }
      },
      "required": [
        "RecommendationTarget",
        "BenefitsConsidered"
      ]
    },
    "RightsizingRecommendationMetadata": {
      "type": "object",
      "properties": {
        "RecommendationId": {
          "type": "string",
          "description": "The ID for the recommendation."
        },
        "GenerationTimestamp": {
          "type": "string",
          "description": "The timestamp for when Amazon Web Services made the recommendation."
        },
        "LookbackPeriodInDays": {
          "type": "string",
          "enum": [
            "SEVEN_DAYS",
            "THIRTY_DAYS",
            "SIXTY_DAYS"
          ],
          "description": "The number of days of previous usage that Amazon Web Services considers when making the recommendation."
        },
        "AdditionalMetadata": {
          "type": "string",
          "description": "Additional metadata that might be applicable to the recommendation."
        }
      }
    },
    "RightsizingRecommendationSummary": {
      "type": "object",
      "properties": {
        "TotalRecommendationCount": {
          "type": "string",
          "description": "The total number of instance recommendations."
        },
        "EstimatedTotalMonthlySavingsAmount": {
          "type": "string",
          "description": "The estimated total savings resulting from modifications, on a monthly basis."
        },
        "SavingsCurrencyCode": {
          "type": "string",
          "description": "The currency code that Amazon Web Services used to calculate the savings."
        },
        "SavingsPercentage": {
          "type": "string",
          "description": "The savings percentage based on the recommended modifications. It's relative to the total On-Demand costs that are associated with these instances."
        }
      }
    },
    "TagValues": {
      "type": "object",
      "properties": {
        "Key": {
          "type": "string",
          "description": "The key for the tag."
        },
        "Values": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The specific value of the tag."
        },
        "MatchOptions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "EQUALS",
              "ABSENT",
              "STARTS_WITH",
              "ENDS_WITH",
              "CONTAINS",
              "CASE_SENSITIVE",
              "CASE_INSENSITIVE",
              "GREATER_THAN_OR_EQUAL"
            ]
          },
          "description": "The match options that you can use to filter your results. MatchOptions is only applicable for actions related to cost category. The default values for MatchOptions are EQUALS and CASE_SENSITIVE."
        }
      }
    },
    "TargetInstance": {
      "type": "object",
      "properties": {
        "EstimatedMonthlyCost": {
          "type": "string",
          "description": "The expected cost to operate this instance type on a monthly basis."
        },
        "EstimatedMonthlySavings": {
          "type": "string",
          "description": "The estimated savings that result from modification, on a monthly basis."
        },
        "CurrencyCode": {
          "type": "string",
          "description": "The currency code that Amazon Web Services used to calculate the costs for this instance."
        },
        "DefaultTargetInstance": {
          "type": "boolean",
          "description": "Determines whether this recommendation is the defaulted Amazon Web Services recommendation."
        },
        "ResourceDetails": {
          "$ref": "#/$defs/ResourceDetails"
        },
        "ExpectedResourceUtilization": {
          "$ref": "#/$defs/ResourceUtilization"
        },
        "PlatformDifferences": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "HYPERVISOR",
              "NETWORK_INTERFACE",
              "STORAGE_INTERFACE",
              "INSTANCE_STORE_AVAILABILITY",
              "VIRTUALIZATION_TYPE"
            ]
          },
          "description": "Explains the actions that you might need to take to successfully migrate your workloads from the current instance type to the recommended instance type."
        }
      }
    },
    "TerminateRecommendationDetail": {
      "type": "object",
      "properties": {
        "EstimatedMonthlySavings": {
          "type": "string",
          "description": "The estimated savings that result from modification, on a monthly basis."
        },
        "CurrencyCode": {
          "type": "string",
          "description": "The currency code that Amazon Web Services used to calculate the costs for this instance."
        }
      }
    }
  }
}