1import type * as greengrassv2 from "@distilled.cloud/aws/greengrassv2";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4
5/**
6 * Runtime binding for `greengrass:ResolveComponentCandidates`.
7 *
8 * Resolves a set of component candidates against a target platform,
9 * returning the exact component versions (and their recipes) that satisfy
10 * the version requirements — the same dependency-resolution API the
11 * Greengrass nucleus calls during a deployment. Provide the implementation
12 * with `Effect.provide(AWS.GreengrassV2.ResolveComponentCandidatesHttp)`.
13 *
14 * NOTE: per the AWS API reference, this operation must be called through the
15 * Greengrass **data plane** endpoint authenticated with an AWS IoT device
16 * certificate. Calls signed with plain IAM credentials (e.g. from a Lambda
17 * role) are rejected with a typed `AccessDeniedException` even when the
18 * `greengrass:ResolveComponentCandidates` permission is granted — use this
19 * binding only from device-credentialed contexts.
20 * ### Reading Components
21 * **Example:** Resolve Versions For A Platform
22 * ```typescript
23 * // init — account-level binding, no resource argument
24 * const resolveComponentCandidates =
25 * yield* AWS.GreengrassV2.ResolveComponentCandidates();
26 *
27 * // runtime
28 * const { resolvedComponentVersions } = yield* resolveComponentCandidates({
29 * platform: { attributes: { os: "linux", architecture: "amd64" } },
30 * componentCandidates: [
31 * { componentName: "com.example.Hello", versionRequirements: { req: ">=1.0.0" } },
32 * ],
33 * });
34 * ```
35 *
36 * @binding
37 */
38export interface ResolveComponentCandidates extends Binding.Service<
39 ResolveComponentCandidates,
40 "AWS.GreengrassV2.ResolveComponentCandidates",
41 () => Effect.Effect<
42 (
43 request?: greengrassv2.ResolveComponentCandidatesRequest,
44 ) => Effect.Effect<
45 greengrassv2.ResolveComponentCandidatesResponse,
46 greengrassv2.ResolveComponentCandidatesError
47 >
48 >
49> {}
50export const ResolveComponentCandidates =
51 Binding.Service<ResolveComponentCandidates>(
52 "AWS.GreengrassV2.ResolveComponentCandidates",
53 );