Skip to content

GroupResources

Source: src/AWS/ResourceGroups/GroupResources.ts

Runtime binding for resource-groups:GroupResources.

Adds the specified resources to the bound Group. Supported only for groups configured with AWS::ResourceGroups::ApplicationGroup, AWS::EC2::HostManagement, or AWS::EC2::CapacityReservationPool — query-based groups derive membership from their query instead. Grouping is asynchronous (application-group members are tagged with awsApplication): the response reports Pending ARNs which ListGroupingStatuses tracks to SUCCESS/FAILED. The group name is injected from the binding; the grant includes the Tagging API permissions the membership tagging fans out to (member services may additionally require their own TagResource permission on the caller). Provide the implementation with Effect.provide(AWS.ResourceGroups.GroupResourcesHttp).

// init — bind the operation to the group
const groupResources = yield* AWS.ResourceGroups.GroupResources(group);
// runtime
const { Succeeded, Pending, Failed } = yield* groupResources({
ResourceArns: [resourceArn],
});