Skip to main content

Aggregated instance usage SDK reference

Aggregated instance usage SDK reference

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 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,
)