CoreService

<back to all web services

CreateDeploymentTemplate

DeploymentTemplate - CRUD

Create a new deployment template

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
POST/api/deploymenttemplates/Create a new deployment template
POST/deploymenttemplates/Create a new deployment template
CreateDeploymentTemplate Parameters:
NameParameterData TypeRequiredDescription
TenantNameheaderstringYes
SchemaVersionbodyintegerYesThe version of the template structure

Valid Range: 1 - 255

DefinitionbodystringYesThe definition of the template (YAML)
AllowedEnvironmentsbodyarrayNoSpecify the environments the deployment template is allowed for
AllowedResourceProviderIdsbodyarrayNoSpecify the resource providers the deployment template is allowed for
Environments Enum:
Lab
Poc
Dev
Test
Int
Uat
Prod
DeploymentTemplateDto Parameters:
NameParameterData TypeRequiredDescription
TenantIdformGuidNo
SchemaVersionformintNoThe schema version of the attached definition (json/yaml structure)
VersionformstringYesThe version of the template (changes with each change to the template)
VersionNumericformintNoThe version in a numeric (padded) form which can be used for sorting
DefinitionformstringNoThe template definition as json/yaml
VariablesformIList<VariableDto>YesTemplate variables
ParametersformIList<ParameterDto>YesTemplate parameters
IsDisabledformboolNoDisabled templates should not be selected for deployments
IsLatestformboolNoThe template with the highest version number has IsLatest set to true
AllowedEnvironmentsformIList<Environments>NoThis template can be deployed only to the environments listed below
AllowedResourceProvidersformIList<ResourceProviderDto>NoThis template can be deployed only to the resource providers listed below
ResourceGroupTemplatesformIList<ResourceGroupTemplateDto>NoAn optional list of the child resource group templates
ConfigItemDto Parameters:
NameParameterData TypeRequiredDescription
IdformGuidNo
NameformstringYes
DisplayNameformstringYes
DescriptionformstringNo
ObjectTypeformObjectTypesNo
SelfLinkformstringYes
TagsformIList<TagDto>Yes
PathformIList<PathItemDto>Yes
CreatedformDateTimeNo
CreateUserformstringYes
CreateUserIdformstringYes
ModifiedformDateTimeNo
ModifyUserformstringYes
ModifyUserIdformstringYes
IsDeletedformboolNo
DeletedformDateTime?No
DeleteUserformstringNo
DeleteUserIdformstringNo
LinksformIList<LinkDto>Yes
ObjectTypes Enum:
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
TagDto Parameters:
NameParameterData TypeRequiredDescription
NameformstringYes
ValueformstringNo
IsProtectedformboolNo
PathItemDto Parameters:
NameParameterData TypeRequiredDescription
LabelformstringYes
LinkformstringYes
ObjectTypeformObjectTypesNo
ObjectIdformGuidNo
LinkDto Parameters:
NameParameterData TypeRequiredDescription
CaptionformstringYes
RelformstringYes
HRefformstringYes
MethodformstringYes
VariableDto Parameters:
NameParameterData TypeRequiredDescription
NameformstringYes
ValueformstringYesValue 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
TypeformValueDataTypeNoThe data type of the value property
DescriptionformstringNo
IsInheritedformboolNo
EnvironmentformEnvironments?No
ValueDataType Enum:
String
Number
Boolean
List
ParameterDto Parameters:
NameParameterData TypeRequiredDescription
NameformstringYes
DescriptionformstringNo
ValueformstringNoValue in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false). Note: string values need extra quotes
DefaultformstringNoOptional default value for the frontend. Needs to be in the same format as the value
OptionalformboolNoOptional parameters do not need to have a value. Default -> Optional=false
TypeformParameterValueTypeNoThe data type of the value and default property
ValidationformstringNo
ParameterValueType Enum:
String
Number
Boolean
SecureString
ResourceProviderDto Parameters:
NameParameterData TypeRequiredDescription
TenantIdformGuidNo
DefaultEnvironmentformEnvironmentsNoIf environment cannot be detected while scanning, default environment will be used
AllowedEnvironmentsformIList<Environments>YesList off all allowed environments for this resource provider
TypeformResourceProviderTypesNoDefines the provider type (e.g. Azure, Aws)
ConfigformIList<ProviderConfigEntryDto>YesAdditional generic data which varies depending on ProviderType
IsDisabledformboolNoDisabled ResourceProviders cannot be selected for new deployments
IsReadyForDeploymentsformboolNoShows if a ResourceProvider has been initialized and can accept deployments (resources)
CostCurrentMonthformdecimalNoThe cost for the current month
CostLastMonthformdecimalNoThe cost for the last month
CostCurrencyformstringYesThe cost currency
ResourceProviderTypes Enum:
Azure
AmazonWebServices
GoogleCloudPlatform
ActiveDirectoryServices
DomainNameSystem
SwisscomESC
AzureKeyVault
ProviderConfigEntryDto Parameters:
NameParameterData TypeRequiredDescription
NameformstringYes
ValueformstringYes
isSecureformboolNo
ResourceGroupTemplateDto Parameters:
NameParameterData TypeRequiredDescription
TenantIdformGuidNo
SchemaVersionformintNoThe schema version of the attached definition (json/yaml structure)
VersionformstringYesThe version of the template (changes with each change to the template)
VersionNumericformintNoThe version in a numeric (padded) form which can be used for sorting
DefinitionformstringNoThe template definition/body either as json or yaml
VariablesformIList<VariableDto>YesTemplate variables
ParametersformIList<ParameterDto>YesTemplate parameters
IsLatestformboolNoThe template with the highest version number has IsLatest set to true
ResourceTemplatesformIList<ResourceTemplateDto>YesList of contained resources
ResourceTemplateDto Parameters:
NameParameterData TypeRequiredDescription
NameformstringYes
DisplayNameformstringYes
DescriptionformstringYes
TypeformObjectTypesNo

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

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /api/deploymenttemplates/ HTTP/1.1 
Host: core.starburst.svc 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"tenantName":"String","schemaVersion":0,"definition":"String","allowedEnvironments":null,"allowedResourceProviderIds":null,"txId":"00000000-0000-0000-0000-000000000000"}
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,"isDisabled":false,"isLatest":false,"allowedEnvironments":null,"allowedResourceProviders":null,"resourceGroupTemplates":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}