costs
Creates, updates, deletes, gets or lists a costs
resource.
Overview
Name | costs |
Type | Resource |
Id | azure.dev_test_labs.costs |
Fields
- vw_costs
- costs
Name | Datatype | Description |
---|---|---|
id | text | The identifier of the resource. |
name | text | The name of the resource. |
created_date | text | field from the properties object |
currency_code | text | field from the properties object |
end_date_time | text | field from the properties object |
labName | text | field from the properties object |
lab_cost_details | text | field from the properties object |
lab_cost_summary | text | field from the properties object |
location | text | The location of the resource. |
provisioning_state | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_costs | text | field from the properties object |
start_date_time | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | The tags of the resource. |
target_cost | text | field from the properties object |
type | text | The type of the resource. |
unique_identifier | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
id | string | The identifier of the resource. |
name | string | The name of the resource. |
location | string | The location of the resource. |
properties | object | Properties of a cost item. |
tags | object | The tags of the resource. |
type | string | The type of the resource. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | labName, name, resourceGroupName, subscriptionId | Get cost. |
create_or_update | INSERT | labName, name, resourceGroupName, subscriptionId, data__properties | Create or replace an existing cost. |
SELECT
examples
Get cost.
- vw_costs
- costs
SELECT
id,
name,
created_date,
currency_code,
end_date_time,
labName,
lab_cost_details,
lab_cost_summary,
location,
provisioning_state,
resourceGroupName,
resource_costs,
start_date_time,
subscriptionId,
tags,
target_cost,
type,
unique_identifier
FROM azure.dev_test_labs.vw_costs
WHERE labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
tags,
type
FROM azure.dev_test_labs.costs
WHERE labName = '{{ labName }}'
AND name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new costs
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.dev_test_labs.costs (
labName,
name,
resourceGroupName,
subscriptionId,
data__properties,
location,
tags,
properties
)
SELECT
'{{ labName }}',
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__properties }}',
'{{ location }}',
'{{ tags }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
- name: properties
value:
- name: targetCost
value:
- name: status
value: string
- name: target
value: integer
- name: costThresholds
value:
- - name: thresholdId
value: string
- name: percentageThreshold
value:
- name: thresholdValue
value: number
- name: displayOnChart
value: string
- name: sendNotificationWhenExceeded
value: string
- name: notificationSent
value: string
- name: cycleStartDateTime
value: string
- name: cycleEndDateTime
value: string
- name: cycleType
value: string
- name: labCostSummary
value:
- name: estimatedLabCost
value: number
- name: labCostDetails
value:
- - name: date
value: string
- name: cost
value: number
- name: costType
value: string
- name: resourceCosts
value:
- - name: resourcename
value: string
- name: resourceUId
value: string
- name: resourceCost
value: number
- name: resourceType
value: string
- name: resourceOwner
value: string
- name: resourcePricingTier
value: string
- name: resourceStatus
value: string
- name: resourceId
value: string
- name: externalResourceId
value: string
- name: currencyCode
value: string
- name: startDateTime
value: string
- name: endDateTime
value: string
- name: createdDate
value: string
- name: provisioningState
value: string
- name: uniqueIdentifier
value: string