CoreService

<back to all web services

GetBillableResources

Statistics

Returns billable resource counts

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/statistics/billableresourcesReturns billable resource counts
GET/statistics/billableresourcesReturns billable resource counts
"use strict";
/** @typedef {'None'|'ConfigItem'|'Tenant'|'Collection'|'Resource'|'ComputeNode'|'VirtualMachine'|'PhysicalMachine'|'Disk'|'Subnet'|'IPAddress'|'Job'|'JobEvent'|'FreezePeriod'|'ResourceGroup'|'Deployment'|'ResourceGroupTemplate'|'DeploymentTemplate'|'ResourceProvider'|'GenericResource'|'Role'|'Permission'|'User'|'PatchingWindow'|'Update'|'ReportDefinition'|'TimeSeries'|'DataPoint'|'Action'|'ActionAssignment'|'UserNote'} */
export var ObjectTypes;
(function (ObjectTypes) {
    ObjectTypes["None"] = "None"
    ObjectTypes["ConfigItem"] = "ConfigItem"
    ObjectTypes["Tenant"] = "Tenant"
    ObjectTypes["Collection"] = "Collection"
    ObjectTypes["Resource"] = "Resource"
    ObjectTypes["ComputeNode"] = "ComputeNode"
    ObjectTypes["VirtualMachine"] = "VirtualMachine"
    ObjectTypes["PhysicalMachine"] = "PhysicalMachine"
    ObjectTypes["Disk"] = "Disk"
    ObjectTypes["Subnet"] = "Subnet"
    ObjectTypes["IPAddress"] = "IPAddress"
    ObjectTypes["Job"] = "Job"
    ObjectTypes["JobEvent"] = "JobEvent"
    ObjectTypes["FreezePeriod"] = "FreezePeriod"
    ObjectTypes["ResourceGroup"] = "ResourceGroup"
    ObjectTypes["Deployment"] = "Deployment"
    ObjectTypes["ResourceGroupTemplate"] = "ResourceGroupTemplate"
    ObjectTypes["DeploymentTemplate"] = "DeploymentTemplate"
    ObjectTypes["ResourceProvider"] = "ResourceProvider"
    ObjectTypes["GenericResource"] = "GenericResource"
    ObjectTypes["Role"] = "Role"
    ObjectTypes["Permission"] = "Permission"
    ObjectTypes["User"] = "User"
    ObjectTypes["PatchingWindow"] = "PatchingWindow"
    ObjectTypes["Update"] = "Update"
    ObjectTypes["ReportDefinition"] = "ReportDefinition"
    ObjectTypes["TimeSeries"] = "TimeSeries"
    ObjectTypes["DataPoint"] = "DataPoint"
    ObjectTypes["Action"] = "Action"
    ObjectTypes["ActionAssignment"] = "ActionAssignment"
    ObjectTypes["UserNote"] = "UserNote"
})(ObjectTypes || (ObjectTypes = {}));
export class HeaderDto {
    /** @param {{id?:string,name?:string,displayName?:string,objectType?:ObjectTypes}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    displayName;
    /** @type {ObjectTypes} */
    objectType;
}
export class BillableResourceDto {
    /** @param {{type?:ObjectTypes,totalCount?:number,billableCount?:number,billableResources?:HeaderDto[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ObjectTypes} */
    type;
    /** @type {number} */
    totalCount;
    /** @type {number} */
    billableCount;
    /** @type {HeaderDto[]} */
    billableResources = [];
}
export class BillableResourceSummaryDto {
    /** @param {{generatedOn?:string,billableResources?:{ [index:string]: BillableResourceDto; }}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    generatedOn;
    /** @type {{ [index:string]: BillableResourceDto; }} */
    billableResources = {};
}
export class GetBillableResources {
    /** @param {{tenantName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    tenantName;
}

JavaScript GetBillableResources DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /api/statistics/billableresources HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"generatedOn":"0001-01-01T00:00:00.0000000Z","billableResources":{"String":{"type":"None","totalCount":0,"billableCount":0,"billableResources":[{"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","objectType":"None"}]}}}