mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 12:30:06 +00:00
feat(create-context): add the ability to create a compute context
This commit is contained in:
@@ -107,6 +107,13 @@ export default class SASjs {
|
||||
return await this.sasViyaApiClient!.getExecutableContexts(accessToken)
|
||||
}
|
||||
|
||||
public async createContext(contextName: string, sharedAccountId: string, autoExecLines: string, accessToken: string) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
}
|
||||
return await this.sasViyaApiClient!.createContext(contextName, sharedAccountId, autoExecLines, accessToken)
|
||||
}
|
||||
|
||||
public async createSession(contextName: string, accessToken: string) {
|
||||
if (this.sasjsConfig.serverType !== ServerType.SASViya) {
|
||||
throw new Error('This operation is only supported on SAS Viya servers.')
|
||||
|
||||
Reference in New Issue
Block a user