| 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 java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Returns the template definition
*/
@Api(Description="Returns the template definition")
@ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=TemplateDefinitionDto.class, StatusCode=200)
public static class GetResourceGroupTemplateDefinition implements IGetSingleRequest, IHasTenantName, IGet
{
@ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
public UUID id = null;
/**
* The templates name
*/
@ApiMember(DataType="string", Description="The templates name", ParameterType="query")
public String name = null;
/**
* The templates version
*/
@ApiMember(DataType="string", Description="The templates version", ParameterType="query")
public String version = null;
@ApiMember(DataType="string", IsRequired=true, ParameterType="header")
@Validate(Validator="NotEmpty")
public String tenantName = null;
@ApiMember(IsRequired=true, ParameterType="query")
public TemplateLanguages definitionFormat = null;
/**
* If true, also soft deleted items will be returned
*/
@ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
public Boolean includeDeleted = null;
@ApiMember(ParameterType="query", Verb="GET")
public Boolean includeReferencedObjects = null;
public UUID getId() { return id; }
public GetResourceGroupTemplateDefinition setId(UUID value) { this.id = value; return this; }
public String getName() { return name; }
public GetResourceGroupTemplateDefinition setName(String value) { this.name = value; return this; }
public String getVersion() { return version; }
public GetResourceGroupTemplateDefinition setVersion(String value) { this.version = value; return this; }
public String getTenantName() { return tenantName; }
public GetResourceGroupTemplateDefinition setTenantName(String value) { this.tenantName = value; return this; }
public TemplateLanguages getDefinitionFormat() { return definitionFormat; }
public GetResourceGroupTemplateDefinition setDefinitionFormat(TemplateLanguages value) { this.definitionFormat = value; return this; }
public Boolean isIncludeDeleted() { return includeDeleted; }
public GetResourceGroupTemplateDefinition setIncludeDeleted(Boolean value) { this.includeDeleted = value; return this; }
public Boolean isIncludeReferencedObjects() { return includeReferencedObjects; }
public GetResourceGroupTemplateDefinition setIncludeReferencedObjects(Boolean value) { this.includeReferencedObjects = value; return this; }
}
public static enum TemplateLanguages
{
Json,
Yaml;
}
public static class TemplateDefinitionDto
{
/**
* The schema version of the attached definition
*/
public Integer schemaVersion = null;
/**
* The template definition/body either as json or yaml
*/
public String definition = null;
public Integer getSchemaVersion() { return schemaVersion; }
public TemplateDefinitionDto setSchemaVersion(Integer value) { this.schemaVersion = value; return this; }
public String getDefinition() { return definition; }
public TemplateDefinitionDto setDefinition(String value) { this.definition = value; return this; }
}
}
Java 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"}