1import type * as appregistry from "@distilled.cloud/aws/service-catalog-appregistry";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `servicecatalog:SyncResource`.
7 *
8 * Re-syncs a resource's AppRegistry system tags (`awsApplication`) with its
9 * associated application — useful in remediation functions that repair
10 * drifted application tags. The caller additionally needs permission to read
11 * and update the target resource itself (e.g. `cloudformation:UpdateStack` +
12 * `tag:GetResources` for a CloudFormation stack); grant those on the host
13 * separately. Provide the implementation with
14 * `Effect.provide(AWS.AppRegistry.SyncResourceHttp)`.
15 * ### Syncing Resources
16 * **Example:** Re-sync a CloudFormation Stack's Application Tag
17 * ```typescript
18 * // init — account-level, no resource argument
19 * const syncResource = yield* AWS.AppRegistry.SyncResource();
20 *
21 * // runtime
22 * const result = yield* syncResource({
23 * resourceType: "CFN_STACK",
24 * resource: "my-stack",
25 * });
26 * console.log(result.actionTaken);
27 * ```
28 *
29 * @binding
30 */
31export interface SyncResource extends Binding.Service<
32 SyncResource,
33 "AWS.AppRegistry.SyncResource",
34 () => Effect.Effect<
35 (
36 request: appregistry.SyncResourceRequest,
37 ) => Effect.Effect<
38 appregistry.SyncResourceResponse,
39 appregistry.SyncResourceError
40 >
41 >
42> {}
43
44export const SyncResource = Binding.Service<SyncResource>(
45 "AWS.AppRegistry.SyncResource",
46);