本文整理汇总了TypeScript中azure-arm-rest/azure-arm-app-service.AzureAppService.getConfiguration方法的典型用法代码示例。如果您正苦于以下问题:TypeScript AzureAppService.getConfiguration方法的具体用法?TypeScript AzureAppService.getConfiguration怎么用?TypeScript AzureAppService.getConfiguration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类azure-arm-rest/azure-arm-app-service.AzureAppService
的用法示例。
在下文中一共展示了AzureAppService.getConfiguration方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: updateStartupCommandAndRuntimeStack
public async updateStartupCommandAndRuntimeStack(runtimeStack: string, startupCommand?: string): Promise<void> {
var configDetails = await this._appService.getConfiguration();
startupCommand = (!!startupCommand) ? startupCommand : "";
var linuxFxVersion: string = configDetails.properties.linuxFxVersion;
var appCommandLine: string = configDetails.properties.appCommandLine;
if (appCommandLine != startupCommand || runtimeStack != linuxFxVersion) {
await this.updateConfigurationSettings({linuxFxVersion: runtimeStack, appCommandLine: startupCommand});
}
else {
tl.debug(`Skipped updating the values. linuxFxVersion: ${linuxFxVersion} : appCommandLine: ${appCommandLine}`)
}
}
示例2: _getPhysicalToVirtualPathMap
private async _getPhysicalToVirtualPathMap(virtualApplication: string): Promise<any> {
// construct URL depending on virtualApplication or root of webapplication
var physicalPath = null;
var virtualPath = "/" + virtualApplication;
var appConfigSettings = await this._appService.getConfiguration();
var virtualApplicationMappings = appConfigSettings.properties && appConfigSettings.properties.virtualApplications;
if(virtualApplicationMappings) {
for( var mapping of virtualApplicationMappings ) {
if(mapping.virtualPath.toLowerCase() == virtualPath.toLowerCase()) {
physicalPath = mapping.physicalPath;
break;
}
}
}
return physicalPath ? {
'virtualPath': virtualPath,
'physicalPath': physicalPath
}: null;
}
示例3: updateScmTypeAndConfigurationDetails
public async updateScmTypeAndConfigurationDetails() : Promise<void>{
try {
var configDetails = await this._appService.getConfiguration();
var scmType: string = configDetails.properties.scmType;
if (scmType && scmType.toLowerCase() === "none") {
configDetails.properties.scmType = 'VSTSRM';
tl.debug('updating SCM Type to VSTS-RM');
await this._appService.updateConfiguration(configDetails);
tl.debug('updated SCM Type to VSTS-RM');
tl.debug('Updating metadata with latest release details');
await this._appService.patchMetadata(this._getNewMetadata());
tl.debug('Updated metadata with latest release details');
console.log(tl.loc("SuccessfullyUpdatedAzureRMWebAppConfigDetails"));
}
else {
tl.debug(`Skipped updating the SCM value. Value: ${scmType}`);
}
}
catch(error) {
tl.warning(tl.loc("FailedToUpdateAzureRMWebAppConfigDetails", error));
}
}