Skip to content

GetRepositorySyncStatus

Source: src/AWS/CodeConnections/GetRepositorySyncStatus.ts

Runtime binding for codeconnections:GetRepositorySyncStatus.

Bind this operation to a RepositoryLink to read the latest Git sync attempt for a branch — its status and the sync events that led to it — from inside a function runtime. Useful for dashboards that surface whether a stack is in sync with its repository. Provide the implementation with Effect.provide(AWS.CodeConnections.GetRepositorySyncStatusHttp).

// init — bind the operation to the repository link
const getRepositorySyncStatus =
yield* AWS.CodeConnections.GetRepositorySyncStatus(link);
// runtime
const { LatestSync } = yield* getRepositorySyncStatus({
Branch: "main",
SyncType: "CFN_STACK_SYNC",
});