{"id":"https://schema.management.azure.com/schemas/viewdefinition/0.0.1-preview/ViewDefinition.json#","$schema":"http://json-schema.org/draft-04/schema#","title":"View Definition","description":"An Azure Managed Application View Definition.","type":"object","properties":{"$schema":{"type":"string","description":"JSON schema reference."},"contentVersion":{"type":"string","pattern":"(^[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+$)","description":"A 4 number format for the version number of the view file. For example, 1.0.0.0."},"views":{"type":"array","description":"The list of views.","items":{"oneOf":[{"$ref":"#/definitions/Overview"},{"$ref":"#/definitions/Metrics"},{"$ref":"#/definitions/CustomResources"}]}}},"additionalProperties":false,"required":["$schema","contentVersion","views"],"definitions":{"View":{"discriminator":"kind","properties":{"kind":{"type":"string","description":"The kind of view.","x-ms-enum":{"name":"kind","modelAsString":false},"enum":["Overview","Metrics","CustomResources"]},"name":{"type":"string","description":"The name of the view."},"id":{"type":"string","description":"The id of the view."}},"required":["kind"],"description":"A configuration of a visualization."},"Overview":{"allOf":[{"$ref":"#/definitions/View"}],"properties":{"kind":{"type":"string","description":"The kind of view.","x-ms-enum":{"name":"kind","modelAsString":false},"enum":["Overview"]},"properties":{"type":"object","properties":{"displayName":{"type":"string","description":"The displayed title of the view."},"version":{"type":"string","enum":["1.0.0"],"x-ms-enum":{"modelAsString":true,"name":"ViewVersion"},"description":"The version of the platform used to render the view."},"header":{"type":"string","description":"The header value of the overview blade."},"description":{"type":"string","description":"The description of the overview blade."},"commands":{"type":"array","items":{"$ref":"#/definitions/Command"},"description":"The array of toolbar buttons of the overview blade."}}}}},"Metrics":{"allOf":[{"$ref":"#/definitions/View"}],"properties":{"kind":{"type":"string","description":"The kind of view.","x-ms-enum":{"name":"kind","modelAsString":false},"enum":["Metrics"]},"properties":{"type":"object","properties":{"displayName":{"type":"string","description":"The displayed menu item of the view."},"version":{"type":"string","enum":["1.0.0"],"x-ms-enum":{"modelAsString":true,"name":"ViewVersion"},"description":"The version of the platform used to render the view."},"charts":{"type":"array","items":{"$ref":"#/definitions/Chart"},"description":"The array of charts of the metrics blade."}},"required":["charts"]}}},"CustomResources":{"allOf":[{"$ref":"#/definitions/View"}],"properties":{"kind":{"type":"string","description":"The kind of view.","x-ms-enum":{"name":"kind","modelAsString":false},"enum":["CustomResources"]},"properties":{"type":"object","properties":{"displayName":{"type":"string","description":"The displayed title of the view."},"version":{"type":"string","enum":["1.0.0"],"x-ms-enum":{"modelAsString":true,"name":"ViewVersion"},"description":"The version of the platform used to render the view."},"resourceType":{"type":"string","description":"The custom resource type."},"icon":{"type":"string","description":"The icon of the view.","x-ms-enum":{"name":"icon","modelAsString":false},"examples":["Add","Delete","Refresh","Go","Stop","Start","Link","Polychromatic.VirtualMachine","Polychromatic.Preview"]},"createUIDefinition":{"type":"object","description":"The Create UI Definition schema for create custom resource command.","$ref":"https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json"},"editUIDefinition":{"type":"object","description":"The Create UI Definition schema for edit custom resource command.","$ref":"https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json"},"commands":{"type":"array","items":{"$ref":"#/definitions/Command"},"description":"The array of toolbar buttons of the CustomResources blade."},"columns":{"type":"array","items":{"$ref":"#/definitions/Column"},"description":"The array of columns of the custom resource."}},"required":["displayName","version","resourceType"]}},"required":["properties"],"description":"The configuration of a visualization for CustomResources."},"Chart":{"type":"object","properties":{"displayName":{"type":"string","description":"The displayed title of the chart."},"chartType":{"type":"string","description":"The visualization to use for this chart. (Defaults to line chart)","x-ms-enum":{"name":"chartType","modelAsString":true},"enum":["Bar","Line","Area","Scatter"]},"metrics":{"type":"array","items":{"$ref":"#/definitions/ChartMetrics"},"description":"The metrics to plot on this chart."}},"required":["displayName","metrics"],"description":"The chart configuration."},"ChartMetrics":{"type":"object","properties":{"name":{"type":"string","description":"The name of the metric."},"aggregationType":{"type":"string","description":"The aggregation type to use for this metric.","x-ms-enum":{"name":"aggregationType","modelAsString":true},"enum":["none","sum","min","max","avg","unique","percentile","count"]},"namespace":{"type":"string","description":"Additional information to use when determining the correct metrics provider."},"resourceTagFilter":{"type":"array","items":{"type":"string"},"description":"The resource tags (OR'd) for which metrics would be displayed. This is on top of resource type filter."},"resourceType":{"type":"string","description":"The resource type for which metrics would be displayed."}},"required":["name","aggregationType","resourceType"],"description":"The chart metrics configuration."},"Command":{"type":"object","properties":{"displayName":{"type":"string","description":"The displayed name of the command button."},"path":{"type":"string","description":"The custom action name."},"icon":{"type":"string","description":"The icon of the command button.","x-ms-enum":{"name":"icon","modelAsString":false},"examples":["Add","Delete","Refresh","Move","Check","Go","Stop","Start","Link","Attachment","LaunchCurrent"]},"createUIDefinition":{"type":"object","description":"The Create UI Definition schema for the command.","$ref":"https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json"}},"required":["displayName","path"],"description":"The toolbar button configuration."},"Column":{"type":"object","properties":{"key":{"type":"string","description":"The key of the property to display in a view. If nested, use dot as delimiter.","example":"properties.username"},"displayName":{"type":"string","description":"The display name of the property to display in a view.","example":"Username"},"optional":{"type":"boolean","description":"If true, the column will not be displayed in a view by default."}},"required":["key","displayName"],"description":"The configuration of a column."}}}