usage.export.by.tenant.schema.json
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://example.com/usage.export.by.tenant.schema.json",
"type": "object",
"title": "The root schema",
"description": "The root schema comprises the entire JSON document.",
"default": {},
"examples": [
{
"title": "Metered usage by tenant",
"period": {
"startTime": "2020-06-01T00:00:00+0000",
"endTime": "2020-06-30T11:59:59+0000",
"hours": 720
},
"usage": [
{
"name": "partner-abc",
"id": "msp-1234",
"data": [
{
"meteringTier": "eventsOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "inventoryOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "upDownOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "fullyManaged",
"unweighted": 250,
"weighted": 100
},
{
"meteringTier": "all",
"unweighted": 250,
"weighted": 100
}
]
}
]
}
],
"properties": {
"title": {
"$id": "#/properties/title",
"type": "string",
"title": "The title schema",
"description": "Usage export by tenant",
"default": "",
"examples": [
"Metered usage by tenant"
]
},
"period": {
"$id": "#/properties/period",
"type": "object",
"title": "Selected time period of the usage export",
"description": "Selected time period for the usage export by tenat.",
"default": {},
"examples": [
{
"startTime": "2020-06-01T00:00:00+0000",
"endTime": "2020-06-30T11:59:59+0000",
"hours": 720
}
],
"properties": {
"startTime": {
"$id": "#/properties/period/properties/startTime",
"type": "string",
"title": "The startTime schema",
"description": "The start time schema for usage export by tenant.",
"default": "",
"examples": [
"2020-06-01T00:00:00+0000"
]
},
"endTime": {
"$id": "#/properties/period/properties/endTime",
"type": "string",
"title": "The endTime schema",
"description": "The end time schema for usage export by tenant.",
"default": "",
"examples": [
"2020-06-30T11:59:59+0000"
]
},
"hours": {
"$id": "#/properties/period/properties/hours",
"type": "integer",
"title": "The hours schema",
"description": "Total usage export duration hours.",
"default": 0,
"examples": [
720
]
}
}
},
"usage": {
"$id": "#/properties/usage",
"type": "array",
"title": "The usage schema",
"description": "The data usage for each metering tier at tenant level.",
"default": [],
"examples": [
[
{
"name": "partner-abc",
"id": "msp-1234",
"data": [
{
"meteringTier": "eventsOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "inventoryOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "upDownOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "fullyManaged",
"unweighted": 250,
"weighted": 100
},
{
"meteringTier": "all",
"unweighted": 250,
"weighted": 100
}
]
}
]
],
"items": {
"$id": "#/properties/usage/items",
"anyOf": [
{
"$id": "#/properties/usage/items/anyOf/0",
"type": "object",
"title": "The first anyOf schema",
"description": "An explanation about the purpose of this instance.",
"default": {},
"examples": [
{
"name": "partner-abc",
"id": "msp-1234",
"data": [
{
"meteringTier": "eventsOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "inventoryOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "upDownOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "fullyManaged",
"unweighted": 250,
"weighted": 100
},
{
"meteringTier": "all",
"unweighted": 250,
"weighted": 100
}
]
}
],
"properties": {
"name": {
"$id": "#/properties/usage/items/anyOf/0/properties/name",
"type": "string",
"title": "The name schema",
"description": "Tenant name",
"default": "",
"examples": [
"partner-abc"
]
},
"id": {
"$id": "#/properties/usage/items/anyOf/0/properties/id",
"type": "string",
"title": "The id schema",
"description": "Tenant id.",
"default": "",
"examples": [
"msp-1234"
]
},
"data": {
"$id": "#/properties/usage/items/anyOf/0/properties/data",
"type": "array",
"title": "The data schema",
"description": "Resource being metered for usage",
"default": [],
"examples": [
[
{
"meteringTier": "eventsOnly",
"unweighted": 50,
"weighted": 50
},
{
"meteringTier": "inventoryOnly",
"unweighted": 50,
"weighted": 50
}
]
],
"items": {
"$id": "#/properties/usage/items/anyOf/0/properties/data/items",
"anyOf": [
{
"$id": "#/properties/usage/items/anyOf/0/properties/data/items/anyOf/0",
"type": "object",
"title": "The first anyOf schema",
"description": "List of weighted and un-weighted data for metering tier.",
"default": {},
"examples": [
{
"meteringTier": "eventsOnly",
"unweighted": 50,
"weighted": 50
}
],
"properties": {
"meteringTier": {
"$id": "#/properties/usage/items/anyOf/0/properties/data/items/anyOf/0/properties/meteringTier",
"type": "string",
"title": "The meteringTier schema",
"description": "Metering Entity",
"default": "",
"examples": [
"eventsOnly","inventoryOnly","fullyManaged","upDownOnly","all"
]
},
"unweighted": {
"$id": "#/properties/usage/items/anyOf/0/properties/data/items/anyOf/0/properties/unweighted",
"type": "integer",
"title": "The unweighted schema",
"description": "Direct Weightage",
"default": 0,
"examples": [
50
]
},
"weighted": {
"$id": "#/properties/usage/items/anyOf/0/properties/data/items/anyOf/0/properties/weighted",
"type": "integer",
"title": "The weighted schema",
"description": "Weightage given",
"default": 0,
"examples": [
50
]
}
}
}
]
}
}
}
}
]
}
}
}
}
usage.export.by.resourcetype.schema
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://example.com/usage.export.by.resourcetype.schema.json",
"type": "object",
"title": "The root schema",
"description": "The root schema comprises the entire JSON document.",
"default": {},
"examples": [
{
"title": "Metered usage by resource type",
"period": {
"startTime": "2021-06-01T00:00:00+0000",
"endTime": "2021-06-30T23:59:59+0000",
"hours": 720
},
"usage": [
{
"name": "Modern Enterprise Demo",
"id": "msp-588058",
"data": [
{
"resourceType": "REDIS_CACHE",
"meteringTier": "fullyManaged",
"unweighted": 0.0,
"weighted": 1.0
},
{
"resourceType": "Xen Server",
"meteringTier": "fullyManaged",
"unweighted": 62.0,
"weighted": 52.0
},
{
"resourceType": "Firewall",
"meteringTier": "inventoryOnly",
"unweighted": 63.0,
"weighted": 16.5
},
{
"resourceType": "VMWAREHOST",
"meteringTier": "fullyManaged",
"unweighted": 3.0,
"weighted": 3.0
},
{
"resourceType": "Blade Server",
"meteringTier": "fullyManaged",
"unweighted": 69.0,
"weighted": 53.0
}
]
}
]
}
],
"properties": {
"title": {
"$id": "#/properties/title",
"type": "string",
"title": "The title schema",
"description": "Metered usage by resource type.",
"default": "",
"examples": [
"Metered usage by resource type"
]
},
"period": {
"$id": "#/properties/period",
"type": "object",
"title": "The period schema",
"description": "The selected time period for usage export by resource type.",
"default": {},
"examples": [
{
"startTime": "2021-06-01T00:00:00+0000",
"endTime": "2021-06-30T23:59:59+0000",
"hours": 720
}
],
"properties": {
"startTime": {
"$id": "#/properties/period/properties/startTime",
"type": "string",
"title": "The startTime schema",
"description": "The start time schema for usage export by resource type.",
"default": "",
"examples": [
"2021-06-01T00:00:00+0000"
]
},
"endTime": {
"$id": "#/properties/period/properties/endTime",
"type": "string",
"title": "The endTime schema",
"description": "The end time schema for usage export by resource type.",
"default": "",
"examples": [
"2021-06-30T23:59:59+0000"
]
},
"hours": {
"$id": "#/properties/period/properties/hours",
"type": "integer",
"title": "The hours schema",
"description": "Total usage export duration hours.",
"default": 0,
"examples": [
720
]
}
}
},
"usage": {
"$id": "#/properties/usage",
"type": "array",
"title": "The usage schema",
"description": "The data usage for each resource type and metering tier.",
"default": [],
"examples": [
[
{
"name": "Modern Enterprise Demo",
"id": "msp-588058",
"data": [
{
"resourceType": "REDIS_CACHE",
"meteringTier": "fullyManaged",
"unweighted": 0.0,
"weighted": 1.0
},
{
"resourceType": "Xen Server",
"meteringTier": "fullyManaged",
"unweighted": 62.0,
"weighted": 52.0
},
{
"resourceType": "Firewall",
"meteringTier": "inventoryOnly",
"unweighted": 63.0,
"weighted": 16.5
},
{
"resourceType": "VMWAREHOST",
"meteringTier": "fullyManaged",
"unweighted": 3.0,
"weighted": 3.0
},
{
"resourceType": "Blade Server",
"meteringTier": "fullyManaged",
"unweighted": 69.0,
"weighted": 53.0
}
]
}
]
],
"items": {
"$id": "#/properties/usage/items",
"anyOf": [
{
"$id": "#/properties/usage/items/anyOf/0",
"type": "object",
"title": "The first anyOf schema",
"description": "An explanation about the purpose of this instance.",
"default": {},
"examples": [
{
"name": "Modern Enterprise Demo",
"id": "msp-588058",
"data": [
{
"resourceType": "REDIS_CACHE",
"meteringTier": "fullyManaged",
"unweighted": 0.0,
"weighted": 1.0
},
{
"resourceType": "Xen Server",
"meteringTier": "fullyManaged",
"unweighted": 62.0,
"weighted": 52.0
},
{
"resourceType": "Firewall",
"meteringTier": "inventoryOnly",
"unweighted": 63.0,
"weighted": 16.5
},
{
"resourceType": "VMWAREHOST",
"meteringTier": "fullyManaged",
"unweighted": 3.0,
"weighted": 3.0
},
{
"resourceType": "Blade Server",
"meteringTier": "fullyManaged",
"unweighted": 69.0,
"weighted": 53.0
}
]
}
],
"properties": {
"name": {
"$id": "#/properties/usage/items/anyOf/0/properties/name",
"type": "string",
"title": "The name schema",
"description": "Tenant name.",
"default": "",
"examples": [
"Modern Enterprise Demo"
]
},
"id": {
"$id": "#/properties/usage/items/anyOf/0/properties/id",
"type": "string",
"title": "The id schema",
"description": "Tenant id.",
"default": "",
"examples": [
"msp-588058"
]
},
"data": {
"$id": "#/properties/usage/items/anyOf/0/properties/data",
"type": "array",
"title": "The data schema",
"description": "Resource being metered for usage.",
"default": [],
"examples": [
[
{
"resourceType": "REDIS_CACHE",
"meteringTier": "fullyManaged",
"unweighted": 0.0,
"weighted": 1.0
},
{
"resourceType": "Xen Server",
"meteringTier": "fullyManaged",
"unweighted": 62.0,
"weighted": 52.0
}
]
],
"items": {
"$id": "#/properties/usage/items/anyOf/0/properties/data/items",
"anyOf": [
{
"$id": "#/properties/usage/items/anyOf/0/properties/data/items/anyOf/0",
"type": "object",
"title": "The first anyOf schema",
"description": "List of weighted and un-weighted data for each resource type and metering tier",
"default": {},
"examples": [
{
"resourceType": "REDIS_CACHE",
"unweighted": 0.0,
"weighted": 1.0
}
],
"properties": {
"resourceType": {
"$id": "#/properties/usage/items/anyOf/0/properties/data/items/anyOf/0/properties/resourceType",
"type": "string",
"title": "The resourceType schema",
"description": "The type of resourc being metered.All the OpsRamp supported Resource Type. Listed are few examples",
"default": "",
"examples": [
"REDIS_CACHE" , "Xen Server", "VMWAREHOST","Firewall", "Blade Server"
]
},
"meteringTier": {
"$id": "#/properties/usage/items/anyOf/0/properties/data/items/anyOf/0/properties/meteringTier",
"type": "string",
"title": "The meteringTier schema",
"description": "Metering tier name of the metering usage metric .",
"default": "",
"examples": [
"fullyManaged", "inventoryOnly","eventsOnly","upDownOnly", "all"
]
},
"unweighted": {
"$id": "#/properties/usage/items/anyOf/0/properties/data/items/anyOf/0/properties/unweighted",
"type": "number",
"title": "The unweighted schema",
"description": "Total unweighted resource count for a metering usage metric",
"default": 0.0,
"examples": [
0.0
]
},
"weighted": {
"$id": "#/properties/usage/items/anyOf/0/properties/data/items/anyOf/0/properties/weighted",
"type": "number",
"title": "The weighted schema",
"description": "Total weighted resource count for a metering usage metric.",
"default": 0.0,
"examples": [
1.0
]
}
}
}
]
}
}
}
}
]
}
}
}
}