Skip to content

SyncResource

Source: src/AWS/AppRegistry/SyncResource.ts

Runtime binding for servicecatalog:SyncResource.

Re-syncs a resource’s AppRegistry system tags (awsApplication) with its associated application — useful in remediation functions that repair drifted application tags. The caller additionally needs permission to read and update the target resource itself (e.g. cloudformation:UpdateStack + tag:GetResources for a CloudFormation stack); grant those on the host separately. Provide the implementation with Effect.provide(AWS.AppRegistry.SyncResourceHttp).

// init — account-level, no resource argument
const syncResource = yield* AWS.AppRegistry.SyncResource();
// runtime
const result = yield* syncResource({
resourceType: "CFN_STACK",
resource: "my-stack",
});
console.log(result.actionTaken);