# Class ContextManager

### Hierarchy

- ContextManager

### Constructors

- constructor

### Accessors

- getDefaultComputeContexts
- getDefaultLauncherContexts

### Methods

- createComputeContext
- createLauncherContext
- deleteComputeContext
- editComputeContext
- getComputeContextById
- getComputeContextByName
- getComputeContexts
- getExecutableContexts
- getLauncherContexts
- isDefaultContext

## Constructors

### constructor

- new ContextManager(serverUrl: string, requestClient: RequestClient): ContextManager

- - Defined in src/ContextManager.ts:32

  #### Parameters

  - ##### serverUrl: string

  - ##### requestClient: RequestClient

  #### Returns ContextManager

## Accessors

### getDefaultComputeContexts

- get getDefaultComputeContexts(): string[]

- - Defined in src/ContextManager.ts:27

  #### Returns string[]

### getDefaultLauncherContexts

- get getDefaultLauncherContexts(): string[]

- - Defined in src/ContextManager.ts:30

  #### Returns string[]

## Methods

### createComputeContext

- createComputeContext(contextName: string, launchContextName: string, sharedAccountId: string, autoExecLines: string[], accessToken?: undefined | string, authorizedUsers?: string[]): Promise<Context>

- - Defined in src/ContextManager.ts:80

  #### Parameters

  - ##### contextName: string

  - ##### launchContextName: string

  - ##### sharedAccountId: string

  - ##### autoExecLines: string[]

  - ##### Optional accessToken: undefined | string

  - ##### Optional authorizedUsers: string[]

  #### Returns Promise<Context>

### createLauncherContext

- createLauncherContext(contextName: string, description: string, launchType?: string, accessToken?: undefined | string): Promise<Context>

- - Defined in src/ContextManager.ts:178

  #### Parameters

  - ##### contextName: string

  - ##### description: string

  - ##### Default value launchType: string = "direct"

  - ##### Optional accessToken: undefined | string

  #### Returns Promise<Context>

### deleteComputeContext

- deleteComputeContext(contextName: string, accessToken?: undefined | string): Promise<object>

- - Defined in src/ContextManager.ts:399

  #### Parameters

  - ##### contextName: string

  - ##### Optional accessToken: undefined | string

  #### Returns Promise<object>

### editComputeContext

- editComputeContext(contextName: string, editedContext: EditContextInput, accessToken?: undefined | string): Promise<object>

- - Defined in src/ContextManager.ts:229

  #### Parameters

  - ##### contextName: string

  - ##### editedContext: EditContextInput

  - ##### Optional accessToken: undefined | string

  #### Returns Promise<object>

### getComputeContextById

- getComputeContextById(contextId: string, accessToken?: undefined | string): Promise<ContextAllAttributes>

- - Defined in src/ContextManager.ts:313

  #### Parameters

  - ##### contextId: string

  - ##### Optional accessToken: undefined | string

  #### Returns Promise<ContextAllAttributes>

### getComputeContextByName

- getComputeContextByName(contextName: string, accessToken?: undefined | string): Promise<Context>

- - Defined in src/ContextManager.ts:288

  #### Parameters

  - ##### contextName: string

  - ##### Optional accessToken: undefined | string

  #### Returns Promise<Context>

### getComputeContexts

- getComputeContexts(accessToken?: undefined | string): Promise<object[]>

- - Defined in src/ContextManager.ts:38

  #### Parameters

  - ##### Optional accessToken: undefined | string

  #### Returns Promise<object[]>

### getExecutableContexts

- getExecutableContexts(executeScript: Function, accessToken?: undefined | string): Promise<any[]>

- - Defined in src/ContextManager.ts:331

  #### Parameters

  - ##### executeScript: Function

  - ##### Optional accessToken: undefined | string

  #### Returns Promise<any[]>

### getLauncherContexts

- getLauncherContexts(accessToken?: undefined | string): Promise<object[]>

- - Defined in src/ContextManager.ts:59

  #### Parameters

  - ##### Optional accessToken: undefined | string

  #### Returns Promise<object[]>

### isDefaultContext

- isDefaultContext(context: string, defaultContexts?: string[], errorMessage?: string, listDefaults?: boolean): void

- - Defined in src/ContextManager.ts:433

  #### Parameters

  - ##### context: string

  - ##### Default value defaultContexts: string[] = this.defaultComputeContexts

  - ##### Default value errorMessage: string = ""

  - ##### Default value listDefaults: boolean = false

  #### Returns void

Generated using TypeDoc