| 1 | import type * as appregistry from "@distilled.cloud/aws/service-catalog-appregistry"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { AttributeGroup } from "./AttributeGroup.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `servicecatalog:GetAttributeGroup`. |
| 8 | * |
| 9 | * Reads the bound attribute group's user-defined JSON metadata (the |
| 10 | * `attributes` string) along with its description and tags — the primary |
| 11 | * way for a running function to consume AppRegistry metadata. Provide the |
| 12 | * implementation with `Effect.provide(AWS.AppRegistry.GetAttributeGroupHttp)`. |
| 13 | * ### Reading Attribute Group Metadata |
| 14 | * **Example:** Read Attributes at Runtime |
| 15 | * ```typescript |
| 16 | * // init — bind the operation to the attribute group |
| 17 | * const getAttributeGroup = yield* AWS.AppRegistry.GetAttributeGroup(group); |
| 18 | * |
| 19 | * // runtime |
| 20 | * const details = yield* getAttributeGroup(); |
| 21 | * const attributes = JSON.parse(details.attributes ?? "{}"); |
| 22 | * ``` |
| 23 | * |
| 24 | * @binding |
| 25 | */ |
| 26 | export interface GetAttributeGroup extends Binding.Service< |
| 27 | GetAttributeGroup, |
| 28 | "AWS.AppRegistry.GetAttributeGroup", |
| 29 | ( |
| 30 | attributeGroup: AttributeGroup, |
| 31 | ) => Effect.Effect< |
| 32 | () => Effect.Effect< |
| 33 | appregistry.GetAttributeGroupResponse, |
| 34 | appregistry.GetAttributeGroupError |
| 35 | > |
| 36 | > |
| 37 | > {} |
| 38 | |
| 39 | export const GetAttributeGroup = Binding.Service<GetAttributeGroup>( |
| 40 | "AWS.AppRegistry.GetAttributeGroup", |
| 41 | ); |