| Required role: | TenantReader |
| GET | /api/resourcegrouptemplates/{Id} | Returns a resourcegroup template by its id | |
|---|---|---|---|
| GET | /resourcegrouptemplates/{Id} | Returns a resourcegroup template by its id |
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
/**
* Returns a resourcegroup template by its id
*/
@Api(Description="Returns a resourcegroup template by its id")
@ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=ResourceGroupTemplateDto::class, StatusCode=200)
open class GetResourceGroupTemplate : IGetSingleRequest, IHasTenantName, IGet
{
@ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
open var id:UUID? = null
@ApiMember(DataType="string", IsRequired=true, ParameterType="header")
@Validate(Validator="NotEmpty")
override var tenantName:String? = null
/**
* If true, also soft deleted items will be returned
*/
@ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
override var includeDeleted:Boolean? = null
/**
* If true, also include the json definition
*/
@ApiMember(Description="If true, also include the json definition", ParameterType="query")
open var includeDefinition:Boolean? = null
@ApiMember(ParameterType="query", Verb="GET")
override var includeReferencedObjects:Boolean? = null
}
open class ResourceGroupTemplateDto : ConfigItemDto(), IHasTenantId
{
override var tenantId:UUID? = null
/**
* The schema version of the attached definition (json/yaml structure)
*/
open var schemaVersion:Int? = null
/**
* The version of the template (changes with each change to the template)
*/
open var version:String? = null
/**
* The version in a numeric (padded) form which can be used for sorting
*/
open var versionNumeric:Int? = null
/**
* The template definition/body either as json or yaml
*/
open var definition:String? = null
/**
* Template variables
*/
open var variables:IList<VariableDto>? = null
/**
* Template parameters
*/
open var parameters:IList<ParameterDto>? = null
/**
* The template with the highest version number has IsLatest set to true
*/
open var isLatest:Boolean? = null
/**
* List of contained resources
*/
open var resourceTemplates:IList<ResourceTemplateDto>? = null
}
open class ConfigItemDto : IConfigItem
{
open var id:UUID? = null
open var name:String? = null
override var displayName:String? = null
override var description:String? = null
open var objectType:ObjectTypes? = null
override var selfLink:String? = null
override var tags:IList<TagDto>? = null
open var path:IList<PathItemDto>? = null
open var created:Date? = null
open var createUser:String? = null
open var createUserId:String? = null
open var modified:Date? = null
open var modifyUser:String? = null
open var modifyUserId:String? = null
open var isDeleted:Boolean? = null
open var deleted:Date? = null
open var deleteUser:String? = null
open var deleteUserId:String? = null
open var links:IList<LinkDto>? = null
}
enum class ObjectTypes
{
None,
ConfigItem,
Tenant,
Collection,
Resource,
ComputeNode,
VirtualMachine,
PhysicalMachine,
Disk,
Subnet,
IpAddress,
Job,
JobEvent,
FreezePeriod,
ResourceGroup,
Deployment,
ResourceGroupTemplate,
DeploymentTemplate,
ResourceProvider,
GenericResource,
Role,
Permission,
User,
PatchingWindow,
Update,
ReportDefinition,
TimeSeries,
DataPoint,
Action,
ActionAssignment,
UserNote,
}
open class TagDto
{
open var name:String? = null
open var value:String? = null
open var isProtected:Boolean? = null
}
open class PathItemDto
{
open var label:String? = null
open var link:String? = null
open var objectType:ObjectTypes? = null
open var objectId:UUID? = null
}
open class LinkDto
{
open var caption:String? = null
open var rel:String? = null
open var hRef:String? = null
open var method:String? = null
}
open class VariableDto
{
open var name:String? = null
/**
* Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false, List = [1,2,3,4]). Note: string values need extra quotes
*/
open var value:String? = null
/**
* The data type of the value property
*/
@SerializedName("type") open var Type:ValueDataType? = null
open var description:String? = null
open var isInherited:Boolean? = null
open var environment:Environments? = null
}
enum class ValueDataType
{
String,
Number,
Boolean,
List,
}
enum class Environments
{
Lab,
Poc,
Dev,
Test,
Int,
Uat,
Prod,
}
open class ParameterDto
{
open var name:String? = null
open var description:String? = null
/**
* Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false). Note: string values need extra quotes
*/
open var value:String? = null
/**
* Optional default value for the frontend. Needs to be in the same format as the value
*/
@SerializedName("default") open var Default:String? = null
/**
* Optional parameters do not need to have a value. Default -> Optional=false
*/
open var optional:Boolean? = null
/**
* The data type of the value and default property
*/
@SerializedName("type") open var Type:ParameterValueType? = null
open var validation:String? = null
}
enum class ParameterValueType
{
String,
Number,
Boolean,
SecureString,
}
open class ResourceTemplateDto
{
open var name:String? = null
open var displayName:String? = null
open var description:String? = null
@SerializedName("type") open var Type:ObjectTypes? = null
}
Kotlin GetResourceGroupTemplate 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} HTTP/1.1
Host: core.starburst.svc
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"tenantId":"00000000-0000-0000-0000-000000000000","schemaVersion":0,"version":"String","versionNumeric":0,"definition":"String","variables":null,"parameters":null,"isLatest":false,"resourceTemplates":null,"id":"00000000-0000-0000-0000-000000000000","name":"String","displayName":"String","description":"String","objectType":"None","selfLink":"String","tags":null,"path":null,"created":"0001-01-01T00:00:00.0000000Z","createUser":"String","createUserId":"String","modified":"0001-01-01T00:00:00.0000000Z","modifyUser":"String","modifyUserId":"String","isDeleted":false,"deleted":"0001-01-01T00:00:00.0000000Z","deleteUser":"String","deleteUserId":"String","links":null}