Skip to content

ListResources

Source: src/AWS/ResourceExplorer/ListResources.ts

Runtime binding for resource-explorer-2:ListResources.

Enumerates the resources visible through the bound View using a structured filter (instead of Search’s free-form query string) — the building block of inventory automation: page through every resource the view exposes and act on each one. The view’s ARN is injected from the binding. Provide the implementation with Effect.provide(AWS.ResourceExplorer.ListResourcesHttp).

// init — bind the operation to the view
const listResources = yield* AWS.ResourceExplorer.ListResources(view);
// runtime
const page = yield* listResources({
Filters: { FilterString: "service:s3" },
MaxResults: 100,
});
for (const resource of page.Resources ?? []) {
yield* Effect.log(`${resource.ResourceType}: ${resource.Arn}`);
}