AWS.AppRegistry reference
Application
Section titled “Application”Source:
src/AWS/AppRegistry/Application.ts
An AWS Service Catalog AppRegistry application — the top-level node that
groups related cloud resources and metadata under a single logical
application (surfaced in myApplications and the awsApplication tag).
Application: Creating an Application
Section titled “Application: Creating an Application”Basic Application
import * as AppRegistry from "alchemy/AWS/AppRegistry";
const app = yield* AppRegistry.Application("Storefront", {});Application with Description and Tags
const app = yield* AppRegistry.Application("Storefront", { applicationName: "storefront", description: "Customer-facing storefront services", tags: { team: "commerce" },});AttributeGroup
Section titled “AttributeGroup”Source:
src/AWS/AppRegistry/AttributeGroup.ts
An AWS Service Catalog AppRegistry attribute group — a named container of user-defined JSON metadata that can be associated with applications to enrich them (owner, cost center, compliance posture, etc.).
AttributeGroup: Creating an Attribute Group
Section titled “AttributeGroup: Creating an Attribute Group”Basic Attribute Group
import * as AppRegistry from "alchemy/AWS/AppRegistry";
const group = yield* AppRegistry.AttributeGroup("Ownership", { attributes: { owner: "commerce-team", costCenter: "1234", },});Attribute Group with Description and Tags
const group = yield* AppRegistry.AttributeGroup("Ownership", { attributeGroupName: "storefront-ownership", description: "Ownership metadata for the storefront", attributes: { owner: "commerce-team" }, tags: { team: "commerce" },});AttributeGroupAssociation
Section titled “AttributeGroupAssociation”Source:
src/AWS/AppRegistry/AttributeGroupAssociation.ts
Associates an AppRegistry AttributeGroup with an
Application so the group’s user-defined JSON metadata augments the
application’s machine-readable description.
AttributeGroupAssociation: Associating an Attribute Group
Section titled “AttributeGroupAssociation: Associating an Attribute Group”import * as AppRegistry from "alchemy/AWS/AppRegistry";
const app = yield* AppRegistry.Application("Storefront", {});const group = yield* AppRegistry.AttributeGroup("Ownership", { attributes: { owner: "commerce-team" },});
const association = yield* AppRegistry.AttributeGroupAssociation("Assoc", { application: app.applicationId, attributeGroup: group.attributeGroupId,});GetApplication
Section titled “GetApplication”Source:
src/AWS/AppRegistry/GetApplication.ts
Runtime binding for servicecatalog:GetApplication.
Reads the bound application’s metadata — description, tags, the
awsApplication tag value, integrations, and the associated resource
count. Provide the implementation with
Effect.provide(AWS.AppRegistry.GetApplicationHttp).
GetApplication: Reading Application Metadata
Section titled “GetApplication: Reading Application Metadata”// init — bind the operation to the applicationconst getApplication = yield* AWS.AppRegistry.GetApplication(app);
// runtimeconst details = yield* getApplication();console.log(details.name, details.associatedResourceCount);GetAssociatedResource
Section titled “GetAssociatedResource”Source:
src/AWS/AppRegistry/GetAssociatedResource.ts
Runtime binding for servicecatalog:GetAssociatedResource.
Reads one resource associated with the bound application, including its
application-tag sync status. Provide the implementation with
Effect.provide(AWS.AppRegistry.GetAssociatedResourceHttp).
GetAssociatedResource: Reading Associated Resources
Section titled “GetAssociatedResource: Reading Associated Resources”// init — bind the operation to the applicationconst getAssociatedResource = yield* AWS.AppRegistry.GetAssociatedResource(app);
// runtimeconst result = yield* getAssociatedResource({ resourceType: "CFN_STACK", resource: "my-stack",});console.log(result.resource?.arn);GetAttributeGroup
Section titled “GetAttributeGroup”Source:
src/AWS/AppRegistry/GetAttributeGroup.ts
Runtime binding for servicecatalog:GetAttributeGroup.
Reads the bound attribute group’s user-defined JSON metadata (the
attributes string) along with its description and tags — the primary
way for a running function to consume AppRegistry metadata. Provide the
implementation with Effect.provide(AWS.AppRegistry.GetAttributeGroupHttp).
GetAttributeGroup: Reading Attribute Group Metadata
Section titled “GetAttributeGroup: Reading Attribute Group Metadata”// init — bind the operation to the attribute groupconst getAttributeGroup = yield* AWS.AppRegistry.GetAttributeGroup(group);
// runtimeconst details = yield* getAttributeGroup();const attributes = JSON.parse(details.attributes ?? "{}");ListApplications
Section titled “ListApplications”Source:
src/AWS/AppRegistry/ListApplications.ts
Runtime binding for servicecatalog:ListApplications.
Enumerates all AppRegistry applications in the account — useful in
discovery/dashboard functions that inventory registered applications.
Account-level: no resource argument. Provide the implementation with
Effect.provide(AWS.AppRegistry.ListApplicationsHttp).
ListApplications: Discovering Applications
Section titled “ListApplications: Discovering Applications”// init — account-level, no resource argumentconst listApplications = yield* AWS.AppRegistry.ListApplications();
// runtimeconst page = yield* listApplications({ maxResults: 20 });for (const app of page.applications ?? []) { console.log(app.name, app.id);}ListAssociatedAttributeGroups
Section titled “ListAssociatedAttributeGroups”Source:
src/AWS/AppRegistry/ListAssociatedAttributeGroups.ts
Runtime binding for servicecatalog:ListAssociatedAttributeGroups.
Pages through the IDs of the attribute groups associated with the bound
application. Provide the implementation with
Effect.provide(AWS.AppRegistry.ListAssociatedAttributeGroupsHttp).
ListAssociatedAttributeGroups: Reading Attribute Groups
Section titled “ListAssociatedAttributeGroups: Reading Attribute Groups”// init — bind the operation to the applicationconst listAssociatedAttributeGroups = yield* AWS.AppRegistry.ListAssociatedAttributeGroups(app);
// runtimeconst page = yield* listAssociatedAttributeGroups({ maxResults: 25 });console.log(page.attributeGroups);ListAssociatedResources
Section titled “ListAssociatedResources”Source:
src/AWS/AppRegistry/ListAssociatedResources.ts
Runtime binding for servicecatalog:ListAssociatedResources.
Pages through the resources associated with the bound application.
Provide the implementation with
Effect.provide(AWS.AppRegistry.ListAssociatedResourcesHttp).
ListAssociatedResources: Reading Associated Resources
Section titled “ListAssociatedResources: Reading Associated Resources”// init — bind the operation to the applicationconst listAssociatedResources = yield* AWS.AppRegistry.ListAssociatedResources(app);
// runtimeconst page = yield* listAssociatedResources({ maxResults: 25 });console.log(page.resources?.map((r) => r.arn));ListAttributeGroups
Section titled “ListAttributeGroups”Source:
src/AWS/AppRegistry/ListAttributeGroups.ts
Runtime binding for servicecatalog:ListAttributeGroups.
Enumerates all AppRegistry attribute groups the caller can access —
useful in discovery/governance functions that inventory application
metadata. Account-level: no resource argument. Provide the implementation
with Effect.provide(AWS.AppRegistry.ListAttributeGroupsHttp).
ListAttributeGroups: Discovering Attribute Groups
Section titled “ListAttributeGroups: Discovering Attribute Groups”// init — account-level, no resource argumentconst listAttributeGroups = yield* AWS.AppRegistry.ListAttributeGroups();
// runtimeconst page = yield* listAttributeGroups({ maxResults: 20 });for (const group of page.attributeGroups ?? []) { console.log(group.name, group.id);}ListAttributeGroupsForApplication
Section titled “ListAttributeGroupsForApplication”Source:
src/AWS/AppRegistry/ListAttributeGroupsForApplication.ts
Runtime binding for servicecatalog:ListAttributeGroupsForApplication.
Pages through the details (ID, ARN, name) of the attribute groups
associated with the bound application. Provide the implementation with
Effect.provide(AWS.AppRegistry.ListAttributeGroupsForApplicationHttp).
ListAttributeGroupsForApplication: Reading Attribute Groups
Section titled “ListAttributeGroupsForApplication: Reading Attribute Groups”// init — bind the operation to the applicationconst listAttributeGroupsForApplication = yield* AWS.AppRegistry.ListAttributeGroupsForApplication(app);
// runtimeconst page = yield* listAttributeGroupsForApplication({ maxResults: 25 });console.log(page.attributeGroupsDetails?.map((g) => g.name));ResourceAssociation
Section titled “ResourceAssociation”Source:
src/AWS/AppRegistry/ResourceAssociation.ts
Associates an AWS resource (a CloudFormation stack or a tag-value query)
with an AppRegistry Application so the resource is inventoried
under the application in myApplications.
ResourceAssociation: Associating a Resource
Section titled “ResourceAssociation: Associating a Resource”Associate a CloudFormation Stack
import * as AppRegistry from "alchemy/AWS/AppRegistry";import * as CloudFormation from "alchemy/AWS/CloudFormation";
const app = yield* AppRegistry.Application("Storefront", {});const stack = yield* CloudFormation.Stack("Network", { templateBody: networkTemplateJson,});
const association = yield* AppRegistry.ResourceAssociation("StackAssoc", { application: app.applicationId, resourceType: "CFN_STACK", resource: stack.stackName,});Associate Without Applying the Application Tag
const association = yield* AppRegistry.ResourceAssociation("StackAssoc", { application: app.applicationId, resourceType: "CFN_STACK", resource: stack.stackName, options: ["SKIP_APPLICATION_TAG"],});SyncResource
Section titled “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).
SyncResource: Syncing Resources
Section titled “SyncResource: Syncing Resources”// init — account-level, no resource argumentconst syncResource = yield* AWS.AppRegistry.SyncResource();
// runtimeconst result = yield* syncResource({ resourceType: "CFN_STACK", resource: "my-stack",});console.log(result.actionTaken);