当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript AzureAppService.getConfiguration方法代码示例

本文整理汇总了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}`)
        }
    }
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:13,代码来源:AzureAppServiceUtility.ts

示例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;
    }
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:21,代码来源:AzureAppServiceUtility.ts

示例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));
     }
 }
开发者ID:Microsoft,项目名称:vsts-tasks,代码行数:22,代码来源:AzureAppServiceUtility.ts


注:本文中的azure-arm-rest/azure-arm-app-service.AzureAppService.getConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。