| Required role: | TenantReader |
| GET | /api/statistics/billableresources | Returns billable resource counts | |
|---|---|---|---|
| GET | /statistics/billableresources | Returns billable resource counts |
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
/**
* Returns billable resource counts
*/
@Api(Description="Returns billable resource counts")
@ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=BillableResourceSummaryDto::class, StatusCode=200)
open class GetBillableResources : IBaseRequest, IHasTenantName, IGet
{
@ApiMember(DataType="string", IsRequired=true, ParameterType="header")
@Validate(Validator="NotEmpty")
override var tenantName:String? = null
}
open class BillableResourceSummaryDto
{
open var generatedOn:Date? = null
open var billableResources:HashMap<String,BillableResourceDto> = HashMap<String,BillableResourceDto>()
}
open class BillableResourceDto
{
@SerializedName("type") open var Type:ObjectTypes? = null
open var totalCount:Long? = null
open var billableCount:Long? = null
open var billableResources:ArrayList<HeaderDto> = ArrayList<HeaderDto>()
}
enum class ObjectTypes
{
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,
}
open class HeaderDto : IHasIdName, IHasObjectType
{
open var id:UUID? = null
override var name:String? = null
open var displayName:String? = null
override var objectType:ObjectTypes? = null
}
Kotlin 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
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"}]}}}