Microsoft.DevTestLab labs/costs 2018-09-15

Template format

To create a Microsoft.DevTestLab/labs/costs resource, add the following JSON to the resources section of your template.

  "name": "string",
  "type": "Microsoft.DevTestLab/labs/costs",
  "apiVersion": "2018-09-15",
  "location": "string",
  "tags": {},
  "properties": {
    "targetCost": {
      "status": "string",
      "target": "integer",
      "costThresholds": [
          "thresholdId": "string",
          "percentageThreshold": {
            "thresholdValue": "number"
          "displayOnChart": "string",
          "sendNotificationWhenExceeded": "string",
          "notificationSent": "string"
      "cycleStartDateTime": "string",
      "cycleEndDateTime": "string",
      "cycleType": "string"
    "currencyCode": "string",
    "startDateTime": "string",
    "endDateTime": "string"

Property values

The following tables describe the values you need to set in the schema.

Microsoft.DevTestLab/labs/costs object

Name Type Required Value
name string Yes The name of the cost.
type enum Yes costs

See Set name and type for child resources.
apiVersion enum Yes 2018-09-15
location string No The location of the resource.
tags object No The tags of the resource.
properties object Yes The properties of the resource. - LabCostProperties object

LabCostProperties object

Name Type Required Value
targetCost object No The target cost properties - TargetCostProperties object
currencyCode string No The currency code of the cost.
startDateTime string No The start time of the cost data.
endDateTime string No The end time of the cost data.

TargetCostProperties object

Name Type Required Value
status enum No Target cost status. - Enabled or Disabled
target integer No Lab target cost
costThresholds array No Cost thresholds. - CostThresholdProperties object
cycleStartDateTime string No Reporting cycle start date.
cycleEndDateTime string No Reporting cycle end date.
cycleType enum No Reporting cycle type. - CalendarMonth or Custom

CostThresholdProperties object

Name Type Required Value
thresholdId string No The ID of the cost threshold item.
percentageThreshold object No The value of the percentage cost threshold. - PercentageCostThresholdProperties object
displayOnChart enum No Indicates whether this threshold will be displayed on cost charts. - Enabled or Disabled
sendNotificationWhenExceeded enum No Indicates whether notifications will be sent when this threshold is exceeded. - Enabled or Disabled
notificationSent string No Indicates the datetime when notifications were last sent for this threshold.

PercentageCostThresholdProperties object

Name Type Required Value
thresholdValue number No The cost threshold value.