@salesforce/b2c-tooling-sdk / operations/mrt / updateEnv
Function: updateEnv()
updateEnv(
options,auth):Promise<{ }>
Defined in: packages/b2c-tooling-sdk/src/operations/mrt/env.ts:636
Updates an environment (target) in an MRT project.
Important: This endpoint automatically re-deploys the current bundle if any of the SSR-related properties are changed.
Parameters
options
Environment update options
auth
Authentication strategy (ApiKeyStrategy)
Returns
Promise<{ }>
The updated environment
Throws
Error if update fails
Example
typescript
import { ApiKeyStrategy } from '@salesforce/b2c-tooling-sdk/auth';
import { updateEnv } from '@salesforce/b2c-tooling-sdk/operations/mrt';
const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!, 'Authorization');
const updated = await updateEnv({
projectSlug: 'my-storefront',
slug: 'staging',
name: 'Staging v2',
enableSourceMaps: true
}, auth);