UsageMonitoringService¶
Initialize the Elevate service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
server
|
Optional[str]
|
The server name for the Elevate service API. If not provided, defaults to the |
None
|
client_id
|
Optional[str]
|
The client ID for authentication. If not provided, defaults to the |
None
|
secret_key
|
Optional[str]
|
The secret key for authentication. If not provided, defaults to the |
None
|
Raises:
| Type | Description |
|---|---|
ElevateConfigurationException
|
If any required parameter is missing or invalid |
download_usage_metrics_csv
¶
Downloads detailed usage metrics as CSV stream. Returns all usage aggregation records matching the specified metric type and date range. The CSV includes all entity fields including tenant ID, job details, metric values, and metric-specific details in JSON format. Data is streamed in pages to support large downloads efficiently.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
metric_type
|
StrictStr
|
Type of usage metric to aggregate. Supported types are DATA_TRANSFER_VOLUME_BYTES (total bytes transferred) and CPU_TIME_MS (total CPU time in milliseconds). (required) |
required |
start_date
|
Optional[datetime]
|
Start of date range |
None
|
end_date
|
Optional[datetime]
|
End of date range |
None
|
Returns:
| Type | Description |
|---|---|
bytearray
|
Returns the result object. |
get_usage_summary
¶
Retrieves aggregated usage metrics for the current tenant. This API requires the metricType query parameter (DATA_TRANSFER_VOLUME_BYTES or CPU_TIME_MS). Returns a UsageMonitoringResponse object containing metricType and totalValue fields, providing the total aggregated metric value across all jobs for monitoring resource consumption and usage patterns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
metric_type
|
StrictStr
|
Type of usage metric to aggregate. Supported types are DATA_TRANSFER_VOLUME_BYTES (total bytes transferred) and CPU_TIME_MS (total CPU time in milliseconds). (required) |
required |
start_date
|
Optional[datetime]
|
Start of date range |
None
|
end_date
|
Optional[datetime]
|
End of date range |
None
|
Returns:
| Type | Description |
|---|---|
UsageMonitoringResponse
|
Returns the result object. |