Skip to main content

Aggregated Instance Usage API Reference (0.26.73)

Aggregated Instance Usage API Reference (0.26.73)

note

This is archived documentation for version 0.26.73. For the current documentation, see current documentation.

Customer-hosted cloud features

note

Some features are only available on customer-hosted clouds. Reach out to support@anyscale.com for info.

Aggregated Instance Usage CLI

anyscale aggregated-instance-usage download-csv

Usage

anyscale aggregated-instance-usage download-csv [OPTIONS]

Download an aggregated instance usage report as a zipped CSV to the provided directory.

Options

  • --start-date: The start date (inclusive) of the aggregated instance usage report. Format: YYYY-MM-DD
  • --end-date: The end date (inclusive) of the aggregated instance usage report. Format: YYYY-MM-DD
  • --cloud: The name of the cloud to filter the report by.
  • --project: The name of the project to filter the report by.
  • --directory: The directory to save the CSV file to. Default is the current directory.
  • --hide-progress-bar: Whether to hide the progress bar. Default is False.

Examples

$ anyscale aggregated-instance-usage download-csv --start-date 2024-10-01 --end-date 2024-10-03
(anyscale +0.5s) Downloading aggregated instance usage CSV...
Download complete! File saved to 'aggregated_instance_usage_2024-10-01_2024-10-03.zip'
0:00:01 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 79.4 kB / 79.4 kB Downloading aggregated instance usage CSV
(anyscale +2.2s) Downloaded CSV to aggregated_instance_usage_2024-10-01_2024-10-03.zip

Aggregated Instance Usage SDK

anyscale.aggregated_instance_usage.download_csv

Download an aggregated instance usage report as a zipped CSV to the provided directory.

Arguments

Returns: str

Examples

import anyscale
from anyscale.aggregated_instance_usage.models import DownloadCSVFilters

anyscale.aggregated_instance_usage.download_csv(
DownloadCSVFilters(
start_date="2024-10-01",
end_date="2024-10-02",
cloud="cloud_name",
project="project_name",
directory="/directory",
hide_progress_bar=False,
),
)

Aggregated Instance Usage Models

DownloadCSVFilters

Filters to use when downloading usage CSVs.

Fields

  • start_date (str): Start date (UTC inclusive) for the usage CSV.
  • end_date (str): End date (UTC inclusive) for the usage CSV.
  • cloud (str | None): Optional cloud name to filter by.
  • project (str | None): Optional project name to filter by.
  • directory (str | None): Optional directory to save the CSV to.
  • hide_progress_bar (bool | None): Optional hide progress bar.

Python Methods

def to_dict(self) -> Dict[str, Any]
"""Return a dictionary representation of the model."""

Examples

import anyscale
from anyscale.aggregated_instance_usage.models import DownloadCSVFilters

download_csv_filters = DownloadCSVFilters(
# Start date (UTC inclusive) for the usage CSV.
start_date="2024-10-01",
# End date (UTC inclusive) for the usage CSV.
end_date="2024-10-31",
# Optional cloud name to filter by.
cloud="cloud_name",
# Optional project name to filter by.
project="project_name",
# Optional directory to save the CSV to.
directory="/directory",
# Optional hide progress bar.
hide_progress_bar=False,
)