vw_costs
Creates, updates, deletes, gets or lists a vw_costs
resource.
Overview
Name | vw_costs |
Type | View |
Id | azure.dev_test_labs.vw_costs |
Fields
See the SQL Definition (view DDL) for fields returned by this view.
SQL Definition
- Sqlite3
- Postgres
SELECT
id as id,
name as name,
location as location,
type as type,
tags as tags,
JSON_EXTRACT(properties, '$.targetCost') as "target_cost",
JSON_EXTRACT(properties, '$.labCostSummary') as "lab_cost_summary",
JSON_EXTRACT(properties, '$.labCostDetails') as "lab_cost_details",
JSON_EXTRACT(properties, '$.resourceCosts') as "resource_costs",
JSON_EXTRACT(properties, '$.currencyCode') as "currency_code",
JSON_EXTRACT(properties, '$.startDateTime') as "start_date_time",
JSON_EXTRACT(properties, '$.endDateTime') as "end_date_time",
JSON_EXTRACT(properties, '$.createdDate') as "created_date",
JSON_EXTRACT(properties, '$.provisioningState') as "provisioning_state",
JSON_EXTRACT(properties, '$.uniqueIdentifier') as "unique_identifier",
subscriptionId,
resourceGroupName,
labName,
name
FROM azure.dev_test_labs.costs
WHERE subscriptionId = 'replace-me' AND resourceGroupName = 'replace-me' AND labName = 'replace-me' AND name = 'replace-me';
SELECT
id as id,
name as name,
location as location,
type as type,
tags as tags,
json_extract_path_text(properties, '$.targetCost') as "target_cost",
json_extract_path_text(properties, '$.labCostSummary') as "lab_cost_summary",
json_extract_path_text(properties, '$.labCostDetails') as "lab_cost_details",
json_extract_path_text(properties, '$.resourceCosts') as "resource_costs",
json_extract_path_text(properties, '$.currencyCode') as "currency_code",
json_extract_path_text(properties, '$.startDateTime') as "start_date_time",
json_extract_path_text(properties, '$.endDateTime') as "end_date_time",
json_extract_path_text(properties, '$.createdDate') as "created_date",
json_extract_path_text(properties, '$.provisioningState') as "provisioning_state",
json_extract_path_text(properties, '$.uniqueIdentifier') as "unique_identifier",
subscriptionId,
resourceGroupName,
labName,
name
FROM azure.dev_test_labs.costs
WHERE subscriptionId = 'replace-me' AND resourceGroupName = 'replace-me' AND labName = 'replace-me' AND name = 'replace-me';