| Required role: | TenantReader |
| GET | /api/deployments/{Id}/structure | Returns the structure of a deployment | |
|---|---|---|---|
| GET | /deployments/{Id}/structure | Returns the structure of a deployment |
namespace CoreService.ServiceModel.Dtos.Deployments.Crud
open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
type ObjectTypes =
| None = 0
| ConfigItem = 1
| Tenant = 2
| Collection = 3
| Resource = 4
| ComputeNode = 5
| VirtualMachine = 6
| PhysicalMachine = 7
| Disk = 8
| Subnet = 9
| IPAddress = 10
| Job = 11
| JobEvent = 12
| FreezePeriod = 13
| ResourceGroup = 14
| Deployment = 15
| ResourceGroupTemplate = 16
| DeploymentTemplate = 17
| ResourceProvider = 18
| GenericResource = 19
| Role = 20
| Permission = 21
| User = 22
| PatchingWindow = 23
| Update = 24
| ReportDefinition = 25
| TimeSeries = 26
| DataPoint = 27
| Action = 28
| ActionAssignment = 29
| UserNote = 30
[<AllowNullLiteral>]
type HierarchyItemDto() =
member val Id:Guid = new Guid() with get,set
member val ConfigItemType:ObjectTypes = new ObjectTypes() with get,set
member val Name:String = null with get,set
member val DisplayName:String = null with get,set
member val Description:String = null with get,set
[<AllowNullLiteral>]
type NestedHierarchyItemDto() =
inherit HierarchyItemDto()
member val Children:ResizeArray<NestedHierarchyItemDto> = null with get,set
///<summary>
///Returns the structure of a deployment (deployment → resource groups → resources)
///</summary>
[<Api(Description="Returns the structure of a deployment (deployment → resource groups → resources)")>]
[<ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof<NestedHierarchyItemDto>, StatusCode=200)>]
[<AllowNullLiteral>]
type GetDeploymentStructure() =
interface IGet
[<ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")>]
member val Id:Guid = new Guid() with get,set
[<ApiMember(DataType="string", IsRequired=true, ParameterType="header")>]
[<Validate(Validator="NotEmpty")>]
member val TenantName:String = null with get,set
F# GetDeploymentStructure 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/deployments/{Id}/structure HTTP/1.1
Host: core.starburst.svc
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"children":[{"children":[{"children":[{"children":null,"id":"00000000-0000-0000-0000-000000000000","configItemType":"None","name":"String","displayName":"String","description":"String"}],"id":"00000000-0000-0000-0000-000000000000","configItemType":"None","name":"String","displayName":"String","description":"String"}],"id":"00000000-0000-0000-0000-000000000000","configItemType":"None","name":"String","displayName":"String","description":"String"}],"id":"00000000-0000-0000-0000-000000000000","configItemType":"None","name":"String","displayName":"String","description":"String"}