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

Function listDeployments

apps/sim/app/api/tools/appconfig/utils.ts:398–434  ·  view source on GitHub ↗
(
  client: AppConfigClient,
  applicationId: string,
  environmentId: string,
  maxResults?: number | null,
  nextToken?: string | null
)

Source from the content-addressed store, hash-verified

396}
397
398export async function listDeployments(
399 client: AppConfigClient,
400 applicationId: string,
401 environmentId: string,
402 maxResults?: number | null,
403 nextToken?: string | null
404) {
405 const response = await client.send(
406 new ListDeploymentsCommand({
407 ApplicationId: applicationId,
408 EnvironmentId: environmentId,
409 ...(maxResults ? { MaxResults: maxResults } : {}),
410 ...(nextToken ? { NextToken: nextToken } : {}),
411 })
412 )
413
414 const deployments = (response.Items ?? []).map((item) => ({
415 deploymentNumber: item.DeploymentNumber ?? null,
416 configurationName: item.ConfigurationName ?? null,
417 configurationVersion: item.ConfigurationVersion ?? null,
418 deploymentDurationInMinutes: item.DeploymentDurationInMinutes ?? null,
419 growthType: item.GrowthType ?? null,
420 growthFactor: item.GrowthFactor ?? null,
421 finalBakeTimeInMinutes: item.FinalBakeTimeInMinutes ?? null,
422 state: item.State ?? null,
423 percentageComplete: item.PercentageComplete ?? null,
424 startedAt: item.StartedAt?.toISOString() ?? null,
425 completedAt: item.CompletedAt?.toISOString() ?? null,
426 versionLabel: item.VersionLabel ?? null,
427 }))
428
429 return {
430 deployments,
431 nextToken: response.NextToken ?? null,
432 count: deployments.length,
433 }
434}
435
436export async function stopDeployment(
437 client: AppConfigClient,

Callers 1

route.tsFile · 0.90

Calls 1

sendMethod · 0.80

Tested by

no test coverage detected