get_ec2_spend_last_day
Retrieve EC2 spending data for the previous day using AWS Cost Explorer API. Analyze cloud costs by accessing raw API responses for specified regions and AWS accounts.
Instructions
Retrieve EC2 spend for the last day using standard AWS Cost Explorer API.
Returns:
Dict[str, Any]: The raw response from the AWS Cost Explorer API, or None if an error occurs.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
params | Yes |
Input Schema (JSON Schema)
{
"$defs": {
"EC2Params": {
"description": "Parameters for retrieving EC2 Cost Explorer information.",
"properties": {
"aws_account_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "AWS account id (if different from the current AWS account) of the account for which to get the cost data",
"title": "Aws Account Id"
},
"days": {
"default": 1,
"description": "Number of days to look back for Bedrock logs",
"maximum": 90,
"minimum": 1,
"title": "Days",
"type": "integer"
},
"region": {
"default": "us-east-1",
"description": "AWS region to retrieve logs from",
"title": "Region",
"type": "string"
}
},
"title": "EC2Params",
"type": "object"
}
},
"properties": {
"params": {
"$ref": "#/$defs/EC2Params"
}
},
"required": [
"params"
],
"title": "get_ec2_spend_last_dayArguments",
"type": "object"
}