| 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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
Object = TypeVar('Object')
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TemplateDefinitionDto:
schema_version: int = 0
"""
The schema version of the attached definition
"""
definition: Optional[str] = None
"""
The template definition/body either as json or yaml
"""
class TemplateLanguages(str, Enum):
JSON = 'Json'
YAML = 'Yaml'
# @Api(Description="Returns the template definition")
# @ApiResponse(Description="Success", IsDefaultResponse=true, ResponseType=typeof(TemplateDefinitionDto), StatusCode=200)
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetResourceGroupTemplateDefinition(IGetSingleRequest, IHasTenantName, IGet):
"""
Returns the template definition
"""
# @ApiMember(DataType="string", Format="guid", IsRequired=true, ParameterType="path")
id: Optional[str] = None
# @ApiMember(DataType="string", Description="The templates name", ParameterType="query")
name: Optional[str] = None
"""
The templates name
"""
# @ApiMember(DataType="string", Description="The templates version", ParameterType="query")
version: Optional[str] = None
"""
The templates version
"""
# @ApiMember(DataType="string", IsRequired=true, ParameterType="header")
# @Validate(Validator="NotEmpty")
tenant_name: Optional[str] = None
# @ApiMember(IsRequired=true, ParameterType="query")
definition_format: Optional[TemplateLanguages] = None
# @ApiMember(Description="If true, also soft deleted items will be returned", ParameterType="query")
include_deleted: Optional[bool] = None
"""
If true, also soft deleted items will be returned
"""
# @ApiMember(ParameterType="query", Verb="GET")
include_referenced_objects: Optional[bool] = None
Python 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"}