Azure DevTest Labs Costs API
The Costs API from Azure DevTest Labs — 1 operation(s) for costs.
The Costs API from Azure DevTest Labs — 1 operation(s) for costs.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/azure-test-labs-costs-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
description: The DevTest Labs Client.
title: DevTestLabsClient ArmTemplates Costs API
version: '2.0'
x-apisguru-categories:
- cloud
x-logo:
url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
x-origin:
- format: swagger
url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/DTL.json
x-preferred: true
x-providerName: azure.com
x-serviceName: devtestlabs-DTL
x-tags:
- Azure
- Microsoft
servers:
- url: https://management.azure.com
security:
- azure_auth:
- user_impersonation
tags:
- name: Costs
paths:
? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name}
: get:
description: Get cost.
operationId: Costs_Get
parameters:
- $ref: '#/components/parameters/subscriptionId'
- $ref: '#/components/parameters/resourceGroupName'
- description: The name of the lab.
in: path
name: labName
required: true
example: example-value
schema:
type: string
- description: The name of the cost.
in: path
name: name
required: true
example: example-value
schema:
type: string
- description: 'Specify the $expand query. Example: ''properties($expand=labCostDetails)'''
in: query
name: $expand
example: example-value
schema:
type: string
- $ref: '#/components/parameters/api-version'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LabCost'
default:
description: BadRequest
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
tags:
- Costs
summary: Azure DevTest Labs Costs_ Get
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
description: Create or replace an existing cost.
operationId: Costs_CreateOrUpdate
parameters:
- $ref: '#/components/parameters/subscriptionId'
- $ref: '#/components/parameters/resourceGroupName'
- description: The name of the lab.
in: path
name: labName
required: true
example: example-value
schema:
type: string
- description: The name of the cost.
in: path
name: name
required: true
example: example-value
schema:
type: string
- $ref: '#/components/parameters/api-version'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/LabCost'
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/LabCost'
default:
description: BadRequest
content:
application/json:
schema:
$ref: '#/components/schemas/CloudError'
tags:
- Costs
summary: Azure DevTest Labs Costs_ Create or Update
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LabCost'
description: A cost item.
required: true
components:
schemas:
Resource:
description: An Azure resource.
properties:
id:
description: The identifier of the resource.
readOnly: true
type: string
location:
description: The location of the resource.
type: string
name:
description: The name of the resource.
readOnly: true
type: string
tags:
additionalProperties:
type: string
description: The tags of the resource.
type: object
type:
description: The type of the resource.
readOnly: true
type: string
type: object
x-ms-azure-resource: true
CloudError:
description: Error from a REST request.
properties:
error:
$ref: '#/components/schemas/CloudErrorBody'
description: The cloud error that occurred
type: object
x-ms-external: true
CloudErrorBody:
description: Body of an error from a REST request.
properties:
code:
description: The error code.
type: string
details:
description: Inner errors.
items:
$ref: '#/components/schemas/CloudErrorBody'
type: array
message:
description: The error message.
type: string
target:
description: The error target.
type: string
type: object
x-ms-external: true
CostThresholdProperties:
description: Properties of a cost threshold item.
properties:
displayOnChart:
description: Indicates whether this threshold will be displayed on cost charts.
enum:
- Enabled
- Disabled
type: string
x-ms-enum:
modelAsString: true
name: CostThresholdStatus
notificationSent:
description: Indicates the datetime when notifications were last sent for this threshold.
type: string
percentageThreshold:
$ref: '#/components/schemas/PercentageCostThresholdProperties'
description: The value of the percentage cost threshold.
sendNotificationWhenExceeded:
description: Indicates whether notifications will be sent when this threshold is exceeded.
enum:
- Enabled
- Disabled
type: string
x-ms-enum:
modelAsString: true
name: CostThresholdStatus
thresholdId:
description: The ID of the cost threshold item.
type: string
type: object
PercentageCostThresholdProperties:
description: Properties of a percentage cost threshold.
properties:
thresholdValue:
description: The cost threshold value.
format: double
type: number
type: object
LabCostProperties:
description: Properties of a cost item.
properties:
createdDate:
description: The creation date of the cost.
format: date-time
type: string
currencyCode:
description: The currency code of the cost.
type: string
endDateTime:
description: The end time of the cost data.
format: date-time
type: string
labCostDetails:
description: The lab cost details component of the cost data.
items:
$ref: '#/components/schemas/LabCostDetailsProperties'
readOnly: true
type: array
labCostSummary:
$ref: '#/components/schemas/LabCostSummaryProperties'
description: The lab cost summary component of the cost data.
readOnly: true
provisioningState:
description: The provisioning status of the resource.
readOnly: true
type: string
resourceCosts:
description: The resource cost component of the cost data.
items:
$ref: '#/components/schemas/LabResourceCostProperties'
readOnly: true
type: array
startDateTime:
description: The start time of the cost data.
format: date-time
type: string
targetCost:
$ref: '#/components/schemas/TargetCostProperties'
description: The target cost properties
uniqueIdentifier:
description: The unique immutable identifier of a resource (Guid).
readOnly: true
type: string
type: object
LabCostDetailsProperties:
description: The properties of a lab cost item.
properties:
cost:
description: The cost component of the cost item.
format: double
type: number
costType:
description: The type of the cost.
enum:
- Unavailable
- Reported
- Projected
type: string
x-ms-enum:
modelAsString: true
name: CostType
date:
description: The date of the cost item.
format: date-time
type: string
type: object
LabCostSummaryProperties:
description: The properties of the cost summary.
properties:
estimatedLabCost:
description: The cost component of the cost item.
format: double
type: number
type: object
LabCost:
allOf:
- $ref: '#/components/schemas/Resource'
description: A cost item.
properties:
properties:
$ref: '#/components/schemas/LabCostProperties'
description: The properties of the resource.
x-ms-client-flatten: true
required:
- properties
type: object
TargetCostProperties:
description: Properties of a cost target.
properties:
costThresholds:
description: Cost thresholds.
items:
$ref: '#/components/schemas/CostThresholdProperties'
type: array
cycleEndDateTime:
description: Reporting cycle end date.
format: date-time
type: string
cycleStartDateTime:
description: Reporting cycle start date.
format: date-time
type: string
cycleType:
description: Reporting cycle type.
enum:
- CalendarMonth
- Custom
type: string
x-ms-enum:
modelAsString: true
name: ReportingCycleType
status:
description: Target cost status
enum:
- Enabled
- Disabled
type: string
x-ms-enum:
modelAsString: true
name: TargetCostStatus
target:
description: Lab target cost
format: int32
type: integer
type: object
LabResourceCostProperties:
description: The properties of a resource cost item.
properties:
externalResourceId:
description: The ID of the external resource
type: string
resourceCost:
description: The cost component of the resource cost item.
format: double
type: number
resourceId:
description: The ID of the resource
type: string
resourceOwner:
description: The owner of the resource (ex. janedoe@microsoft.com)
type: string
resourcePricingTier:
description: The category of the resource (ex. Premium_LRS, Standard_DS1)
type: string
resourceStatus:
description: The status of the resource (ex. Active)
type: string
resourceType:
description: The logical resource type (ex. virtualmachine, storageaccount)
type: string
resourceUId:
description: The unique identifier of the resource.
type: string
resourcename:
description: The name of the resource.
type: string
type: object
parameters:
api-version:
description: Client API version.
in: query
name: api-version
required: true
schema:
type: string
default: '2018-09-15'
resourceGroupName:
description: The name of the resource group.
in: path
name: resourceGroupName
required: true
x-ms-parameter-location: method
schema:
type: string
subscriptionId:
description: The subscription ID.
in: path
name: subscriptionId
required: true
schema:
type: string
securitySchemes:
azure_auth:
type: oauth2
flows:
implicit:
scopes:
user_impersonation: Access Microsoft Azure
authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
description: OAuth2 Implicit Grant