swagger: '2.0' info: version: 2020-08-01-preview title: Microsoft Azure AccessControlClient AccessConnector Costs API schemes: - https tags: - name: Costs paths: ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/costs/{name} : get: tags: - Costs description: Get cost. operationId: microsoftAzureCostsGet parameters: - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - name: labName in: path description: The name of the lab. required: true type: string - name: name in: path description: The name of the cost. required: true type: string - name: $expand in: query description: 'Specify the $expand query. Example: ''properties($expand=labCostDetails)''' type: string - $ref: '#/parameters/api-version' responses: '200': description: OK schema: $ref: '#/definitions/LabCost' default: description: BadRequest schema: $ref: '#/definitions/CloudError' x-ms-examples: Costs_Get: $ref: ./examples/Costs_Get.json summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Devtestlab Labs Labname Costs Name put: tags: - Costs description: Create or replace an existing cost. operationId: microsoftAzureCostsCreateorupdate parameters: - $ref: '#/parameters/subscriptionId' - $ref: '#/parameters/resourceGroupName' - name: labName in: path description: The name of the lab. required: true type: string - name: name in: path description: The name of the cost. required: true type: string - name: labCost in: body description: A cost item. required: true schema: $ref: '#/definitions/LabCost' - $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' x-ms-examples: Costs_CreateOrUpdate: $ref: ./examples/Costs_CreateOrUpdate.json summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups Resourcegroupname Providers Microsoft Devtestlab Labs Labname Costs Name definitions: LabResourceCostProperties: description: The properties of a resource cost item. type: object properties: resourcename: description: The name of the resource. type: string resourceUId: description: The unique identifier of the resource. type: string resourceCost: format: double description: The cost component of the resource cost item. type: number resourceType: description: The logical resource type (ex. virtualmachine, storageaccount) 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 resourceId: description: The ID of the resource type: string externalResourceId: description: The ID of the external resource type: string TargetCostProperties: description: Properties of a cost target. type: object properties: status: description: Target cost status enum: - Enabled - Disabled type: string x-ms-enum: name: TargetCostStatus modelAsString: true target: format: int32 description: Lab target cost type: integer costThresholds: description: Cost thresholds. type: array items: $ref: '#/definitions/CostThresholdProperties' cycleStartDateTime: format: date-time description: Reporting cycle start date. type: string cycleEndDateTime: format: date-time description: Reporting cycle end date. type: string cycleType: description: Reporting cycle type. enum: - CalendarMonth - Custom type: string x-ms-enum: name: ReportingCycleType modelAsString: true LabCost: description: A cost item. required: - properties type: object allOf: - $ref: '#/definitions/Resource' properties: properties: $ref: '#/definitions/LabCostProperties' description: The properties of the resource. x-ms-client-flatten: true Resource: description: An Azure resource. type: object properties: id: description: The identifier of the resource. type: string readOnly: true name: description: The name of the resource. type: string readOnly: true type: description: The type of the resource. type: string readOnly: true location: description: The location of the resource. type: string tags: description: The tags of the resource. type: object additionalProperties: type: string x-ms-azure-resource: true LabCostProperties: description: Properties of a cost item. type: object properties: targetCost: $ref: '#/definitions/TargetCostProperties' description: The target cost properties labCostSummary: $ref: '#/definitions/LabCostSummaryProperties' description: The lab cost summary component of the cost data. readOnly: true labCostDetails: description: The lab cost details component of the cost data. type: array items: $ref: '#/definitions/LabCostDetailsProperties' readOnly: true resourceCosts: description: The resource cost component of the cost data. type: array items: $ref: '#/definitions/LabResourceCostProperties' readOnly: true currencyCode: description: The currency code of the cost. type: string startDateTime: format: date-time description: The start time of the cost data. type: string endDateTime: format: date-time description: The end time of the cost data. type: string createdDate: format: date-time description: The creation date of the cost. type: string provisioningState: description: The provisioning status of the resource. type: string readOnly: true uniqueIdentifier: description: The unique immutable identifier of a resource (Guid). type: string readOnly: true CostThresholdProperties: description: Properties of a cost threshold item. type: object properties: thresholdId: description: The ID of the cost threshold item. type: string percentageThreshold: $ref: '#/definitions/PercentageCostThresholdProperties' description: The value of the percentage cost threshold. displayOnChart: description: Indicates whether this threshold will be displayed on cost charts. enum: - Enabled - Disabled type: string x-ms-enum: name: CostThresholdStatus modelAsString: true sendNotificationWhenExceeded: description: Indicates whether notifications will be sent when this threshold is exceeded. enum: - Enabled - Disabled type: string x-ms-enum: name: CostThresholdStatus modelAsString: true notificationSent: description: Indicates the datetime when notifications were last sent for this threshold. type: string CloudError: description: Error from a REST request. type: object properties: error: $ref: '#/definitions/CloudErrorBody' description: The cloud error that occurred x-ms-external: true LabCostDetailsProperties: description: The properties of a lab cost item. type: object properties: date: format: date-time description: The date of the cost item. type: string cost: format: double description: The cost component of the cost item. type: number costType: description: The type of the cost. enum: - Unavailable - Reported - Projected type: string x-ms-enum: name: CostType modelAsString: true CloudErrorBody: description: Body of an error from a REST request. type: object properties: code: description: The error code. type: string message: description: The error message. type: string target: description: The error target. type: string details: description: Inner errors. type: array items: $ref: '#/definitions/CloudErrorBody' x-ms-external: true PercentageCostThresholdProperties: description: Properties of a percentage cost threshold. type: object properties: thresholdValue: format: double description: The cost threshold value. type: number LabCostSummaryProperties: description: The properties of the cost summary. type: object properties: estimatedLabCost: format: double description: The cost component of the cost item. type: number parameters: resourceGroupName: name: resourceGroupName in: path description: The name of the resource group. required: true type: string x-ms-parameter-location: method subscriptionId: name: subscriptionId in: path description: The subscription ID. required: true type: string api-version: name: api-version in: query description: Client API version. required: true type: string default: '2018-09-15' x-ms-parameterized-host: hostTemplate: '{endpoint}' useSchemePrefix: false parameters: - $ref: '#/parameters/Endpoint'