| Required role: | TenantReader |
| GET | /api/resourcegrouptemplates/{Id}/definition/ | Returns the template definition | |
|---|---|---|---|
| GET | /api/resourcegrouptemplates/{Name}/{Version}/definition | Returns the template definition | |
| GET | /resourcegrouptemplates/{Id}/definition/ | Returns the template definition | |
| GET | /resourcegrouptemplates/{Name}/{Version}/definition | Returns the template definition |
import Foundation
import ServiceStack
/**
* Returns the template definition
*/
// @Api(Description="Returns the template definition")
// @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof(TemplateDefinitionDto), StatusCode=200)
public class GetResourceGroupTemplateDefinition : IGetSingleRequest, IHasTenantName, IGet, Codable
{
// @ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
public var id:String?
/**
* The templates name
*/
// @ApiMember(DataType="string", Description="The templates name", ParameterType="query")
public var name:String
/**
* The templates version
*/
// @ApiMember(DataType="string", Description="The templates version", ParameterType="query")
public var version:String
// @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
// @Validate(Validator="NotEmpty")
public var tenantName:String
// @ApiMember(IsRequired=true, ParameterType="query")
public var definitionFormat:TemplateLanguages
/**
* If true, also soft deleted items will be returned
*/
// @ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
public var includeDeleted:Bool?
// @ApiMember(ParameterType="query", Verb="GET")
public var includeReferencedObjects:Bool?
required public init(){}
}
public enum TemplateLanguages : String, Codable
{
case Json
case Yaml
}
public class TemplateDefinitionDto : Codable
{
/**
* The schema version of the attached definition
*/
public var schemaVersion:Int
/**
* The template definition/body either as json or yaml
*/
public var definition:String
required public init(){}
}
Swift GetResourceGroupTemplateDefinition 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/resourcegrouptemplates/{Id}/definition/ HTTP/1.1
Host: core.starburst.svc
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"schemaVersion":0,"definition":"String"}