Skip to content

GetComponent

Source: src/AWS/GreengrassV2/GetComponent.ts

Runtime binding for greengrass:GetComponent.

Fetches the bound ComponentVersion’s recipe (JSON or YAML, as raw bytes) so a function can inspect or mirror the component definition. The component version ARN is injected from the binding. Provide the implementation with Effect.provide(AWS.GreengrassV2.GetComponentHttp).

// init — bind the operation to the component version
const getComponent = yield* AWS.GreengrassV2.GetComponent(component);
// runtime
const { recipe } = yield* getComponent({ recipeOutputFormat: "JSON" });
const text = new TextDecoder().decode(recipe);