swagger: '2.0' info: description: The DevTest Labs Client. title: DevTestLabsClient ArmTemplates Costs API version: '2018-09-15' 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 version: '2.0' x-preferred: true x-providerName: azure.com x-serviceName: devtestlabs-DTL x-tags: - Azure - Microsoft host: management.azure.com schemes: - https consumes: - application/json produces: - application/json 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: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - description: The name of the lab. in: path name: labName required: true type: string example: example-value - description: The name of the cost. in: path name: name required: true type: string example: example-value - description: 'Specify the $expand query. Example: ''properties($expand=labCostDetails)''' in: query name: $expand type: string example: example-value - $ref: '#/parameters/api-version' responses: '200': description: OK schema: $ref: '#/definitions/LabCost' default: description: BadRequest schema: $ref: '#/definitions/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: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - description: The name of the lab. in: path name: labName required: true type: string example: example-value - description: The name of the cost. in: path name: name required: true type: string example: example-value - description: A cost item. in: body name: labCost required: true schema: $ref: '#/definitions/LabCost' example: example-value - $ref: '#/parameters/api-version' responses: '200': description: OK schema: $ref: '#/definitions/LabCost' '201': description: Created schema: $ref: '#/definitions/LabCost' default: description: BadRequest schema: $ref: '#/definitions/CloudError' tags: - Costs summary: Azure DevTest Labs Costs_ Create or Update x-microcks-operation: delay: 0 dispatcher: FALLBACK definitions: 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 TargetCostProperties: description: Properties of a cost target. properties: costThresholds: description: Cost thresholds. items: $ref: '#/definitions/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 LabCost: allOf: - $ref: '#/definitions/Resource' description: A cost item. properties: properties: $ref: '#/definitions/LabCostProperties' description: The properties of the resource. x-ms-client-flatten: true required: - properties type: object 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 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: '#/definitions/LabCostDetailsProperties' readOnly: true type: array labCostSummary: $ref: '#/definitions/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: '#/definitions/LabResourceCostProperties' readOnly: true type: array startDateTime: description: The start time of the cost data. format: date-time type: string targetCost: $ref: '#/definitions/TargetCostProperties' description: The target cost properties uniqueIdentifier: description: The unique immutable identifier of a resource (Guid). readOnly: true type: string type: object 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: '#/definitions/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 CloudError: description: Error from a REST request. properties: error: $ref: '#/definitions/CloudErrorBody' description: The cloud error that occurred type: object x-ms-external: true 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 CloudErrorBody: description: Body of an error from a REST request. properties: code: description: The error code. type: string details: description: Inner errors. items: $ref: '#/definitions/CloudErrorBody' type: array message: description: The error message. type: string target: description: The error target. type: string type: object x-ms-external: true PercentageCostThresholdProperties: description: Properties of a percentage cost threshold. properties: thresholdValue: description: The cost threshold value. format: double type: number 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 parameters: resourceGroupName: description: The name of the resource group. in: path name: resourceGroupName required: true type: string x-ms-parameter-location: method subscriptionId: description: The subscription ID. in: path name: subscriptionId required: true type: string api-version: default: '2018-09-15' description: Client API version. in: query name: api-version required: true type: string securityDefinitions: azure_auth: authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize description: OAuth2 Implicit Grant flow: implicit scopes: user_impersonation: Access Microsoft Azure type: oauth2