CoreService

<back to all web services

GetDeploymentTemplate

DeploymentTemplate - CRUD

Returns a deployment template by its id

Requires Authentication
Required role:TenantReader
The following routes are available for this service:
GET/api/deploymenttemplates/{Id}Returns a deployment template by its id
GET/deploymenttemplates/{Id}Returns a deployment template by its id
"use strict";
/** @typedef {'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'} */
export var ObjectTypes;
(function (ObjectTypes) {
    ObjectTypes["None"] = "None"
    ObjectTypes["ConfigItem"] = "ConfigItem"
    ObjectTypes["Tenant"] = "Tenant"
    ObjectTypes["Collection"] = "Collection"
    ObjectTypes["Resource"] = "Resource"
    ObjectTypes["ComputeNode"] = "ComputeNode"
    ObjectTypes["VirtualMachine"] = "VirtualMachine"
    ObjectTypes["PhysicalMachine"] = "PhysicalMachine"
    ObjectTypes["Disk"] = "Disk"
    ObjectTypes["Subnet"] = "Subnet"
    ObjectTypes["IPAddress"] = "IPAddress"
    ObjectTypes["Job"] = "Job"
    ObjectTypes["JobEvent"] = "JobEvent"
    ObjectTypes["FreezePeriod"] = "FreezePeriod"
    ObjectTypes["ResourceGroup"] = "ResourceGroup"
    ObjectTypes["Deployment"] = "Deployment"
    ObjectTypes["ResourceGroupTemplate"] = "ResourceGroupTemplate"
    ObjectTypes["DeploymentTemplate"] = "DeploymentTemplate"
    ObjectTypes["ResourceProvider"] = "ResourceProvider"
    ObjectTypes["GenericResource"] = "GenericResource"
    ObjectTypes["Role"] = "Role"
    ObjectTypes["Permission"] = "Permission"
    ObjectTypes["User"] = "User"
    ObjectTypes["PatchingWindow"] = "PatchingWindow"
    ObjectTypes["Update"] = "Update"
    ObjectTypes["ReportDefinition"] = "ReportDefinition"
    ObjectTypes["TimeSeries"] = "TimeSeries"
    ObjectTypes["DataPoint"] = "DataPoint"
    ObjectTypes["Action"] = "Action"
    ObjectTypes["ActionAssignment"] = "ActionAssignment"
    ObjectTypes["UserNote"] = "UserNote"
})(ObjectTypes || (ObjectTypes = {}));
export class TagDto {
    /** @param {{name?:string,value?:string,isProtected?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {?string} */
    value;
    /** @type {boolean} */
    isProtected;
}
export class PathItemDto {
    /** @param {{label?:string,link?:string,objectType?:ObjectTypes,objectId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    label;
    /** @type {string} */
    link;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {string} */
    objectId;
}
export class LinkDto {
    /** @param {{caption?:string,rel?:string,hRef?:string,method?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    caption;
    /** @type {string} */
    rel;
    /** @type {string} */
    hRef;
    /** @type {string} */
    method;
}
export class ConfigItemDto {
    /** @param {{id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<TagDto>,path?:IList<PathItemDto>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string,links?:IList<LinkDto>}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    name;
    /** @type {string} */
    displayName;
    /** @type {?string} */
    description;
    /** @type {ObjectTypes} */
    objectType;
    /** @type {string} */
    selfLink;
    /** @type {IList<TagDto>} */
    tags;
    /** @type {IList<PathItemDto>} */
    path;
    /** @type {string} */
    created;
    /** @type {string} */
    createUser;
    /** @type {string} */
    createUserId;
    /** @type {string} */
    modified;
    /** @type {string} */
    modifyUser;
    /** @type {string} */
    modifyUserId;
    /** @type {boolean} */
    isDeleted;
    /** @type {?string} */
    deleted;
    /** @type {?string} */
    deleteUser;
    /** @type {?string} */
    deleteUserId;
    /** @type {IList<LinkDto>} */
    links;
}
/** @typedef {'String'|'Number'|'Boolean'|'List'} */
export var ValueDataType;
(function (ValueDataType) {
    ValueDataType["String"] = "String"
    ValueDataType["Number"] = "Number"
    ValueDataType["Boolean"] = "Boolean"
    ValueDataType["List"] = "List"
})(ValueDataType || (ValueDataType = {}));
/** @typedef {'Lab'|'Poc'|'Dev'|'Test'|'Int'|'Uat'|'Prod'} */
export var Environments;
(function (Environments) {
    Environments["Lab"] = "Lab"
    Environments["Poc"] = "Poc"
    Environments["Dev"] = "Dev"
    Environments["Test"] = "Test"
    Environments["Int"] = "Int"
    Environments["Uat"] = "Uat"
    Environments["Prod"] = "Prod"
})(Environments || (Environments = {}));
export class VariableDto {
    /** @param {{name?:string,value?:string,type?:ValueDataType,description?:string,isInherited?:boolean,environment?:Environments}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /**
     * @type {string}
     * @description 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 */
    value;
    /**
     * @type {ValueDataType}
     * @description The data type of the value property */
    type;
    /** @type {?string} */
    description;
    /** @type {boolean} */
    isInherited;
    /** @type {?Environments} */
    environment;
}
/** @typedef {'String'|'Number'|'Boolean'|'SecureString'} */
export var ParameterValueType;
(function (ParameterValueType) {
    ParameterValueType["String"] = "String"
    ParameterValueType["Number"] = "Number"
    ParameterValueType["Boolean"] = "Boolean"
    ParameterValueType["SecureString"] = "SecureString"
})(ParameterValueType || (ParameterValueType = {}));
export class ParameterDto {
    /** @param {{name?:string,description?:string,value?:string,default?:string,optional?:boolean,type?:ParameterValueType,validation?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {?string} */
    description;
    /**
     * @type {?string}
     * @description Value in form of a json string (e.g. Number = 1234, String = "foo", Boolean = false). Note: string values need extra quotes */
    value;
    /**
     * @type {?string}
     * @description Optional default value for the frontend. Needs to be in the same format as the value */
    default;
    /**
     * @type {boolean}
     * @description Optional parameters do not need to have a value. Default -> Optional=false */
    optional;
    /**
     * @type {ParameterValueType}
     * @description The data type of the value and default property */
    type;
    /** @type {?string} */
    validation;
}
/** @typedef {'Azure'|'AmazonWebServices'|'GoogleCloudPlatform'|'ActiveDirectoryServices'|'DomainNameSystem'|'SwisscomESC'|'AzureKeyVault'} */
export var ResourceProviderTypes;
(function (ResourceProviderTypes) {
    ResourceProviderTypes["Azure"] = "Azure"
    ResourceProviderTypes["AmazonWebServices"] = "AmazonWebServices"
    ResourceProviderTypes["GoogleCloudPlatform"] = "GoogleCloudPlatform"
    ResourceProviderTypes["ActiveDirectoryServices"] = "ActiveDirectoryServices"
    ResourceProviderTypes["DomainNameSystem"] = "DomainNameSystem"
    ResourceProviderTypes["SwisscomESC"] = "SwisscomESC"
    ResourceProviderTypes["AzureKeyVault"] = "AzureKeyVault"
})(ResourceProviderTypes || (ResourceProviderTypes = {}));
export class ProviderConfigEntryDto {
    /** @param {{name?:string,value?:string,isSecure?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {string} */
    value;
    /** @type {boolean} */
    isSecure;
}
export class ResourceProviderDto extends ConfigItemDto {
    /** @param {{tenantId?:string,defaultEnvironment?:Environments,allowedEnvironments?:IList<Environments>,type?:ResourceProviderTypes,config?:IList<ProviderConfigEntryDto>,isDisabled?:boolean,isReadyForDeployments?:boolean,costCurrentMonth?:number,costLastMonth?:number,costCurrency?:string,id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<TagDto>,path?:IList<PathItemDto>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string,links?:IList<LinkDto>}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    tenantId;
    /**
     * @type {Environments}
     * @description If environment cannot be detected while scanning, default environment will be used */
    defaultEnvironment;
    /**
     * @type {IList<Environments>}
     * @description List off all allowed environments for this resource provider */
    allowedEnvironments;
    /**
     * @type {ResourceProviderTypes}
     * @description Defines the provider type (e.g. Azure, Aws) */
    type;
    /**
     * @type {IList<ProviderConfigEntryDto>}
     * @description Additional generic data which varies depending on ProviderType */
    config;
    /**
     * @type {boolean}
     * @description Disabled ResourceProviders cannot be selected for new deployments */
    isDisabled;
    /**
     * @type {boolean}
     * @description Shows if a ResourceProvider has been initialized and can accept deployments (resources) */
    isReadyForDeployments;
    /**
     * @type {number}
     * @description The cost for the current month */
    costCurrentMonth;
    /**
     * @type {number}
     * @description The cost for the last month */
    costLastMonth;
    /**
     * @type {string}
     * @description The cost currency */
    costCurrency;
}
export class ResourceTemplateDto {
    /** @param {{name?:string,displayName?:string,description?:string,type?:ObjectTypes}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    name;
    /** @type {string} */
    displayName;
    /** @type {string} */
    description;
    /** @type {ObjectTypes} */
    type;
}
export class ResourceGroupTemplateDto extends ConfigItemDto {
    /** @param {{tenantId?:string,schemaVersion?:number,version?:string,versionNumeric?:number,definition?:string,variables?:IList<VariableDto>,parameters?:IList<ParameterDto>,isLatest?:boolean,resourceTemplates?:IList<ResourceTemplateDto>,id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<TagDto>,path?:IList<PathItemDto>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string,links?:IList<LinkDto>}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    tenantId;
    /**
     * @type {number}
     * @description The schema version of the attached definition (json/yaml structure) */
    schemaVersion;
    /**
     * @type {string}
     * @description The version of the template (changes with each change to the template) */
    version;
    /**
     * @type {number}
     * @description The version in a numeric (padded) form which can be used for sorting */
    versionNumeric;
    /**
     * @type {?string}
     * @description The template definition/body either as json or yaml */
    definition;
    /**
     * @type {IList<VariableDto>}
     * @description Template variables */
    variables;
    /**
     * @type {IList<ParameterDto>}
     * @description Template parameters */
    parameters;
    /**
     * @type {boolean}
     * @description The template with the highest version number has IsLatest set to true */
    isLatest;
    /**
     * @type {IList<ResourceTemplateDto>}
     * @description List of contained resources */
    resourceTemplates;
}
export class DeploymentTemplateDto extends ConfigItemDto {
    /** @param {{tenantId?:string,schemaVersion?:number,version?:string,versionNumeric?:number,definition?:string,variables?:IList<VariableDto>,parameters?:IList<ParameterDto>,isDisabled?:boolean,isLatest?:boolean,allowedEnvironments?:IList<Environments>,allowedResourceProviders?:IList<ResourceProviderDto>,resourceGroupTemplates?:IList<ResourceGroupTemplateDto>,id?:string,name?:string,displayName?:string,description?:string,objectType?:ObjectTypes,selfLink?:string,tags?:IList<TagDto>,path?:IList<PathItemDto>,created?:string,createUser?:string,createUserId?:string,modified?:string,modifyUser?:string,modifyUserId?:string,isDeleted?:boolean,deleted?:string,deleteUser?:string,deleteUserId?:string,links?:IList<LinkDto>}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
    /** @type {string} */
    tenantId;
    /**
     * @type {number}
     * @description The schema version of the attached definition (json/yaml structure) */
    schemaVersion;
    /**
     * @type {string}
     * @description The version of the template (changes with each change to the template) */
    version;
    /**
     * @type {number}
     * @description The version in a numeric (padded) form which can be used for sorting */
    versionNumeric;
    /**
     * @type {?string}
     * @description The template definition as json/yaml */
    definition;
    /**
     * @type {IList<VariableDto>}
     * @description Template variables */
    variables;
    /**
     * @type {IList<ParameterDto>}
     * @description Template parameters */
    parameters;
    /**
     * @type {boolean}
     * @description Disabled templates should not be selected for deployments */
    isDisabled;
    /**
     * @type {boolean}
     * @description The template with the highest version number has IsLatest set to true */
    isLatest;
    /**
     * @type {?IList<Environments>}
     * @description This template can be deployed only to the environments listed below */
    allowedEnvironments;
    /**
     * @type {?IList<ResourceProviderDto>}
     * @description This template can be deployed only to the resource providers listed below */
    allowedResourceProviders;
    /**
     * @type {?IList<ResourceGroupTemplateDto>}
     * @description An optional list of the child resource group templates */
    resourceGroupTemplates;
}
export class GetDeploymentTemplate {
    /** @param {{id?:string,tenantName?:string,includeDeleted?:boolean,includeDefinition?:boolean,includeReferencedObjects?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {string} */
    tenantName;
    /**
     * @type {?boolean}
     * @description If true, also soft deleted items will be returned */
    includeDeleted;
    /**
     * @type {?boolean}
     * @description If true, also include the json definition */
    includeDefinition;
    /** @type {?boolean} */
    includeReferencedObjects;
}

JavaScript GetDeploymentTemplate 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

HTTP + JSON

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

GET /api/deploymenttemplates/{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,"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}