Skip to content

AWS.AppRegistry reference

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).

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" },
});

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" },
});

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,
});

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 application
const getApplication = yield* AWS.AppRegistry.GetApplication(app);
// runtime
const details = yield* getApplication();
console.log(details.name, details.associatedResourceCount);

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 application
const getAssociatedResource =
yield* AWS.AppRegistry.GetAssociatedResource(app);
// runtime
const result = yield* getAssociatedResource({
resourceType: "CFN_STACK",
resource: "my-stack",
});
console.log(result.resource?.arn);

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 group
const getAttributeGroup = yield* AWS.AppRegistry.GetAttributeGroup(group);
// runtime
const details = yield* getAttributeGroup();
const attributes = JSON.parse(details.attributes ?? "{}");

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 argument
const listApplications = yield* AWS.AppRegistry.ListApplications();
// runtime
const page = yield* listApplications({ maxResults: 20 });
for (const app of page.applications ?? []) {
console.log(app.name, app.id);
}

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 application
const listAssociatedAttributeGroups =
yield* AWS.AppRegistry.ListAssociatedAttributeGroups(app);
// runtime
const page = yield* listAssociatedAttributeGroups({ maxResults: 25 });
console.log(page.attributeGroups);

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 application
const listAssociatedResources =
yield* AWS.AppRegistry.ListAssociatedResources(app);
// runtime
const page = yield* listAssociatedResources({ maxResults: 25 });
console.log(page.resources?.map((r) => r.arn));

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 argument
const listAttributeGroups = yield* AWS.AppRegistry.ListAttributeGroups();
// runtime
const page = yield* listAttributeGroups({ maxResults: 20 });
for (const group of page.attributeGroups ?? []) {
console.log(group.name, group.id);
}

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 application
const listAttributeGroupsForApplication =
yield* AWS.AppRegistry.ListAttributeGroupsForApplication(app);
// runtime
const page = yield* listAttributeGroupsForApplication({ maxResults: 25 });
console.log(page.attributeGroupsDetails?.map((g) => g.name));

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"],
});

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).

// init — account-level, no resource argument
const syncResource = yield* AWS.AppRegistry.SyncResource();
// runtime
const result = yield* syncResource({
resourceType: "CFN_STACK",
resource: "my-stack",
});
console.log(result.actionTaken);