View
Source:
src/AWS/ResourceExplorer/View.ts
An AWS Resource Explorer view — a saved search lens with an optional
filter and a set of included properties that Search queries run
through.
Views require an active AWS.ResourceExplorer.Index in the region.
When an index and a view deploy together, the view provider retries
through the window where the index is still provisioning.
Creating Views
Section titled “Creating Views”Unfiltered view over the whole account
const index = yield* AWS.ResourceExplorer.Index("Index", {});const view = yield* AWS.ResourceExplorer.View("AllResources", {});Filtered view with tags included in results
const view = yield* AWS.ResourceExplorer.View("S3Only", { filterString: "service:s3", includedProperties: ["tags"],});Searching
Section titled “Searching”// initconst search = yield* AWS.ResourceExplorer.Search(view);
return { fetch: Effect.gen(function* () { // runtime const results = yield* search({ QueryString: "service:s3" }); return HttpServerResponse.json({ count: results.Count }); }),};