Skip to main content
Module

x/aws_api/examples/cloudtrail.ts

From-scratch Typescript client for accessing AWS APIs
Extremely Popular
Latest
File
import { ApiFactory } from '../client/mod.ts';import { CloudTrail } from 'https://aws-api.deno.dev/v0.3/services/cloudtrail.ts';const cloudTrail = new ApiFactory().makeNew(CloudTrail);
// Fetch most recent non-readonly operations from past 90 daysconst { Events } = await cloudTrail.lookupEvents({ LookupAttributes: [{ AttributeKey: 'ReadOnly', AttributeValue: 'false', }]});
// Print a subset of fields in a tableconsole.table(Events?.map(x => ({ Username: x.Username, API: x.EventName, Timestamp: x.EventTime,})));