# 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:33

  #### Parameters

  - ##### serverUrl: string

  - ##### requestClient: RequestClient

  #### Returns ContextManager

## Accessors

### getDefaultComputeContexts

- get getDefaultComputeContexts(): string[]

- - Defined in src/ContextManager.ts:28

  #### Returns string[]

### getDefaultLauncherContexts

- get getDefaultLauncherContexts(): string[]

- - Defined in src/ContextManager.ts:31

  #### 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:81

  #### 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:179

  #### 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:398

  #### 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:230

  #### 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:314

  #### Parameters

  - ##### contextId: string

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

  #### Returns Promise<ContextAllAttributes>

### getComputeContextByName

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

- - Defined in src/ContextManager.ts:289

  #### Parameters

  - ##### contextName: string

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

  #### Returns Promise<Context>

### getComputeContexts

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

- - Defined in src/ContextManager.ts:39

  #### Parameters

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

  #### Returns Promise<object[]>

### getExecutableContexts

- getExecutableContexts(executeScript: Function, authConfig?: AuthConfig): Promise<any[]>

- - Defined in src/ContextManager.ts:330

  #### Parameters

  - ##### executeScript: Function

  - ##### Optional authConfig: AuthConfig

  #### Returns Promise<any[]>

### getLauncherContexts

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

- - Defined in src/ContextManager.ts:60

  #### Parameters

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

  #### Returns Promise<object[]>

### isDefaultContext

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

- - Defined in src/ContextManager.ts:432

  #### Parameters

  - ##### context: string

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

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

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

  #### Returns void

Generated using TypeDoc