Version: v0.1.0 Latest Latest

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

Go to latest
Published: Jan 25, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0




This section is empty.


This section is empty.


func IsErrorNoOrg

func IsErrorNoOrg(err error) bool

IsErrorNoOrg returns true if err indicates that Organizations API is not available for the current account.

func IsID

func IsID(id string) bool

IsID returns true if id is a valid AWS account ID.

func LoadAliases

func LoadAliases(file, partition string) (map[string]string, error)

LoadAliases loads account aliases from a file. The file should contain one alias per line in the format "<partition> <account-id> <alias>". Empty lines and lines beginning with '#' are ignored.


type Client

type Client struct{ orgs.Organizations }

Client extends Organizations API client.

func NewClient

func NewClient(cfg *aws.Config) Client

NewClient returns a new Organizations client.

func (Client) GobDecode

func (Client) GobDecode([]byte) error

GobDecode prevents the client from being decoded by gob.

func (Client) GobEncode

func (Client) GobEncode() ([]byte, error)

GobEncode prevents the client from being encoded by gob.

type Directory

type Directory struct {
	Client   Client
	Org      Org
	Accounts map[string]*Info

Directory retrieves account information from AWS Organizations API.

func (*Directory) Init

func (d *Directory) Init() error

Init initializes organization information.

func (*Directory) Refresh

func (d *Directory) Refresh() error

Refresh updates account information.

type Info

type Info struct {
	ID         string
	Name       string
	Email      string
	Status     orgs.AccountStatus
	JoinMethod orgs.AccountJoinedMethod
	JoinTime   time.Time

Info contains account information.

func (*Info) Set

func (ac *Info) Set(src *orgs.Account)

Set updates account information.

type Org

type Org struct {
	ID          string
	FeatureSet  orgs.OrganizationFeatureSet
	Master      arn.ARN
	MasterEmail string
	MasterID    string

Org contains organization information.

func (*Org) Set

func (o *Org) Set(src *orgs.Organization)

Set updates organization information.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL