How to use vscode-azurekudu - 3 common examples

To help you get started, we’ve selected a few vscode-azurekudu examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / vscode-azuretools / appservice / src / SiteClient.ts View on Github external
public get kudu(): KuduClient {
        if (!this.kuduHostName) {
            throw new Error(localize('notSupportedLinux', 'This operation is not supported by this app service plan.'));
        }
        const kuduClient: KuduClient = new KuduClient(this._subscription.credentials, this.kuduUrl);
        addExtensionUserAgent(kuduClient);
        return kuduClient;
    }
github microsoft / vscode-azuretools / appservice / src / getKuduClient.ts View on Github external
export async function getKuduClient(client: SiteClient): Promise {
    if (!client.kuduHostName) {
        const asp: AppServicePlan | undefined = await client.getAppServicePlan();
        const notSupportedLinux: string = localize('notSupportedLinux', 'This operation is not supported by App Service plans with kind "{0}" and sku tier "{1}".', client.kind, asp && asp.sku && asp.sku.tier);
        throw new Error(notSupportedLinux);
    }
    const user: User = await client.getWebAppPublishCredential();
    const cred: BasicAuthenticationCredentials = new BasicAuthenticationCredentials(user.publishingUserName, nonNullProp(user, 'publishingPassword'));

    const kuduClient: KuduClient = new KuduClient(cred, client.kuduUrl);
    addExtensionUserAgent(kuduClient);
    return kuduClient;
}
github microsoft / vscode-azuretools / appservice / src / SiteWrapper.ts View on Github external
private async getKuduClient(client: WebSiteManagementClient): Promise {
        const user: User = await this.getWebAppPublishCredential(client);
        if (!user.publishingUserName || !user.publishingPassword) {
            throw new ArgumentError(user);
        }

        const cred: BasicAuthenticationCredentials = new BasicAuthenticationCredentials(user.publishingUserName, user.publishingPassword);

        return new KuduClient(cred, `https://${this.appName}.scm.azurewebsites.net`);
    }
}

vscode-azurekudu

Client used to interact with Kudu.

MIT
Latest version published 2 years ago

Package Health Score

64 / 100
Full package analysis

Popular vscode-azurekudu functions