cloudtrail

package
v1.5.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package cloudtrail reads the CloudTrail event history for an audit feed.

Index

Constants

View Source
const (
	AttrResourceName = "ResourceName"
	AttrResourceType = "ResourceType"
	AttrUsername     = "Username"
	AttrEventName    = "EventName"
)

Lookup attribute keys accepted by LookupEvents. The API allows one per call.

Variables

View Source
var Service = awsx.Service{Name: "cloudtrail", Prefix: "cloudtrail", SigningName: "cloudtrail", TargetPrefix: "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101"}

Service is the CloudTrail API (target prefix checked against the botocore model).

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the lazy CloudTrail module.

func New

func New(c *awsx.Client) *Client

New wraps a shared client.

func (*Client) LookupByNames

func (c *Client) LookupByNames(ctx context.Context, q Query, names []string) ([]Event, error)

LookupByNames merges the feed for several resource names, for a tag query: LookupEvents cannot filter by tag, so callers resolve the tag to resource names first (the Tagging API sweep in cloudguard) and pass them here.

func (*Client) LookupEvents

func (c *Client) LookupEvents(ctx context.Context, q Query) ([]Event, error)

LookupEvents returns events matching one attribute, newest first.

type Event

type Event struct {
	ID, Name, Source, Username string
	Time                       time.Time
	Resources                  []string
}

Event is one audit row. Raw JSON is left out on purpose.

type Query

type Query struct {
	Region     string
	AttrKey    string
	AttrValue  string
	Start, End time.Time
	// MaxPages bounds pagination; below 1 reads one page.
	MaxPages int
}

Query selects events. Zero times mean the API default window.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL