MCPcopy Index your code
hub / github.com/simstudioai/sim / getEnvironment

Function getEnvironment

apps/sim/app/api/tools/appconfig/utils.ts:525–545  ·  view source on GitHub ↗
(
  client: AppConfigClient,
  applicationId: string,
  environmentId: string
)

Source from the content-addressed store, hash-verified

523}
524
525export async function getEnvironment(
526 client: AppConfigClient,
527 applicationId: string,
528 environmentId: string
529) {
530 const response = await client.send(
531 new GetEnvironmentCommand({ ApplicationId: applicationId, EnvironmentId: environmentId })
532 )
533
534 return {
535 applicationId: response.ApplicationId ?? applicationId,
536 id: response.Id ?? '',
537 name: response.Name ?? '',
538 description: response.Description ?? null,
539 state: response.State ?? null,
540 monitors: (response.Monitors ?? []).map((monitor) => ({
541 alarmArn: monitor.AlarmArn ?? '',
542 alarmRoleArn: monitor.AlarmRoleArn ?? null,
543 })),
544 }
545}
546
547export async function updateEnvironment(
548 client: AppConfigClient,

Callers 1

route.tsFile · 0.90

Calls 1

sendMethod · 0.80

Tested by

no test coverage detected