Categorygithub.com/segmentio/go-ec2
modulepackage
2.0.1+incompatible
Repository: https://github.com/segmentio/go-ec2.git
Documentation: pkg.go.dev

# README

go-ec2

High-level EC2 library built on top of mitchellh/goamz/ec2.

View the docs.

Features

Currently just provides a fluent API for looking up instances.

Example

Lookup running nodes matching "api-*":

auth, err := aws.EnvAuth()
check(err)

hosts := hosts.New(auth, aws.USWest2)
check(err)

nodes, err := hosts.Name("api-*")
check(err)

for i, node := range nodes {
  fmt.Printf("  %d) %s %s\n", i, node.InstanceId, node.Name())
}

Lookup stopped nodes with the "Project" tag of "redshift":

nodes, err := hosts.Find().State("stopped").Tag("Type", "redshift").Done()

License

MIT

# Packages

No description provided by the author

# Functions

New client with the given auth and region.

# Structs

Client provides some higher level methods for filtering, however if you need more flexibility you should use .Query().
Instance.
Query provides a chainable API for building up filters.