cloudos_cli.cost.cost¶
Cost module for retrieving and displaying job cost information.
Classes
|
Handles cost information retrieval and display. |
- class cloudos_cli.cost.cost.CostViewer(cloudos_url, apikey)[source]¶
Bases:
object
Handles cost information retrieval and display.
- display_costs(job_id, workspace_id, output_format, verify=True)[source]¶
Display cost information for a job with pagination.
- Parameters:
job_id (str) – The job ID to display costs for
output_format (str) – The desired output format (e.g., ‘stdout’, ‘csv’, ‘json’)
workspace_id (str) – The workspace ID
verify (bool or str) – SSL verification setting
- get_job_costs(job_id, workspace_id, page=1, limit=100, verify=True)[source]¶
Get cost information for a specific job.
- Parameters:
job_id (str) – The job ID to get costs for
workspace_id (str) – The workspace ID
page (int) – Page number for pagination (default: 1)
limit (int) – Number of results per page (default: 100)
verify (bool or str) – SSL verification setting
- Returns:
JSON response containing cost data
- Return type:
dict