Skip to main content

setDefaultProvider

client.environments.setDefaultProvider(id: string, data?: Record<string, unknown>): Promise<unknown>

Sets an installed provider as the system default.

New environments will use this provider unless another is explicitly specified during creation.

Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the provider to set as default
dataRecord<string, unknown>NoOptional additional configuration for the default setting

Returns

Promise<unknown> — A promise that resolves when the default is updated

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.environments.setDefaultProvider('id');
console.log(result);